-
Notifications
You must be signed in to change notification settings - Fork 12.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e41533a
commit 3c77701
Showing
71 changed files
with
298 additions
and
269 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
tests/cases/fourslash/referencesForClassMembersExtendingAbstractClass.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
tests/cases/fourslash/referencesForClassMembersExtendingGenericClass.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 9 additions & 9 deletions
18
tests/cases/fourslash/referencesForContextuallyTypedObjectLiteralProperties.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,28 @@ | ||
/// <reference path='fourslash.ts'/> | ||
|
||
////interface IFoo { [|{| "isDefinition": true |}xy|]: number; } | ||
////interface IFoo { [|[|{| "isDefinition": true, "declarationRangeIndex": 0 |}xy|]: number;|] } | ||
//// | ||
////// Assignment | ||
////var a1: IFoo = { [|{| "isWriteAccess": true, "isDefinition": true |}xy|]: 0 }; | ||
////var a2: IFoo = { [|{| "isWriteAccess": true, "isDefinition": true |}xy|]: 0 }; | ||
////var a1: IFoo = { [|[|{| "isWriteAccess": true, "isDefinition": true, "declarationRangeIndex": 2 |}xy|]: 0|] }; | ||
////var a2: IFoo = { [|[|{| "isWriteAccess": true, "isDefinition": true, "declarationRangeIndex": 4 |}xy|]: 0|] }; | ||
//// | ||
////// Function call | ||
////function consumer(f: IFoo) { } | ||
////consumer({ [|{| "isWriteAccess": true, "isDefinition": true |}xy|]: 1 }); | ||
////consumer({ [|[|{| "isWriteAccess": true, "isDefinition": true, "declarationRangeIndex": 6 |}xy|]: 1|] }); | ||
//// | ||
////// Type cast | ||
////var c = <IFoo>{ [|{| "isWriteAccess": true, "isDefinition": true |}xy|]: 0 }; | ||
////var c = <IFoo>{ [|[|{| "isWriteAccess": true, "isDefinition": true, "declarationRangeIndex": 8 |}xy|]: 0|] }; | ||
//// | ||
////// Array literal | ||
////var ar: IFoo[] = [{ [|{| "isWriteAccess": true, "isDefinition": true |}xy|]: 1 }, { [|{| "isWriteAccess": true, "isDefinition": true |}xy|]: 2 }]; | ||
////var ar: IFoo[] = [{ [|[|{| "isWriteAccess": true, "isDefinition": true, "declarationRangeIndex": 10 |}xy|]: 1|] }, { [|[|{| "isWriteAccess": true, "isDefinition": true, "declarationRangeIndex": 12 |}xy|]: 2|] }]; | ||
//// | ||
////// Nested object literal | ||
////var ob: { ifoo: IFoo } = { ifoo: { [|{| "isWriteAccess": true, "isDefinition": true |}xy|]: 0 } }; | ||
////var ob: { ifoo: IFoo } = { ifoo: { [|[|{| "isWriteAccess": true, "isDefinition": true, "declarationRangeIndex": 14 |}xy|]: 0|] } }; | ||
//// | ||
////// Widened type | ||
////var w: IFoo = { [|{| "isWriteAccess": true, "isDefinition": true, "type": "undefined" |}xy|]: undefined }; | ||
////var w: IFoo = { [|[|{| "isWriteAccess": true, "isDefinition": true, "type": "undefined", "declarationRangeIndex": 16 |}xy|]: undefined|] }; | ||
//// | ||
////// Untped -- should not be included | ||
////var u = { xy: 0 }; | ||
|
||
verify.singleReferenceGroup("(property) IFoo.xy: number"); | ||
verify.singleReferenceGroup("(property) IFoo.xy: number", test.rangesByText().get("xy")); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
/// <reference path='fourslash.ts'/> | ||
|
||
// @Filename: referencesForGlobals_1.ts | ||
////declare module "[|{| "isWriteAccess": true, "isDefinition": true |}foo|]" { | ||
////[|declare module "[|{| "isWriteAccess": true, "isDefinition": true, "declarationRangeIndex": 0 |}foo|]" { | ||
//// var f: number; | ||
////} | ||
////}|] | ||
|
||
// @Filename: referencesForGlobals_2.ts | ||
////import f = require("[|foo|]"); | ||
|
||
verify.singleReferenceGroup('module "foo"'); | ||
verify.singleReferenceGroup('module "foo"', test.rangesByText().get("foo")); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.