Make all properties in T optional

interface Plugin<A> {
    api?: A;
    augmentChunkHash: undefined | ObjectHook<((this, chunk) => string | void), {}>;
    banner: undefined | ObjectHook<AddonHook, {}>;
    buildEnd?: ObjectHook<((this, ...parameters) => void | Promise<void>), {
        sequential?: boolean;
    }>;
    buildStart?: ObjectHook<((this, ...parameters) => void | Promise<void>), {
        sequential?: boolean;
    }>;
    cacheKey?: string;
    closeBundle?: ObjectHook<((this, ...parameters) => void | Promise<void>), {
        sequential?: boolean;
    }>;
    closeWatcher?: ObjectHook<((this, ...parameters) => void | Promise<void>), {
        sequential?: boolean;
    }>;
    footer: undefined | ObjectHook<AddonHook, {}>;
    generateBundle: undefined | ObjectHook<((this, ...parameters) => void | Promise<void>), {}>;
    intro: undefined | ObjectHook<AddonHook, {}>;
    load?: ObjectHook<((this, ...parameters) => LoadResult | Promise<LoadResult>), {}>;
    moduleParsed?: ObjectHook<((this, ...parameters) => void | Promise<void>), {
        sequential?: boolean;
    }>;
    name: string;
    onLog?: ObjectHook<((this, level, log) => boolean | NullValue), {}>;
    options?: ObjectHook<((this, ...parameters) => InputOptions | NullValue | Promise<InputOptions | NullValue>), {}>;
    outputOptions: undefined | ObjectHook<((this, options) => NullValue | OutputOptions), {}>;
    outro: undefined | ObjectHook<AddonHook, {}>;
    renderChunk: undefined | ObjectHook<((this, ...parameters) => string | NullValue | { code: string; map?: SourceMapInput; } | Promise<string | NullValue | { code: string; map?: SourceMapInput; }>), {}>;
    renderDynamicImport: undefined | ObjectHook<((this, options) => NullValue | { left: string; right: string; }), {}>;
    renderError: undefined | ObjectHook<((this, ...parameters) => void | Promise<void>), {
        sequential?: boolean;
    }>;
    renderStart: undefined | ObjectHook<((this, ...parameters) => void | Promise<void>), {
        sequential?: boolean;
    }>;
    resolveDynamicImport?: ObjectHook<((this, ...parameters) => ResolveIdResult | Promise<ResolveIdResult>), {}>;
    resolveFileUrl: undefined | ObjectHook<ResolveFileUrlHook, {}>;
    resolveId?: ObjectHook<((this, ...parameters) => ResolveIdResult | Promise<ResolveIdResult>), {}>;
    resolveImportMeta: undefined | ObjectHook<ResolveImportMetaHook, {}>;
    shouldTransformCachedModule?: ObjectHook<((this, ...parameters) => boolean | NullValue | Promise<boolean | NullValue>), {}>;
    transform?: ObjectHook<((this, ...parameters) => TransformResult | Promise<TransformResult>), {}>;
    version?: string;
    watchChange?: ObjectHook<((this, ...parameters) => void | Promise<void>), {
        sequential?: boolean;
    }>;
    writeBundle: undefined | ObjectHook<((this, ...parameters) => void | Promise<void>), {
        sequential?: boolean;
    }>;
}

Type Parameters

  • A = any

Hierarchy (view full)

Properties

api?: A
augmentChunkHash: undefined | ObjectHook<((this, chunk) => string | void), {}>
banner: undefined | ObjectHook<AddonHook, {}>
buildEnd?: ObjectHook<((this, ...parameters) => void | Promise<void>), {
    sequential?: boolean;
}>

Type declaration

Type declaration

  • Optional sequential?: boolean
buildStart?: ObjectHook<((this, ...parameters) => void | Promise<void>), {
    sequential?: boolean;
}>

Type declaration

Type declaration

  • Optional sequential?: boolean
cacheKey?: string
closeBundle?: ObjectHook<((this, ...parameters) => void | Promise<void>), {
    sequential?: boolean;
}>

Type declaration

Type declaration

  • Optional sequential?: boolean
closeWatcher?: ObjectHook<((this, ...parameters) => void | Promise<void>), {
    sequential?: boolean;
}>

Type declaration

Type declaration

  • Optional sequential?: boolean
footer: undefined | ObjectHook<AddonHook, {}>
generateBundle: undefined | ObjectHook<((this, ...parameters) => void | Promise<void>), {}>
intro: undefined | ObjectHook<AddonHook, {}>
load?: ObjectHook<((this, ...parameters) => LoadResult | Promise<LoadResult>), {}>

Type declaration

    • (this, ...parameters): LoadResult | Promise<LoadResult>
    • Parameters

      Returns LoadResult | Promise<LoadResult>

Type declaration

    moduleParsed?: ObjectHook<((this, ...parameters) => void | Promise<void>), {
        sequential?: boolean;
    }>

    Type declaration

    Type declaration

    • Optional sequential?: boolean
    name: string
    onLog?: ObjectHook<((this, level, log) => boolean | NullValue), {}>

    Type declaration

    Type declaration

      options?: ObjectHook<((this, ...parameters) => InputOptions | NullValue | Promise<InputOptions | NullValue>), {}>

      Type declaration

        • (this, ...parameters): InputOptions | NullValue | Promise<InputOptions | NullValue>
        • Parameters

          Returns InputOptions | NullValue | Promise<InputOptions | NullValue>

      Type declaration

        outputOptions: undefined | ObjectHook<((this, options) => NullValue | OutputOptions), {}>
        outro: undefined | ObjectHook<AddonHook, {}>
        renderChunk: undefined | ObjectHook<((this, ...parameters) => string | NullValue | { code: string; map?: SourceMapInput; } | Promise<string | NullValue | { code: string; map?: SourceMapInput; }>), {}>
        renderDynamicImport: undefined | ObjectHook<((this, options) => NullValue | { left: string; right: string; }), {}>
        renderError: undefined | ObjectHook<((this, ...parameters) => void | Promise<void>), {
            sequential?: boolean;
        }>
        renderStart: undefined | ObjectHook<((this, ...parameters) => void | Promise<void>), {
            sequential?: boolean;
        }>
        resolveDynamicImport?: ObjectHook<((this, ...parameters) => ResolveIdResult | Promise<ResolveIdResult>), {}>

        Type declaration

          • (this, ...parameters): ResolveIdResult | Promise<ResolveIdResult>
          • Parameters

            • this: PluginContext
            • Rest ...parameters: [specifier: string | AstNode, importer: string, options: {
                  attributes: Record<string, string>;
              }]

            Returns ResolveIdResult | Promise<ResolveIdResult>

        Type declaration

          resolveFileUrl: undefined | ObjectHook<ResolveFileUrlHook, {}>
          resolveId?: ObjectHook<((this, ...parameters) => ResolveIdResult | Promise<ResolveIdResult>), {}>

          Type declaration

            • (this, ...parameters): ResolveIdResult | Promise<ResolveIdResult>
            • Parameters

              • this: PluginContext
              • Rest ...parameters: [source: string, importer: string, options: {
                    attributes: Record<string, string>;
                    custom?: CustomPluginOptions;
                    isEntry: boolean;
                }]

              Returns ResolveIdResult | Promise<ResolveIdResult>

          Type declaration

            resolveImportMeta: undefined | ObjectHook<ResolveImportMetaHook, {}>
            shouldTransformCachedModule?: ObjectHook<((this, ...parameters) => boolean | NullValue | Promise<boolean | NullValue>), {}>

            Type declaration

              • (this, ...parameters): boolean | NullValue | Promise<boolean | NullValue>
              • Parameters

                • this: PluginContext
                • Rest ...parameters: [options: {
                      ast: ProgramNode;
                      code: string;
                      id: string;
                      meta: CustomPluginOptions;
                      moduleSideEffects: boolean | "no-treeshake";
                      resolvedSources: ResolvedIdMap;
                      syntheticNamedExports: string | boolean;
                  }]

                Returns boolean | NullValue | Promise<boolean | NullValue>

            Type declaration

              transform?: ObjectHook<((this, ...parameters) => TransformResult | Promise<TransformResult>), {}>

              Type declaration

                • (this, ...parameters): TransformResult | Promise<TransformResult>
                • Parameters

                  Returns TransformResult | Promise<TransformResult>

              Type declaration

                version?: string
                watchChange?: ObjectHook<((this, ...parameters) => void | Promise<void>), {
                    sequential?: boolean;
                }>

                Type declaration

                Type declaration

                • Optional sequential?: boolean
                writeBundle: undefined | ObjectHook<((this, ...parameters) => void | Promise<void>), {
                    sequential?: boolean;
                }>