(input: string, options?: TokenizeOptions)
| 3845 | }); |
| 3846 | |
| 3847 | function tokenizeWithoutErrors(input: string, options?: TokenizeOptions): TokenizeResult { |
| 3848 | const tokenizeResult = tokenize(input, 'someUrl', getHtmlTagDefinition, options); |
| 3849 | |
| 3850 | if (tokenizeResult.errors.length > 0) { |
| 3851 | const errorString = tokenizeResult.errors.join('\n'); |
| 3852 | throw new Error(`Unexpected parse errors:\n${errorString}`); |
| 3853 | } |
| 3854 | |
| 3855 | return tokenizeResult; |
| 3856 | } |
| 3857 | |
| 3858 | function humanizeParts(tokens: Token[]) { |
| 3859 | return tokens.map((token) => [token.type, ...token.parts]); |
no test coverage detected