When a project-local auto-import candidate returned by tsgo completion is accepted, the completionEntryDetails request fails and no import edit is produced.
Reproduction
package.json
{
"private": true,
"devDependencies": {
"typescript": "npm:typescript-native-bridge@6.0.3-bridge.12.tsgo.7.0.2"
}
}
tsconfig.json
{
"include": ["./src/*.ts"]
}
src/model.ts
export const ReadRecordModel = {};
src/main.ts
- Run
pnpm install.
- Open the project in VS Code and select the workspace TypeScript version.
- Trigger completion on
ReadRecordModel in src/main.ts.
- Accept the auto-import candidate from
./model.
Expected
The import is inserted:
import { ReadRecordModel } from "./model";
ReadRecordModel;
Actual
The completion list includes ReadRecordModel with hasAction: true, but accepting it does not insert an import.
The corresponding completionEntryDetails request fails with:
Debug Failure. Some exportInfo should match the specified symbol / moduleSymbol
The completion data returned by the tsgo path does not contain the exportMapKey used by stock TypeScript:
{
"exportName": "ReadRecordModel",
"fileName": "<project>/src/model.ts",
"moduleSpecifier": "./model"
}
During completion details resolution, the same exported declaration is represented by a host-binder Symbol and a tsgo registry Symbol. Their declaration locations match, but their object identities do not, so the strict export-info Symbol match fails.
Stock TypeScript 6.0.3 returns an entry containing exportMapKey and produces the expected import edit.
The issue reproduces with typescript-native-bridge bridge.7 through bridge.12.
This issue was created with assistance from a code agent.
When a project-local auto-import candidate returned by tsgo completion is accepted, the
completionEntryDetailsrequest fails and no import edit is produced.Reproduction
package.json{ "private": true, "devDependencies": { "typescript": "npm:typescript-native-bridge@6.0.3-bridge.12.tsgo.7.0.2" } }tsconfig.json{ "include": ["./src/*.ts"] }src/model.tssrc/main.tspnpm install.ReadRecordModelinsrc/main.ts../model.Expected
The import is inserted:
Actual
The completion list includes
ReadRecordModelwithhasAction: true, but accepting it does not insert an import.The corresponding
completionEntryDetailsrequest fails with:The completion data returned by the tsgo path does not contain the
exportMapKeyused by stock TypeScript:{ "exportName": "ReadRecordModel", "fileName": "<project>/src/model.ts", "moduleSpecifier": "./model" }During completion details resolution, the same exported declaration is represented by a host-binder Symbol and a tsgo registry Symbol. Their declaration locations match, but their object identities do not, so the strict export-info Symbol match fails.
Stock TypeScript 6.0.3 returns an entry containing
exportMapKeyand produces the expected import edit.The issue reproduces with
typescript-native-bridgebridge.7 through bridge.12.This issue was created with assistance from a code agent.