🔎 Search Terms
declaration syntax invalid comment docstring reuse
🕗 Version & Regression Information
This is the behavior in every version I tried
⏯ Playground Link
https://www.typescriptlang.org/dev/bug-workbench/?target=7&composite=true&ts=5.8.1-rc#code/PTAEAEGMHsFsAdoGcCWAXApgLlGgTgK4YBQIES+KkaO+RpY4AJhpADYCGeHaK0AdrUIky4JAAtoAdwCisdA3KTZ8tJiYAxFG2ygOAOib60SYovAAzbRn4dYugyeIoE0PGlABvUNABGAK1YPAF9QCzw4UAAifWA-fyiAbjMMAA9Ed1AYfgpQAH1QAF4fAKDkhhBKqtIAKhriUBrQcQJxBprgcysdW3sceMNjUzSMjxZ2LgwsgVz4oJwXUYAKGOAUJiiASn0ASSYAHk8G0BOLaGgF13cV2PWo0G29w+CAPmTX8tFumztddcGnCM3B40ABPeBTJ4AFReRVAUPKQA
💻 Code
// @composite: true// @strict: true// @declaration: true// @showEmit// @showEmittedFile: a.d.ts// @filename: a.tsimport{object}from"./obj";exportconst_=object;////////////** * huh */// @filename: obj.d.tsexportdeclareconstobject: import("./id").Id<{foo: import("./id").Id<{}>;}>;// @filename: id.d.tsexporttypeId<T>=T;🙁 Actual behavior
a.d.ts is emitted as
exportdeclareconst_: {foo: import(/** * huh */"./id"/** * huh */).Id<{}>;};/** * huh */🙂 Expected behavior
a.d.ts emitted as
exportdeclareconst_: {foo: import("./id").Id<{}>;};/** * huh */Additional information about the issue
This seems to be a continuation of #58807, which #58810 did not fully resolve. cc
Mateusz Burzyński (@Andarist)Titian Cernicova-Dragomir (@dragomirtitian)Jake Bailey (@jakebailey)Wesley Wigham (@weswigham)
🔎 Search Terms
declaration syntax invalid comment docstring reuse
🕗 Version & Regression Information
This is the behavior in every version I tried
⏯ Playground Link
https://www.typescriptlang.org/dev/bug-workbench/?target=7&composite=true&ts=5.8.1-rc#code/PTAEAEGMHsFsAdoGcCWAXApgLlGgTgK4YBQIES+KkaO+RpY4AJhpADYCGeHaK0AdrUIky4JAAtoAdwCisdA3KTZ8tJiYAxFG2ygOAOib60SYovAAzbRn4dYugyeIoE0PGlABvUNABGAK1YPAF9QCzw4UAAifWA-fyiAbjMMAA9Ed1AYfgpQAH1QAF4fAKDkhhBKqtIAKhriUBrQcQJxBprgcysdW3sceMNjUzSMjxZ2LgwsgVz4oJwXUYAKGOAUJiiASn0ASSYAHk8G0BOLaGgF13cV2PWo0G29w+CAPmTX8tFumztddcGnCM3B40ABPeBTJ4AFReRVAUPKQA
💻 Code
🙁 Actual behavior
a.d.tsis emitted as🙂 Expected behavior
a.d.tsemitted asAdditional information about the issue
This seems to be a continuation of #58807, which #58810 did not fully resolve. cc
Mateusz Burzyński (@Andarist)Titian Cernicova-Dragomir (@dragomirtitian)Jake Bailey (@jakebailey)Wesley Wigham (@weswigham)