-
Notifications
You must be signed in to change notification settings - Fork 12.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
release-5.4: Revert PR 56087 (#57850)
- Loading branch information
1 parent
fc7006c
commit 010b188
Showing
3 changed files
with
34 additions
and
12 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