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
typeMyType=[name1:string,name2: number,
...rest:any[]]interfaceMyInterfaceextendsMyType{//MyInterface is not generic => works}// ----------- OR -------------typeMyType=[// MyType does not have ...rest => works finename1:string,name2: number]interfaceMyInterface<T>extendsMyType{}// ------------ OR ------------typeMyType=[// MyType typle elements are not named => works finestring,number,
...any[]]interfaceMyInterface<T>extendsMyType{}
Bug Report
Error happens only when:
...rest🔎 Search Terms
type alias, named tuple, interface
🕗 Version & Regression Information
Typescript v4.9.3
⏯ Playground Link
Playground link with relevant code
💻 Code
The following code throws that error:
All of the following below works fine:
🙁 Actual behavior
TSC throws error:
🙂 Expected behavior
Successfull compilation