1/// <reference path='fourslash.ts' /> 2// @noLib: true 3 4////[|this|]; 5////function f([|{| "isWriteAccess": true, "isDefinition": true |}this|]) { 6//// return [|this|]; 7//// function g([|{| "isWriteAccess": true, "isDefinition": true |}this|]) { return [|this|]; } 8////} 9////class C { 10//// static x() { 11//// [|this|]; 12//// } 13//// static y() { 14//// () => [|this|]; 15//// } 16//// constructor() { 17//// [|this|]; 18//// } 19//// method() { 20//// () => [|this|]; 21//// } 22////} 23////// These are *not* real uses of the 'this' keyword, they are identifiers. 24////const x = { [|[|{| "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 9 |}this|]: 0|] } 25////x.[|this|]; 26 27const [glob, f0, f1, g0, g1, x, y, constructor, method, propDefDef, propDef, propUse] = test.ranges(); 28verify.singleReferenceGroup("this: typeof globalThis", [glob]); 29verify.singleReferenceGroup("(parameter) this: any", [f0, f1]); 30verify.singleReferenceGroup("(parameter) this: any", [g0, g1]); 31verify.singleReferenceGroup("this: typeof C", [x, y]); 32verify.singleReferenceGroup("this: this", [constructor, method]); 33verify.singleReferenceGroup("(property) this: number", [propDef, propUse]); 34