(input: string, options?: TokenizeOptions)
| 3862 | }); |
| 3863 | |
| 3864 | function tokenizeWithoutErrors(input: string, options?: TokenizeOptions): TokenizeResult { |
| 3865 | const tokenizeResult = tokenize(input, 'someUrl', getHtmlTagDefinition, options); |
| 3866 | |
| 3867 | if (tokenizeResult.errors.length > 0) { |
| 3868 | const errorString = tokenizeResult.errors.join('\n'); |
| 3869 | throw new Error(`Unexpected parse errors:\n${errorString}`); |
| 3870 | } |
| 3871 | |
| 3872 | return tokenizeResult; |
| 3873 | } |
| 3874 | |
| 3875 | function humanizeParts(tokens: Token[]) { |
| 3876 | return tokens.map((token) => [token.type, ...token.parts]); |
no test coverage detected