-
-
Notifications
You must be signed in to change notification settings - Fork 765
Closed as not planned
Closed as not planned
Copy link
Labels
questionQuestion about functionalityQuestion about functionality
Description
Search terms
- unknown symbol resolver
- duplicate symbol names
Question
If I have a dependency called my-dep with two files like:
// src/export-1.ts
export interface DuplicateInterfaceName {}// src/export-2.ts
export interface DuplicateInterfaceName {}...and I consume it from my project as:
import { DuplicateInterfaceName } from 'my-dep/src/export-1.js'
import { DuplicateInterfaceName as DuplicateInterfaceName2 } from 'my-dep/src/export-2.js'
export interface ExtendsBoth extends DuplicateInterfaceName, DuplicateInterfaceName2 {
}I configure an unknown symbol resolver plugin like:
// my-plugin.ts
export function load (app: Application) {
app.converter.addUnknownSymbolResolver((ref) => {
console.info(JSON.stringify(ref, null, 2))
}
}I get:
{
"resolutionStart": "global",
"moduleSource": "my-dep",
"symbolReference": {
"path": [
{
"path": "DuplicateInterfaceName",
"navigation": "."
}
]
}
}
{
"resolutionStart": "global",
"moduleSource": "my-dep",
"symbolReference": {
"path": [
{
"path": "DuplicateInterfaceName",
"navigation": "."
}
]
}
}
That is, DuplicateInterfaceName is reported as unknown twice (as expected) but there's no way to differentiate between them.
Is there any way to have more in the ref, perhaps the name of the file in my-dep that the export resolved to?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
questionQuestion about functionalityQuestion about functionality