mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-05 08:11:30 -06:00
Add a test for optional members completions within an object within an index signature constraint (#52149)
This commit is contained in:
parent
2c1fda249f
commit
f326cbfb2e
@ -0,0 +1,29 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
// @strict: true
|
||||
////
|
||||
//// repro #9900
|
||||
////
|
||||
//// interface Test {
|
||||
//// a?: number;
|
||||
//// b?: string;
|
||||
//// }
|
||||
////
|
||||
//// interface TestIndex {
|
||||
//// [key: string]: Test;
|
||||
//// }
|
||||
////
|
||||
//// declare function testFunc<T extends TestIndex>(t: T): void;
|
||||
////
|
||||
//// testFunc({
|
||||
//// test: {
|
||||
//// /**/
|
||||
//// },
|
||||
//// });
|
||||
|
||||
verify.completions({
|
||||
marker: '',
|
||||
exact: [
|
||||
{ name: 'a', sortText: completion.SortText.OptionalMember },
|
||||
{ name: 'b', sortText: completion.SortText.OptionalMember },
|
||||
]
|
||||
});
|
||||
Loading…
x
Reference in New Issue
Block a user