Skip to content

Add a test for finding all references of same-named imports from two missing modules #55519

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// === findAllReferences ===
// === /tests/cases/fourslash/findAllRefsMissingModulesOverlappingSpecifiers.ts ===
// // https://github.com/microsoft/TypeScript/issues/5551
// import { resolve/*FIND ALL REFS*/ as resolveUrl } from "idontcare";
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's worth noting that this one just doesn't find any references while the other one finds the reference at the location of the request. I think it's fine - the most important thing is that both locations are not treated as references to the same thing.

// import { resolve } from "whatever";



// === findAllReferences ===
// === /tests/cases/fourslash/findAllRefsMissingModulesOverlappingSpecifiers.ts ===
// // https://github.com/microsoft/TypeScript/issues/5551
// import { resolve as resolveUrl } from "idontcare";
// <|import { [|{| isWriteAccess: true, isDefinition: true |}resolve|]/*FIND ALL REFS*/ } from "whatever";|>

// === Definitions ===
// === /tests/cases/fourslash/findAllRefsMissingModulesOverlappingSpecifiers.ts ===
// // https://github.com/microsoft/TypeScript/issues/5551
// import { resolve as resolveUrl } from "idontcare";
// <|import { [|resolve|]/*FIND ALL REFS*/ } from "whatever";|>

// === Details ===
[
{
"containerKind": "",
"containerName": "",
"kind": "alias",
"name": "import resolve",
"displayParts": [
{
"text": "import",
"kind": "keyword"
},
{
"text": " ",
"kind": "space"
},
{
"text": "resolve",
"kind": "aliasName"
}
]
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/// <reference path="fourslash.ts" />

//// // https://github.com/microsoft/TypeScript/issues/5551
//// import { resolve/*0*/ as resolveUrl } from "idontcare";
//// import { resolve/*1*/ } from "whatever";

verify.baselineFindAllReferences("0", "1");