-
Notifications
You must be signed in to change notification settings - Fork 12.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Does not add a duplicate completion when offering an export which was…
… re-declared as a global - fixes #32675
- Loading branch information
Showing
2 changed files
with
40 additions
and
3 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
33 changes: 33 additions & 0 deletions
33
tests/cases/fourslash/completionsRedeclareModuleAsGlobal.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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/// <reference path="fourslash.ts" /> | ||
|
||
// @esModuleInterop: true, | ||
// @target: esnext | ||
|
||
// @Filename: /myAssert.d.ts | ||
////declare function assert(value:any, message?:string):void; | ||
////export = assert; | ||
////export as namespace assert; | ||
|
||
// @Filename: /ambient.d.ts | ||
////import assert from './myAssert'; | ||
//// | ||
////type Assert = typeof assert; | ||
//// | ||
////declare global { | ||
//// const assert: Assert; | ||
////} | ||
|
||
// @Filename: /index.ts | ||
/////// <reference path="./ambient.d.ts" /> | ||
////asser/**/; | ||
|
||
verify.completions({ | ||
marker: "", | ||
includes: [ | ||
{ | ||
name: "assert", | ||
sortText: completion.SortText.GlobalsOrKeywords | ||
} | ||
], | ||
preferences: { includeCompletionsForModuleExports: true, includeInsertTextCompletions: true } | ||
}); |