@rollup/browser 4.21.0 → 4.21.2

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.
@@ -211,9 +211,7 @@ interface ModuleInfo extends ModuleOptions {
211
211
 
212
212
  export type GetModuleInfo = (moduleId: string) => ModuleInfo | null;
213
213
 
214
- export interface CustomPluginOptions {
215
- [plugin: string]: any;
216
- }
214
+ export type CustomPluginOptions = Record<string, any>;
217
215
 
218
216
  type LoggingFunctionWithPosition = (
219
217
  log: RollupLog | string | (() => RollupLog | string),
@@ -276,9 +274,7 @@ export interface ResolvedId extends ModuleOptions {
276
274
  resolvedBy: string;
277
275
  }
278
276
 
279
- export interface ResolvedIdMap {
280
- [key: string]: ResolvedId;
281
- }
277
+ export type ResolvedIdMap = Record<string, ResolvedId>;
282
278
 
283
279
  interface PartialResolvedId extends Partial<PartialNull<ModuleOptions>> {
284
280
  external?: boolean | 'absolute' | 'relative';
@@ -398,9 +394,7 @@ export type WatchChangeHook = (
398
394
  */
399
395
  export type PluginImpl<O extends object = object, A = any> = (options?: O) => Plugin<A>;
400
396
 
401
- export interface OutputBundle {
402
- [fileName: string]: OutputAsset | OutputChunk;
403
- }
397
+ export type OutputBundle = Record<string, OutputAsset | OutputChunk>;
404
398
 
405
399
  export interface FunctionPluginHooks {
406
400
  augmentChunkHash: (this: PluginContext, chunk: RenderedChunk) => string | void;
@@ -559,11 +553,11 @@ export type ExternalOption =
559
553
  | RegExp
560
554
  | ((source: string, importer: string | undefined, isResolved: boolean) => boolean | NullValue);
561
555
 
562
- export type GlobalsOption = { [name: string]: string } | ((name: string) => string);
556
+ export type GlobalsOption = Record<string, string> | ((name: string) => string);
563
557
 
564
- export type InputOption = string | string[] | { [entryAlias: string]: string };
558
+ export type InputOption = string | string[] | Record<string, string>;
565
559
 
566
- export type ManualChunksOption = { [chunkAlias: string]: string[] } | GetManualChunk;
560
+ export type ManualChunksOption = Record<string, string[]> | GetManualChunk;
567
561
 
568
562
  export type LogHandlerWithDefault = (
569
563
  level: LogLevel,
@@ -601,7 +595,7 @@ export interface InputOptions {
601
595
  logLevel?: LogLevelOption;
602
596
  makeAbsoluteExternalsRelative?: boolean | 'ifRelativeSource';
603
597
  maxParallelFileOps?: number;
604
- moduleContext?: ((id: string) => string | NullValue) | { [id: string]: string };
598
+ moduleContext?: ((id: string) => string | NullValue) | Record<string, string>;
605
599
  onLog?: LogHandlerWithDefault;
606
600
  onwarn?: WarningHandlerWithDefault;
607
601
  perf?: boolean;
@@ -624,7 +618,7 @@ export interface NormalizedInputOptions {
624
618
  experimentalCacheExpiry: number;
625
619
  experimentalLogSideEffects: boolean;
626
620
  external: IsExternal;
627
- input: string[] | { [entryAlias: string]: string };
621
+ input: string[] | Record<string, string>;
628
622
  logLevel: LogLevelOption;
629
623
  makeAbsoluteExternalsRelative: boolean | 'ifRelativeSource';
630
624
  maxParallelFileOps: number;
@@ -818,9 +812,7 @@ export type WarningHandlerWithDefault = (
818
812
  defaultHandler: LoggingFunction
819
813
  ) => void;
820
814
 
821
- export interface SerializedTimings {
822
- [label: string]: [number, number, number];
823
- }
815
+ export type SerializedTimings = Record<string, [number, number, number]>;
824
816
 
825
817
  export interface PreRenderedAsset {
826
818
  name: string | undefined;
@@ -857,13 +849,9 @@ export interface RenderedChunk extends PreRenderedChunk {
857
849
  dynamicImports: string[];
858
850
  fileName: string;
859
851
  implicitlyLoadedBefore: string[];
860
- importedBindings: {
861
- [imported: string]: string[];
862
- };
852
+ importedBindings: Record<string, string[]>;
863
853
  imports: string[];
864
- modules: {
865
- [id: string]: RenderedModule;
866
- };
854
+ modules: Record<string, RenderedModule>;
867
855
  referencedFiles: string[];
868
856
  }
869
857
 
@@ -874,9 +862,7 @@ export interface OutputChunk extends RenderedChunk {
874
862
  preliminaryFileName: string;
875
863
  }
876
864
 
877
- export interface SerializablePluginCache {
878
- [key: string]: [number, any];
879
- }
865
+ export type SerializablePluginCache = Record<string, [number, any]>;
880
866
 
881
867
  export interface RollupCache {
882
868
  modules: ModuleJSON[];
@@ -948,11 +934,11 @@ export interface RollupWatchOptions extends InputOptions {
948
934
  }
949
935
 
950
936
  export type AwaitedEventListener<
951
- T extends { [event: string]: (...parameters: any) => any },
937
+ T extends Record<string, (...parameters: any) => any>,
952
938
  K extends keyof T
953
939
  > = (...parameters: Parameters<T[K]>) => void | Promise<void>;
954
940
 
955
- export interface AwaitingEventEmitter<T extends { [event: string]: (...parameters: any) => any }> {
941
+ export interface AwaitingEventEmitter<T extends Record<string, (...parameters: any) => any>> {
956
942
  close(): Promise<void>;
957
943
  emit<K extends keyof T>(event: K, ...parameters: Parameters<T[K]>): Promise<unknown>;
958
944
  /**