lezer-parser / javascript

A JavaScript lezer grammar

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support `-?` and `-readonly`

SirPepe opened this issue · comments

-? and -readonly are valid TS, but do not appear to work with lezer:

type Test<T> = { -readonly [P in keyof T]-?: T[P] }

type Result = Test<{ readonly foo?: number }>

// Result = { foo: number }

It sure would be nice if there were a formal spec for this language. Added in attached patch.