ipatalas / vscode-postfix-ts

Postfix notation for TypeScript/Javascript - extension for VS Code
MIT License
159 stars 43 forks source link

Better workaround for `assignments` #78

Closed zardoy closed 2 years ago

zardoy commented 2 years ago

Its now should be a bit better for expressions like a += a.castas.

However I'm still not pleasred with workaround as a && a.castas would wrap the binary expression, but I expect it to wrap identifier instead. Its ok for if but not for identifier postfixes.

So I'm not sure wether it should be merged, maybe there is cleaner solution. I especially like ts.SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken which it the longest token in ts.

zardoy commented 2 years ago

FYI https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-0.html#short-circuiting-assignment-operators

ipatalas commented 2 years ago

FYI https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-0.html#short-circuiting-assignment-operators

Yeah, I knew about that but didn't have much time back then. Thanks for finding them all, did not expect such a big list :D