The following case will fail to parse correctly because the check at this line includes all trivia. When including the trivia, we end up with a check that looks like " typeof" = "typeof", which of course fails.
type T =
typeof({})
This PR turns the token into a string instead of the token reference in the check, as the token does not contain trivia.
Fixes #314
The following case will fail to parse correctly because the check at this line includes all trivia. When including the trivia, we end up with a check that looks like
" typeof" = "typeof"
, which of course fails.This PR turns the token into a string instead of the token reference in the check, as the token does not contain trivia.