Closed
Description
It is very useful for basic type checking, and IMO is a bit less hackish (and easier) than typeof node.value
. Here's my idea:
interface Literal <: Node, Expression {
type: "Literal";
value: string | boolean | null | number | RegExp;
// addition, the type
kind: "string" |
"boolean" |
"null" |
"undefined" |
"number" |
"regexp";
}
Metadata
Metadata
Assignees
Labels
No labels