@rollup/browser 4.35.0 → 4.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/rollup.browser.d.ts
CHANGED
|
@@ -190,7 +190,7 @@ export type EmittedFile = EmittedAsset | EmittedChunk | EmittedPrebuiltChunk;
|
|
|
190
190
|
|
|
191
191
|
export type EmitFile = (emittedFile: EmittedFile) => string;
|
|
192
192
|
|
|
193
|
-
interface ModuleInfo extends ModuleOptions {
|
|
193
|
+
export interface ModuleInfo extends ModuleOptions {
|
|
194
194
|
ast: ProgramNode | null;
|
|
195
195
|
code: string | null;
|
|
196
196
|
dynamicImporters: readonly string[];
|
|
@@ -280,7 +280,7 @@ export interface ResolvedId extends ModuleOptions {
|
|
|
280
280
|
|
|
281
281
|
export type ResolvedIdMap = Record<string, ResolvedId>;
|
|
282
282
|
|
|
283
|
-
interface PartialResolvedId extends Partial<PartialNull<ModuleOptions>> {
|
|
283
|
+
export interface PartialResolvedId extends Partial<PartialNull<ModuleOptions>> {
|
|
284
284
|
external?: boolean | 'absolute' | 'relative';
|
|
285
285
|
id: string;
|
|
286
286
|
resolvedBy?: string;
|
|
@@ -400,6 +400,23 @@ export type PluginImpl<O extends object = object, A = any> = (options?: O) => Pl
|
|
|
400
400
|
|
|
401
401
|
export type OutputBundle = Record<string, OutputAsset | OutputChunk>;
|
|
402
402
|
|
|
403
|
+
export type PreRenderedChunkWithFileName = PreRenderedChunk & { fileName: string };
|
|
404
|
+
|
|
405
|
+
export interface ImportedInternalChunk {
|
|
406
|
+
type: 'internal';
|
|
407
|
+
fileName: string;
|
|
408
|
+
resolvedImportPath: string;
|
|
409
|
+
chunk: PreRenderedChunk;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
export interface ImportedExternalChunk {
|
|
413
|
+
type: 'external';
|
|
414
|
+
fileName: string;
|
|
415
|
+
resolvedImportPath: string;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
export type DynamicImportTargetChunk = ImportedInternalChunk | ImportedExternalChunk;
|
|
419
|
+
|
|
403
420
|
export interface FunctionPluginHooks {
|
|
404
421
|
augmentChunkHash: (this: PluginContext, chunk: RenderedChunk) => string | void;
|
|
405
422
|
buildEnd: (this: PluginContext, error?: Error) => void;
|
|
@@ -425,6 +442,9 @@ export interface FunctionPluginHooks {
|
|
|
425
442
|
format: InternalModuleFormat;
|
|
426
443
|
moduleId: string;
|
|
427
444
|
targetModuleId: string | null;
|
|
445
|
+
chunk: PreRenderedChunkWithFileName;
|
|
446
|
+
targetChunk: PreRenderedChunkWithFileName | null;
|
|
447
|
+
getTargetChunkImports: () => DynamicImportTargetChunk[] | null;
|
|
428
448
|
}
|
|
429
449
|
) => { left: string; right: string } | NullValue;
|
|
430
450
|
renderError: (this: PluginContext, error?: Error) => void;
|
|
@@ -504,7 +524,7 @@ type MakeAsync<Function_> = Function_ extends (
|
|
|
504
524
|
: never;
|
|
505
525
|
|
|
506
526
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
507
|
-
type ObjectHook<T, O = {}> = T | ({ handler: T; order?: 'pre' | 'post' | null } & O);
|
|
527
|
+
export type ObjectHook<T, O = {}> = T | ({ handler: T; order?: 'pre' | 'post' | null } & O);
|
|
508
528
|
|
|
509
529
|
export type PluginHooks = {
|
|
510
530
|
[K in keyof FunctionPluginHooks]: ObjectHook<
|