TypeScript/tests/cases/fourslash/completionsWithGenericStringLiteral.ts

14 lines
350 B
TypeScript
Raw Normal View History

/// <reference path="fourslash.ts" />
// @strict: true
//// declare function get<T, K extends keyof T>(obj: T, key: K): T[K];
//// get({ hello: 123, world: 456 }, "[|/**/|]");
verify.completions({
marker: "",
includes: [
{ name: 'hello', replacementSpan: test.ranges()[0] },
{ name: 'world', replacementSpan: test.ranges()[0] }
]
});