Closed JonoPrest closed 2 years ago
There's no good place where an annotation could be inserted in the punned case (the first one).
There's also a separate formatting issue that {toNumber: @dead("+toNumber") toNumber}
is formatted to {toNumber}
destroying any annotations.
How about opening an issue in the syntax repository reporting the wrong formatting. Also, it makes sense for {@dead("+toNumber") toNumber}
not to be a parsing error. So I think we have 2 issues for the syntax repository.
1 don't destroy the annotation on formatting 2 allow parsing punned fields with annotations
Ah I see, thanks for your quick response @cristianoc 🙏
Sometimes there is an unused value in our project that is being destructured from a module. The @dead annotation from reanalyze -dce -write will be placed next to the destructured value and then the rescript file is unable to compile.
I'm not sure what can be done about this but it seems to work fine if the destructured value is named like this: