Skip to content

Allow to use post-fix expression operator "!" in object destructuring #27939

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

Closed
Ky6uk opened this issue Oct 17, 2018 · 2 comments
Closed

Allow to use post-fix expression operator "!" in object destructuring #27939

Ky6uk opened this issue Oct 17, 2018 · 2 comments
Labels
Duplicate An existing issue was already created

Comments

@Ky6uk
Copy link

Ky6uk commented Oct 17, 2018

It's much convenient way to use post-fix operator "!" with object destructuring as

const { a!, b!, c! } = data;

instead of

const a = data.a!;
const b = data.b!;

data.c!();

because later in code we can use new variables many times and right now it required to use operator ! for each usage of the variable in case when strictNullChecks is enabled.

@ghost
Copy link

ghost commented Oct 17, 2018

Duplicate of #17390

@ghost ghost marked this as a duplicate of #17390 Oct 17, 2018
@ghost ghost added the Duplicate An existing issue was already created label Oct 17, 2018
@typescript-bot
Copy link
Collaborator

This issue has been marked as a duplicate and has seen no activity in the last day. It has been closed for automatic house-keeping purposes.

amcasey added a commit to amcasey/TypeScript that referenced this issue Jan 17, 2019
Each of the old and new files should end up with a JSX namespace import
iff it contains JSX.

Fixes microsoft#27939
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

2 participants