mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-16 12:50:38 -07:00
perf: use polymophism instead duck test
This commit is contained in:
@@ -6,4 +6,7 @@ export default class HTMLToken extends Token {
|
||||
this.type = 'html'
|
||||
this.value = str
|
||||
}
|
||||
static is (token: Token): token is HTMLToken {
|
||||
return token.type === 'html'
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user