ipatalas / vscode-postfix-ts

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

No any postfixes in position: TS files should not be parsed as JSX #99

Closed zardoy closed 1 year ago

zardoy commented 1 year ago

Repro:

const func1 = <T>() => {}

const func2 = () => {
    let b
    a = () => {
        b = c
        b./* | */
    }
}

This is full valid code for TypeScript, but not typescriptreact (jsx), <T> is parsed is jsx opening element (AFAIR in jsx it must be changed to <T extends any>). But I completely have no idea why only in that specific position with that specific assignaments it doesn't work.