-
Notifications
You must be signed in to change notification settings - Fork 12.8k
duplicate emit /// <reference types="node" />
#48143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Bug
A bug in TypeScript
Domain: Declaration Emit
The issue relates to the emission of d.ts files
Fix Available
A PR has been opened for this issue
Help Wanted
You can do this
Milestone
Comments
Same behaviour observed under Smallest repro I could muster follows. // src/mod.ts
type ContainerOpts = {
readonly env: NodeJS.ProcessEnv,
readonly stderr?: readonly NodeJS.WritableStream[],
}; // dist/mod.d.ts
/// <reference types="node" />
/// <reference types="node" />
declare type ContainerOpts = {
readonly env: NodeJS.ProcessEnv;
readonly stderr?: readonly NodeJS.WritableStream[];
}; // tsconfig.json
{
"compilerOptions": {
"module": "CommonJS",
"moduleResolution": "node",
"target": "ES2020",
"lib": ["ES2020"]
"strict": true,
"declaration": true,
"outDir": "dist"
},
"include": [
"src"
]
}
|
RomainMuller
added a commit
to aws/jsii-compiler
that referenced
this issue
Jul 12, 2023
The test that assesses whether down-leveled declarations are necessary or not accounted for the possible presence of duplicated references to `node` types being injected by the TypeScript compiler (microsoft/TypeScript#48143), however in some cases the reference is present more than twice, which was not correctly accounted for; resulting in emission of redundant down-level declarations.
RomainMuller
added a commit
to aws/jsii-compiler
that referenced
this issue
Jul 12, 2023
The test that assesses whether down-leveled declarations are necessary or not accounted for the possible presence of duplicated references to `node` types being injected by the TypeScript compiler (microsoft/TypeScript#48143), however in some cases the reference is present more than twice, which was not correctly accounted for; resulting in emission of redundant down-level declarations.
github-merge-queue bot
pushed a commit
to aws/jsii-compiler
that referenced
this issue
Jul 12, 2023
The test that assesses whether down-leveled declarations are necessary or not accounted for the possible presence of duplicated references to `node` types being injected by the TypeScript compiler (microsoft/TypeScript#48143), however in some cases the reference is present more than twice, which was not correctly accounted for; resulting in emission of redundant down-level declarations. --- By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license]. [Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0
github-merge-queue bot
pushed a commit
to aws/jsii-compiler
that referenced
this issue
Jul 12, 2023
The test that assesses whether down-leveled declarations are necessary or not accounted for the possible presence of duplicated references to `node` types being injected by the TypeScript compiler (microsoft/TypeScript#48143), however in some cases the reference is present more than twice, which was not correctly accounted for; resulting in emission of redundant down-level declarations. Backports #204 --- By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license]. [Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Bug
A bug in TypeScript
Domain: Declaration Emit
The issue relates to the emission of d.ts files
Fix Available
A PR has been opened for this issue
Help Wanted
You can do this
Bug Report
🔎 Search Terms
🕗 Version & Regression Information
Version 4.7.0-dev.20220305
⏯ Playground Link
Playground link with relevant code
💻 Code
🙁 Actual behavior
bluelovers/ws-iconv@c039e94
https://github.com./bluelovers/ws-iconv/blob/c039e942f8562c9fdbba4e8d50c19afc20cc687f/packages/%40lazy-node/readlines/lib/types.d.ts
🙂 Expected behavior
The text was updated successfully, but these errors were encountered: