Skip to content
New issue

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

strictPropertyInitialization option doesn't work with computed properties #36302

Open
falsandtru opened this issue Jan 19, 2020 · 2 comments
Open
Labels
Awaiting More Feedback This means we'd like to hear from more people who would be helped by this feature Suggestion An idea for TypeScript

Comments

@falsandtru
Copy link
Contributor

TypeScript Version: 3.7.x-dev.20200118

Search Terms:

Code

const sym = Symbol();
class A {
    a: 0;
    ['b']: 0;
    [sym]: 0;
    [Symbol.toPrimitive]: 0;
}

Expected behavior:
Error with all properties.
Actual behavior:
Error only with 'a'.
Playground Link: https://www.typescriptlang.org/play/index.html?ts=3.8.0-dev.20200118&ssl=1&ssc=1&pln=7&pc=2#code/MYewdgzgLgBBCeBbGBeGBlJAjEAbAFAJQDcAUMLgIYQQwCCMA3qTKzJQFwwAMZbMAbQDkWIQF0uvFmwEJEEnnxmZEOXADooIAAoAnAJaJ9UfQDcApgqkBfIA

Related Issues:

@RyanCavanaugh RyanCavanaugh added Awaiting More Feedback This means we'd like to hear from more people who would be helped by this feature Suggestion An idea for TypeScript labels Feb 6, 2020
@harrysolovay
Copy link

Assuming the Awaiting More Feedback is applicable to both the TS team and community. Thought I'd give this a +1

@RoyElm
Copy link

RoyElm commented Mar 7, 2022

Guys any updates?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting More Feedback This means we'd like to hear from more people who would be helped by this feature Suggestion An idea for TypeScript
Projects
None yet
Development

No branches or pull requests

4 participants