ipatalas / vscode-postfix-ts

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

doesn't work in binary-expression when right side is identifier #67

Closed zardoy closed 2 years ago

zardoy commented 2 years ago

Hi! I found it useful to write equality expression first and then using your binary-expression when case. However I doesn't seem to work if right side of the expression is.

Example of useful snippet:

 {
    "name": "if",
    "body": "if ({{expr}}) ",
    "when": [
        "binary-expression"
    ]
},

Works well:

test === 'something'.if

Doesn't work well:

const userInput = 'something'
test === userInput.if

It doesn't even show the suggestion, however it is still binary expression, isn't it?

ipatalas commented 2 years ago

Yes, indeed, that is a valid binary expression. It just didn't work in some cases (quite a lot actually) but should be fixed in next version :)

zardoy commented 2 years ago

Works like a charm. Thank you!

Update: I thought it have problems, but everything is good! Thank you again!