mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-11-18 20:11:14 +00:00
Merge pull request #2413 from Microsoft/constAntlyAPainForUs
Fix getOccurrences for 'const' modifier with exported & ambient declarations
This commit is contained in:
commit
d06f71ef9c
6 files changed
+59
-15
No files matched your search
File renamed without changes.
@@ -0,0 +1,16 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////module m {
|
||||
//// declare [|const|] x;
|
||||
//// declare [|const|] enum E {
|
||||
//// }
|
||||
////}
|
||||
////
|
||||
////declare [|const|] x;
|
||||
////declare [|const|] enum E {
|
||||
////}
|
||||
|
||||
test.ranges().forEach(range => {
|
||||
goTo.position(range.start);
|
||||
verify.occurrencesAtPositionCount(0);
|
||||
});
|
||||
@@ -0,0 +1,16 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////module m {
|
||||
//// export [|const|] x;
|
||||
//// export [|const|] enum E {
|
||||
//// }
|
||||
////}
|
||||
////
|
||||
////export [|const|] x;
|
||||
////export [|const|] enum E {
|
||||
////}
|
||||
|
||||
test.ranges().forEach(range => {
|
||||
goTo.position(range.start);
|
||||
verify.occurrencesAtPositionCount(0);
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////export const class C {
|
||||
//// private static c/*1*/onst foo;
|
||||
//// constructor(public con/*2*/st foo) {
|
||||
//// }
|
||||
////}
|
||||
|
||||
goTo.marker("1");
|
||||
verify.occurrencesAtPositionCount(1);
|
||||
goTo.marker("2");
|
||||
verify.occurrencesAtPositionCount(0);
|
||||
Reference in new issue
Block a user