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
spread built-in internal
Playground link with relevant code
const a = (buff: { byteLength: number }) => console.log(buff.byteLength) const buff = new ArrayBuffer(123) a(buff) // Fine a({...buff}) // Prints undefined, expected error
Properties are not copied with the spread operator but the typing of the new object asserts they are present.
The type of an object constructed with the spread operator to not include properties that were not copied to it.
The text was updated successfully, but these errors were encountered:
Duplicate #9726
Sorry, something went wrong.
This issue has been marked as a 'Duplicate' and has seen no recent activity. It has been automatically closed for house-keeping purposes.
No branches or pull requests
Bug Report
π Search Terms
spread built-in internal
π Version & Regression Information
β― Playground Link
Playground link with relevant code
π» Code
π Actual behavior
Properties are not copied with the spread operator but the typing of the new object asserts they are present.
π Expected behavior
The type of an object constructed with the spread operator to not include properties that were not copied to it.
The text was updated successfully, but these errors were encountered: