🔎 Search Terms
declaration .d.ts invalid class member field generic mixin inherit
🕗 Version & Regression Information
- This changed between versions ______ and _______
- This changed in commit or PR _______
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about _________
- I was unable to test this on prior versions because _______
⏯ Playground Link
https://www.typescriptlang.org/play/?#code/MYGwhgzhAEBCkFMA8AVAfNA3gKGn6EArgA4IBOAsggLYBG50AvFgL7STQrYvbAD2AOwgAXaBQCWAD3ECm0JABEwwsABpoAYXBRoCScIQCAJjAEIA7tAAUAOjtHlYAFzsBATwDaAXQCUTDPAQyEoqaGi4+FYAyiTkLlqQEH6MGKCJuvqGJtAxpGRYEfj41FIyVHQMzACMhdAsQA
💻 Code
classBase<T>{superMember={}asT}constMixin=<Data,Classextendsnew(...data: any[])=>Base<Data>>(Super: Class)=>classextendsSuper{mixinMember=1}🙁 Actual behavior
declareclassBase<T>{superMember: T;}declareconstMixin: <Data,Classextendsnew(...data: any[])=>Base<Data>>(Super: Class)=>{new(...data: any[]): {mixinMember: number;superMember: T;// invalid generic variable in .d.ts};}&Class;🙂 Expected behavior
tsc generates completely valid .d.ts files with mixin inheritance.
Additional information about the issue
No response
🔎 Search Terms
declaration .d.ts invalid class member field generic mixin inherit
🕗 Version & Regression Information
⏯ Playground Link
https://www.typescriptlang.org/play/?#code/MYGwhgzhAEBCkFMA8AVAfNA3gKGn6EArgA4IBOAsggLYBG50AvFgL7STQrYvbAD2AOwgAXaBQCWAD3ECm0JABEwwsABpoAYXBRoCScIQCAJjAEIA7tAAUAOjtHlYAFzsBATwDaAXQCUTDPAQyEoqaGi4+FYAyiTkLlqQEH6MGKCJuvqGJtAxpGRYEfj41FIyVHQMzACMhdAsQA
💻 Code
🙁 Actual behavior
🙂 Expected behavior
tscgenerates completely valid.d.tsfiles with mixin inheritance.Additional information about the issue
No response