TypeScript/tests/cases/fourslash/annotateWithTypeFromJSDoc22.ts
Nathan Shively-Sanders c13506e70c Update annotateWithTypeFromJSDoc tests
1. Object literals are single-line now.
2. Index signatures transform to TS index signatures.
3. The refactoring is only available when it could add types.
2017-10-18 13:04:13 -07:00

15 lines
489 B
TypeScript

/// <reference path='fourslash.ts' />
// @strict: true
////
/////** @param {Object<string, boolean>} sb
//// * @param {Object<number, string>} ns */
////function /*1*/f(sb, ns) {
////}
verify.applicableRefactorAvailableAtMarker('1');
verify.fileAfterApplyingRefactorAtMarker('1',
`
/** @param {Object<string, boolean>} sb
* @param {Object<number, string>} ns */
function f(sb: { [s: string]: boolean; }, ns: { [n: number]: string; }) {
}`, 'Annotate with type from JSDoc', 'annotate');