We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
mapped type homomorphic instantiation array tuple constraint spread spreadable
https://www.typescriptlang.org/play?ts=5.4.0-dev.20231210#code/C4TwDgpgBAEghgOwCYBsIHkzAJYHsEDOAPOgHxQC8UA3gLABQUUA2gJJTYJQDWEIuAMyjoAugC4aDJkwBucFAFcIE9GxEBuKVAC+m+roYMkEAMYo4AJ2gCFCEznxQbdgIxEtAFSgQAHsAjIBFAASqa4FkhEAAoWuJAWoADSfAA0UFZwSPgoIFCIIMwipCkMpAAUAtgQKEgEEnSMLIkcXLz8Qh7iko1M5gBG1RIEwBacAOZ60lBxDoQSzAB0S-DIaJizxB7MiUUaWgb6AJQSHnoMJvjD6RAECijAlE62Ji5lDUxgsWD1Wr1wAygJAAiSoWYZAko9aZYPBzFi-aTvKbSOSKZRQFwAJgAzJDkTo8cikfjUUpgQJcLgIQimNpCUwRIS6VpcMAABYQCw-KH9QZQIEEMLIalQmawurwqFMYnI0nooF9Swi-HMqXdfGyeRkqAjJT06SqqaM-aQ7SHPRAA
type HandleOptions<O> = { [I in keyof O]: { value: O[I]; }; }; declare function func1< T extends Record<PropertyKey, readonly any[]>, >(fields: { [K in keyof T]: { label: string; options: [...HandleOptions<T[K]>]; }; }): T; const result = func1({ prop: { label: "first", options: [ { value: 123, }, { value: "foo", }, ], }, other: { label: "second", options: [ { value: "bar", }, { value: true, }, ], }, });
Error at line 12:
A rest element type must be an array type.(2574)
The error should not be reported
No response
The text was updated successfully, but these errors were encountered:
ahejlsberg
Successfully merging a pull request may close this issue.
π Search Terms
mapped type homomorphic instantiation array tuple constraint spread spreadable
π Version & Regression Information
β― Playground Link
https://www.typescriptlang.org/play?ts=5.4.0-dev.20231210#code/C4TwDgpgBAEghgOwCYBsIHkzAJYHsEDOAPOgHxQC8UA3gLABQUUA2gJJTYJQDWEIuAMyjoAugC4aDJkwBucFAFcIE9GxEBuKVAC+m+roYMkEAMYo4AJ2gCFCEznxQbdgIxEtAFSgQAHsAjIBFAASqa4FkhEAAoWuJAWoADSfAA0UFZwSPgoIFCIIMwipCkMpAAUAtgQKEgEEnSMLIkcXLz8Qh7iko1M5gBG1RIEwBacAOZ60lBxDoQSzAB0S-DIaJizxB7MiUUaWgb6AJQSHnoMJvjD6RAECijAlE62Ji5lDUxgsWD1Wr1wAygJAAiSoWYZAko9aZYPBzFi-aTvKbSOSKZRQFwAJgAzJDkTo8cikfjUUpgQJcLgIQimNpCUwRIS6VpcMAABYQCw-KH9QZQIEEMLIalQmawurwqFMYnI0nooF9Swi-HMqXdfGyeRkqAjJT06SqqaM-aQ7SHPRAA
π» Code
π Actual behavior
Error at line 12:
π Expected behavior
The error should not be reported
Additional information about the issue
No response
The text was updated successfully, but these errors were encountered: