mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-04 21:53:42 -06:00
Added tests for index signature completion builders.
This commit is contained in:
parent
f37a7f5752
commit
e8a1f16e62
20
tests/cases/fourslash/completionListInIndexSignature01.ts
Normal file
20
tests/cases/fourslash/completionListInIndexSignature01.ts
Normal file
@ -0,0 +1,20 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////interface I<T> {
|
||||
//// [/*1*/]: T;
|
||||
//// [/*2*/]: T;
|
||||
////}
|
||||
////
|
||||
////class C {
|
||||
//// [/*3*/]: string;
|
||||
//// [str/*4*/: string]: number;
|
||||
////}
|
||||
////
|
||||
////type T = {
|
||||
//// [x/*5*/yz: number]: boolean;
|
||||
//// [/*6*/
|
||||
|
||||
for (let marker of test.markers()) {
|
||||
goTo.position(marker.position);
|
||||
verify.completionListAllowsNewIdentifier();
|
||||
}
|
||||
19
tests/cases/fourslash/completionListInIndexSignature02.ts
Normal file
19
tests/cases/fourslash/completionListInIndexSignature02.ts
Normal file
@ -0,0 +1,19 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////interface I<T> {
|
||||
//// [x: /*1*/]: T;
|
||||
//// [: /*2*/]: T
|
||||
////}
|
||||
////
|
||||
////class C {
|
||||
//// [a: /*3*/]: string;
|
||||
//// [str: string/*4*/]: number;
|
||||
////}
|
||||
////
|
||||
////type T = {
|
||||
//// [xyz: /*5*/
|
||||
|
||||
for (let marker of test.markers()) {
|
||||
goTo.position(marker.position);
|
||||
verify.not.completionListAllowsNewIdentifier();
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user