yats.vim
yats.vim copied to clipboard
Arrow function syntax broken
The reproducible code:
const checkHightlighting = check(({
sixthVariable = `create ${myVariable}`
}) => {
return 'hello, world';
});
This appears to be an issue of parameter destructuring where default value contains typescriptBraces.
Here's another case that fails for me, seems ternary related though:
var thing = {
objectKey: (param) =>
param.field === 'String' ? `${inTemplate}` : param.field ?? null,
stringProp: true,
},
Interestingly, it works ok with javascript syntax (whichever one vim-polyglot provides) With either typescript or typescriptreact syntax type (shared in common I believe), it renders as such: