7a7328a17f
* 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
16 lines
274 B
TypeScript
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)`,
|
|
});
|