mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-21 14:02:43 +08:00
This refactor adds a workaround to enable TypeScript declaration merging for the Critters class. We initially tried using interface merging on the default-exported Critters class: ```typescript interface Critters { embedLinkedStylesheet(link: PartialHTMLElement, document: PartialDocument): Promise<unknown>; } ``` However, since Critters is exported as a default class, TypeScript's declaration merging does not apply. To solve this, we introduced a new class, CrittersBase, which extends Critters, and added the required method in the CrittersBase interface: ```typescript interface CrittersBase { embedLinkedStylesheet(link: PartialHTMLElement, document: PartialDocument): Promise<unknown>; } class CrittersBase extends Critters {} ```
Angular Build System for Applications and Libraries
The sources for this package are in the Angular CLI repository. Please file issues and pull requests against that repository.
Usage information and reference details can be found in repository README file.