samhh/tshm

Operator spacing should be less strict

Closed this issue · 2 comments

samhh commented

Surprisingly, all of the following are valid syntax:

A [] // Array<A>
{ a: A } ['a'] // A
keyof{ a: 1 } // 'a'
a&b // a & b
a|b // a | b
samhh commented

First steps: 3b00b65

Each case needs verifying against TypeScript's behaviour. Note also that the postfix operators ([], ['k']) break if there's a space between them - check that in TypeScript in-particular. I have a feeling it's because of how I hacked on the "multi" code before.

samhh commented

Lots of commits today have fixed all of these examples, and then some.