- Notifications
You must be signed in to change notification settings - Fork 13.2k
Closed
Labels
Milestone
Description
π Search Terms
TypeError: Cannot read properties of undefined (reading 'kind')
π Version & Regression Information
- This changed between versions 5.7.3 and 5.8.2
- This changed in commit or PR Computed names in declarations files are resolved even when non-literal, preserve computed names when expressions are entity namesΒ #60052
β― Playground Link
π» Code
export type State = { a: number; b: string; }; export class Test{ setState(state: State){} test = (e: any) => { for (const [key, value] of Object.entries(e)) { this.setState({ [key]: value, }); } }; }π Actual behavior
running tsc results in a crash:
TypeError: Cannot read properties of undefined (reading 'kind') π Expected behavior
No crash is expected, some type errors should be found instead.
Additional information about the issue
No response
will-path, aleksei-berezkin, martinslota, lnunno, sajanv88 and 2 more