TypeScript/tests/cases/fourslash/codeFixInferFromPrimitiveUsage.ts
Nathan Shively-Sanders 383286ff53 Add type parameter inference
It's a smeary copy of the checker's type parameter, so I feel bad about
duplicating that code. Not sure what the solution is, architecturally.
2019-08-30 13:44:06 -07:00

11 lines
253 B
TypeScript

/// <reference path='fourslash.ts' />
// @noImplicitAny: true
//// function wrap( [| s |] ) {
//// return s.length + s.indexOf('hi')
//// }
// https://github.com/Microsoft/TypeScript/issues/29330
verify.rangeAfterCodeFix("s: string | string[]");