Files
tsgo/testdata/baselines/reference/submodule/compiler/declarationEmitUnsafeImportSymbolName.errors.txt
5be6aab742 Port PR #63200: Add symbol name to unsafe import error (TS2883) (#2931)
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: gabritto <[email protected]>
Co-authored-by: jakebailey <[email protected]>
2026-03-04 23:12:02 +00:00

16 lines
844 B
Plaintext

r/entry.ts(2,14): error TS2883: The inferred type of 'special' cannot be named without a reference to 'MySpecialType' from 'foo/node_modules/nested'. This is likely not portable. A type annotation is necessary.
==== r/node_modules/foo/node_modules/nested/index.d.ts (0 errors) ====
export interface MySpecialType {
val: string;
}
==== r/node_modules/foo/index.d.ts (0 errors) ====
import { MySpecialType } from "nested";
export function getSpecial(): MySpecialType;
==== r/entry.ts (1 errors) ====
import { getSpecial } from "foo";
export const special = getSpecial();
~~~~~~~
!!! error TS2883: The inferred type of 'special' cannot be named without a reference to 'MySpecialType' from 'foo/node_modules/nested'. This is likely not portable. A type annotation is necessary.