You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/** * This documentation is properly in the .d.ts */classFoo{/** * The good signature */foo(bar: string): void;/** * @depreacted This signature is depreacted */foo(): string;foo(bar?: string): string|void{return'hi';}}/** * The documentation in .d.ts is bad */functionMakeBar(){returnclassBar{/** * The good signature */foo(bar: string): void;/** * @deprecated This signature is deprecated * * This signature is missing from the .d.ts */foo(): string;foo(bar?: string): string|void{return'hi'}}}
π Actual behavior
The jsdoc in the d.t.s file duplicates the jsdoc for the first signature found on all other overloaded signatures when a function returns a constructor. This behavior does not appear in normal class definitions.
π Expected behavior
The JSDoc on each signature should match what's written for that signature in the .ts file.
Additional information about the issue
Intellisense that's picked up directly from the .ts file works fine - it understands the difference between the signatures, it's only the declaration file that's broken.
The text was updated successfully, but these errors were encountered:
π Search Terms
jsdoc overloads compiler declaration class function
π Version & Regression Information
β― Playground Link
https://www.typescriptlang.org/play/?ts=5.5.3#code/PQKhCgAIUgVALAlgZ0gEwPYGMCuBbAUwDsAXAQxMQyMhUgAcAnDegxgGwE9aaT4DIAOjSCSyKCGDgs7MslQAxDBkgBvKJE2gIm3TAQCA5srSRkiQ0Qo5GBDXqm7IAM2UAKAEZlGALjMlGRCJDAEo-ADcMRDQAbntIbXjoSAABNAImAjIsEgJTBDpzS2tbWlR0zOzctCTJeNcMNzD-QOC4pwbPbwB+P2QAoNC+geDIAB9ISOi1JN1bEhsaAHIkJfbdAF9IcA3wcETkg3RsfGJySmoeIRExMsgvGugpZxwiHKoaAFkyAGsCACFvE0Zk55otIDI5KhAYwQU5dAd4Xo4PxIMYMKYilYFrZZg48S53F5fC1Bs0prECYikck0hlbFgKHkUYULNibAI6BUGUzHjTkgTDkhUFiSpzUHgUOZRs5mHhIHwBMJROJ+U8CZ1mv1WoZ1kjOsTeqTglqRoZxpMoqZ1Gq5gQcctVgTdk5dhsgA
π» Code
π Actual behavior
The jsdoc in the
d.t.s
file duplicates the jsdoc for the first signature found on all other overloaded signatures when a function returns a constructor. This behavior does not appear in normal class definitions.π Expected behavior
The JSDoc on each signature should match what's written for that signature in the
.ts
file.Additional information about the issue
Intellisense that's picked up directly from the
.ts
file works fine - it understands the difference between the signatures, it's only the declaration file that's broken.The text was updated successfully, but these errors were encountered: