(input: string, options?: TokenizeOptions)
| 3577 | }); |
| 3578 | |
| 3579 | function tokenizeWithoutErrors(input: string, options?: TokenizeOptions): TokenizeResult { |
| 3580 | const tokenizeResult = tokenize(input, 'someUrl', getHtmlTagDefinition, options); |
| 3581 | |
| 3582 | if (tokenizeResult.errors.length > 0) { |
| 3583 | const errorString = tokenizeResult.errors.join('\n'); |
| 3584 | throw new Error(`Unexpected parse errors:\n${errorString}`); |
| 3585 | } |
| 3586 | |
| 3587 | return tokenizeResult; |
| 3588 | } |
| 3589 | |
| 3590 | function humanizeParts(tokens: Token[]) { |
| 3591 | return tokens.map((token) => [token.type, ...token.parts]); |
no test coverage detected