TypeScript/tests/cases/fourslash/codeFixInferFromUsageNumberPriority.ts
Nathan Shively-Sanders 7a7328a17f
string|number inferences are low priority (#28381)
* string|number inferences are low priority

Also, refactor unifyFromContext to explicitly handle priorities

* string/number/strnum are not mutually exclusive

* Assert that high/low can't apply to same element
2018-11-15 08:32:28 -08:00

16 lines
274 B
TypeScript

/// <reference path='fourslash.ts' />
////function f(x, y) {
//// return x + y
////}
////f(1, 2)
verify.codeFix({
description: "Infer parameter types from usage",
index: 0,
newFileContent:
`function f(x: number, y: number) {
return x + y
}
f(1, 2)`,
});