mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 04:43:37 -05:00
Add fourslash test for contextually-typed this
Regression test for #10972
This commit is contained in:
12
tests/cases/fourslash/memberListOnContextualThis.ts
Normal file
12
tests/cases/fourslash/memberListOnContextualThis.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
////interface A {
|
||||
//// a: string;
|
||||
////}
|
||||
////declare function ctx(callback: (this: A) => string): string;
|
||||
////ctx(function () { return th/*1*/is./*2*/a });
|
||||
|
||||
goTo.marker('1');
|
||||
verify.quickInfoIs("this: A");
|
||||
goTo.marker('2');
|
||||
verify.memberListContains('a', '(property) A.a: string');
|
||||
|
||||
Reference in New Issue
Block a user