Skip to content

Commit 0e4a763

Browse files
authored
Merge pull request #4 from open-wc/docs/plugin-types-optional-callbacks
docs: make plugin callbacks optional
2 parents bbce8fb + 7cc135a commit 0e4a763

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/analyzer/index.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,28 +76,28 @@ export interface Plugin {
7676
*
7777
* Runs for all modules in a project, before continuing to the `analyzePhase`
7878
*/
79-
collectPhase(params: CollectPhaseParams): void;
79+
collectPhase?(params: CollectPhaseParams): void;
8080

8181
/**
8282
* @summary Plugin hook that runs in the analyze phase.
8383
*
8484
* Runs for each AST node in each module.
8585
* You can use this phase to access a module's AST nodes and mutate the manifest.
8686
*/
87-
analyzePhase(params: AnalyzePhaseParams): void;
87+
analyzePhase?(params: AnalyzePhaseParams): void;
8888

8989
/**
9090
* @summary Plugin hook that runs in the module-link phase.
9191
*
9292
* Post-processing hook that runs for each module, after analyzing.
9393
* All information about your module should now be available.
9494
*/
95-
moduleLinkPhase(params: ModuleLinkPhaseParams): void;
95+
moduleLinkPhase?(params: ModuleLinkPhaseParams): void;
9696

9797
/**
9898
* @summary Plugin hook that runs in the package-link phase.
9999
*
100100
* Runs once per package, after modules have been parsed and after per-module post-processing
101101
*/
102-
packageLinkPhase(params: PackageLinkPhaseParams): void;
102+
packageLinkPhase?(params: PackageLinkPhaseParams): void;
103103
}

0 commit comments

Comments
 (0)