Skip to content

Commit

Permalink
feat(core): IAdd type fix (#11502)
Browse files Browse the repository at this point in the history
  • Loading branch information
xierenyuan authored Aug 10, 2023
1 parent dc8d296 commit 898ff46
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
7 changes: 7 additions & 0 deletions examples/boilerplate/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,11 @@ export default (api: IApi) => {
args;
// console.log('> onCheckCode', args);
});

api.addHTMLScripts({
async fn() {
return [`console.log('async scripts hello world')`];
},
stage: 100,
});
};
6 changes: 3 additions & 3 deletions packages/core/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,10 @@ export interface IAdd<T, U> {
(args: {
fn: {
(args: T): Promise<U | U[]>;
name?: string;
before?: string | string[];
stage?: number;
};
name?: string;
before?: string | string[];
stage?: number;
}): void;
}

Expand Down

0 comments on commit 898ff46

Please sign in to comment.