Skip to content

Commit

Permalink
fix: update type
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Jul 12, 2021
1 parent 624e0d3 commit ca83e39
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { Plugin as RollupPlugin } from 'rollup'

export type Thenable<T> = T | Promise<T>

export interface UnpluginHooks {
transformInclude?: (id: string) => boolean;
transform?: (code: string, id: string) => string | { code: string; map: any; };
transform?: (code: string, id: string) => Thenable<string | { code: string; map: any; } | null | undefined>;
}

export interface UnpluginOptions<UserOptions> {
Expand Down

0 comments on commit ca83e39

Please sign in to comment.