-
Notifications
You must be signed in to change notification settings - Fork 12.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
If any of the file path option is from node_modules folder, consider …
…only paths in node_modules folder
- Loading branch information
1 parent
c795052
commit 2f1a3ab
Showing
6 changed files
with
89 additions
and
19 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
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
60 changes: 60 additions & 0 deletions
60
tests/baselines/reference/declarationEmitReexportedSymlinkReference3.errors.txt
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,60 @@ | ||
tests/cases/compiler/monorepo/pkg3/src/keys.ts(3,14): error TS2742: The inferred type of 'ADMIN' cannot be named without a reference to '../../pkg2/node_modules/@raymondfeng/pkg1/dist'. This is likely not portable. A type annotation is necessary. | ||
|
||
|
||
==== tests/cases/compiler/monorepo/pkg3/tsconfig.json (0 errors) ==== | ||
{ | ||
"compilerOptions": { | ||
"outDir": "dist", | ||
"rootDir": "src", | ||
"target": "es5", | ||
"module": "commonjs", | ||
"strict": true, | ||
"esModuleInterop": true, | ||
"declaration": true | ||
} | ||
} | ||
|
||
==== tests/cases/compiler/monorepo/pkg1/dist/index.d.ts (0 errors) ==== | ||
export * from './types'; | ||
==== tests/cases/compiler/monorepo/pkg1/dist/types.d.ts (0 errors) ==== | ||
export declare type A = { | ||
id: string; | ||
}; | ||
export declare type B = { | ||
id: number; | ||
}; | ||
export declare type IdType = A | B; | ||
export declare class MetadataAccessor<T, D extends IdType = IdType> { | ||
readonly key: string; | ||
private constructor(); | ||
toString(): string; | ||
static create<T, D extends IdType = IdType>(key: string): MetadataAccessor<T, D>; | ||
} | ||
==== tests/cases/compiler/monorepo/pkg1/package.json (0 errors) ==== | ||
{ | ||
"name": "@raymondfeng/pkg1", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "dist/index.js", | ||
"typings": "dist/index.d.ts" | ||
} | ||
==== tests/cases/compiler/monorepo/pkg2/dist/index.d.ts (0 errors) ==== | ||
export * from './types'; | ||
==== tests/cases/compiler/monorepo/pkg2/dist/types.d.ts (0 errors) ==== | ||
export {MetadataAccessor} from '@raymondfeng/pkg1'; | ||
==== tests/cases/compiler/monorepo/pkg2/package.json (0 errors) ==== | ||
{ | ||
"name": "@raymondfeng/pkg2", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "dist/index.js", | ||
"typings": "dist/index.d.ts" | ||
} | ||
==== tests/cases/compiler/monorepo/pkg3/src/index.ts (0 errors) ==== | ||
export * from './keys'; | ||
==== tests/cases/compiler/monorepo/pkg3/src/keys.ts (1 errors) ==== | ||
import {MetadataAccessor} from "@raymondfeng/pkg2"; | ||
|
||
export const ADMIN = MetadataAccessor.create<boolean>('1'); | ||
~~~~~ | ||
!!! error TS2742: The inferred type of 'ADMIN' cannot be named without a reference to '../../pkg2/node_modules/@raymondfeng/pkg1/dist'. This is likely not portable. A type annotation is necessary. |
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
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
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