/** * Core plugin logic that all plugins share. * * BasePlugin does not contain DOM rendering so it can be used for plugins * without a user interface. * * See `Plugin` for the extended version with Preact rendering for interfaces. */ import type { Body, I18n, Meta, OptionalPluralizeLocale } from '@uppy/utils'; import { Translator } from '@uppy/utils'; import type { State, UnknownPlugin, Uppy } from './Uppy.js'; export type PluginOpts = { locale?: OptionalPluralizeLocale; id?: string; }; export type OnlyOptionals = Pick ? K : never; }[keyof T]>; /** * DefinePluginOpts marks all of the passed AlwaysDefinedKeys as “required” or “always defined”. */ export type DefinePluginOpts> = Opts & Required>; export default class BasePlugin = Record> { uppy: Uppy; opts: Opts; id: string; defaultLocale: OptionalPluralizeLocale; i18n: I18n; i18nArray: Translator['translateArray']; type: string; VERSION: string; constructor(uppy: Uppy, opts?: Opts); getPluginState(): PluginState; setPluginState(update?: Partial): void; setOptions(newOpts: Partial): void; i18nInit(): void; /** * Extendable methods * ================== * These methods are here to serve as an overview of the extendable methods as well as * making them not conditional in use, such as `if (this.afterUpdate)`. */ addTarget(plugin: UnknownPlugin): HTMLElement | null; install(): void; uninstall(): void; update(state: Partial>): void; afterUpdate(): void; } //# sourceMappingURL=BasePlugin.d.ts.map