-
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.
- Loading branch information
1 parent
8fa18b2
commit cc460dc
Showing
5 changed files
with
34 additions
and
20 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
34 changes: 34 additions & 0 deletions
34
tests/baselines/reference/declarationEmitUsingTypeAlias1.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,34 @@ | ||
src/index.ts(3,14): error TS2742: The inferred type of 'foo' cannot be named without a reference to '../node_modules/some-dep/dist/inner'. This is likely not portable. A type annotation is necessary. | ||
src/index.ts(7,14): error TS2742: The inferred type of 'bar' cannot be named without a reference to '../node_modules/some-dep/dist/inner'. This is likely not portable. A type annotation is necessary. | ||
|
||
|
||
==== node_modules/some-dep/dist/inner.d.ts (0 errors) ==== | ||
export declare type Other = { other: string }; | ||
export declare type SomeType = { arg: Other }; | ||
|
||
==== node_modules/some-dep/dist/index.d.ts (0 errors) ==== | ||
export type OtherType = import('./inner').Other; | ||
export type SomeType = import('./inner').SomeType; | ||
|
||
==== node_modules/some-dep/package.json (0 errors) ==== | ||
{ | ||
"name": "some-dep", | ||
"exports": { | ||
".": "./dist/index.js" | ||
} | ||
} | ||
|
||
==== src/index.ts (2 errors) ==== | ||
import { SomeType } from "some-dep"; | ||
|
||
export const foo = (thing: SomeType) => { | ||
~~~ | ||
!!! error TS2742: The inferred type of 'foo' cannot be named without a reference to '../node_modules/some-dep/dist/inner'. This is likely not portable. A type annotation is necessary. | ||
return thing; | ||
}; | ||
|
||
export const bar = (thing: SomeType) => { | ||
~~~ | ||
!!! error TS2742: The inferred type of 'bar' cannot be named without a reference to '../node_modules/some-dep/dist/inner'. This is likely not portable. A type annotation is necessary. | ||
return thing.arg; | ||
}; |
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
4 changes: 0 additions & 4 deletions
4
tests/baselines/reference/unusedTypeParametersCheckedByNoUnusedParameters.types
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
4 changes: 0 additions & 4 deletions
4
tests/baselines/reference/unusedTypeParametersNotCheckedByNoUnusedLocals.types
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