UNPKG

rolldown

Version:

Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.

46 lines (45 loc) 1.51 kB
import { Plugin } from '../plugin'; export declare const ENUMERATED_INPUT_PLUGIN_HOOK_NAMES: readonly ["options", "buildStart", "resolveId", "load", "transform", "moduleParsed", "buildEnd", "onLog", "resolveDynamicImport", "closeBundle", "closeWatcher", "watchChange"]; export declare const ENUMERATED_OUTPUT_PLUGIN_HOOK_NAMES: readonly ["augmentChunkHash", "outputOptions", "renderChunk", "renderStart", "renderError", "writeBundle", "generateBundle"]; export declare const ENUMERATED_PLUGIN_HOOK_NAMES: [ ...typeof ENUMERATED_INPUT_PLUGIN_HOOK_NAMES, ...typeof ENUMERATED_OUTPUT_PLUGIN_HOOK_NAMES, 'footer', 'banner', 'intro', 'outro' ]; /** * Names of all properties in a `Plugin` object. Includes `name` and `api`. */ export type PluginProps = keyof Plugin; type EnumeratedPluginHookNames = typeof ENUMERATED_PLUGIN_HOOK_NAMES; /** * Names of all hooks in a `Plugin` object. Does not include `name` and `api`, since they are not hooks. */ export type PluginHookNames = EnumeratedPluginHookNames[number]; /** * Names of all defined hooks. It's like * ```ts * type DefinedHookNames = { * options: 'options', * buildStart: 'buildStart', * ... * } * ``` */ export type DefinedHookNames = { readonly [K in PluginHookNames]: K; }; /** * Names of all defined hooks. It's like * ```js * const DEFINED_HOOK_NAMES ={ * options: 'options', * buildStart: 'buildStart', * ... * } * ``` */ export declare const DEFINED_HOOK_NAMES: DefinedHookNames; export {};