whether it's a node of `kind`, narrowing it to that kind's node
(kind: kind)
| 1258 | |
| 1259 | /** whether it's a node of `kind`, narrowing it to that kind's node */ |
| 1260 | is<kind extends NodeKind>(kind: kind): this is nodeOfKind<kind> { |
| 1261 | return this.kind === (kind as never) |
| 1262 | } |
| 1263 | |
| 1264 | /** it as a node of `kind`, or a thrown error if it's another kind */ |
| 1265 | assertIs<kind extends NodeKind>(kind: kind): nodeOfKind<kind> { |