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"; }
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4