mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
After updating to a more recent version of rollup, rollup started to complain because the `TreeParseResult` class is being re-exported twice in the `index.ts -> public-api.ts -> compiler.ts` entry-point. Rollup threw errors like: ``` Error: "ParseTreeResult" cannot be exported from <..>/ml_parser/parser.mjs as it is a re-export that references itself. ``` It seems like Rollup ideally would not throw here, similar to TypeScript which detects that these exports are the same and just dedupes them, but it's low-effort fixing this for now and actually is a good opportunity to make the public API a little more easy understand (when looking at the `compiler.ts` file). PR Close #43431
21 lines
586 B
TypeScript
21 lines
586 B
TypeScript
/**
|
|
* @license
|
|
* Copyright Google LLC All Rights Reserved.
|
|
*
|
|
* Use of this source code is governed by an MIT-style license that can be
|
|
* found in the LICENSE file at https://angular.io/license
|
|
*/
|
|
|
|
import {getHtmlTagDefinition} from './html_tags';
|
|
import {TokenizeOptions} from './lexer';
|
|
import {Parser, ParseTreeResult} from './parser';
|
|
|
|
export class HtmlParser extends Parser {
|
|
constructor() {
|
|
super(getHtmlTagDefinition);
|
|
}
|
|
|
|
override parse(source: string, url: string, options?: TokenizeOptions): ParseTreeResult {
|
|
return super.parse(source, url, options);
|
|
}
|
|
}
|