@meng-xi/vite-plugin 0.0.2 → 0.0.4

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.
Files changed (45) hide show
  1. package/README-en.md +37 -23
  2. package/README.md +64 -5
  3. package/dist/common/index.cjs +1 -0
  4. package/dist/common/index.d.cts +235 -0
  5. package/dist/common/index.d.mts +235 -0
  6. package/dist/common/index.d.ts +235 -0
  7. package/dist/common/index.mjs +1 -0
  8. package/dist/factory/index.cjs +1 -0
  9. package/dist/factory/index.d.cts +260 -0
  10. package/dist/factory/index.d.mts +260 -0
  11. package/dist/factory/index.d.ts +260 -0
  12. package/dist/factory/index.mjs +1 -0
  13. package/dist/index.cjs +1 -5
  14. package/dist/index.d.cts +7 -241
  15. package/dist/index.d.mts +7 -241
  16. package/dist/index.d.ts +7 -241
  17. package/dist/index.mjs +1 -5
  18. package/dist/logger/index.cjs +1 -0
  19. package/dist/logger/index.d.cts +1 -0
  20. package/dist/logger/index.d.mts +1 -0
  21. package/dist/logger/index.d.ts +1 -0
  22. package/dist/logger/index.mjs +1 -0
  23. package/dist/plugins/index.cjs +1 -0
  24. package/dist/plugins/index.d.cts +375 -0
  25. package/dist/plugins/index.d.mts +375 -0
  26. package/dist/plugins/index.d.ts +375 -0
  27. package/dist/plugins/index.mjs +1 -0
  28. package/dist/shared/vite-plugin.B3PARlU9.d.cts +119 -0
  29. package/dist/shared/vite-plugin.B3PARlU9.d.mts +119 -0
  30. package/dist/shared/vite-plugin.B3PARlU9.d.ts +119 -0
  31. package/dist/shared/vite-plugin.B88RyRN8.mjs +3 -0
  32. package/dist/shared/vite-plugin.C7isVPKg.mjs +1 -0
  33. package/dist/shared/vite-plugin.CiHfwMiN.d.cts +91 -0
  34. package/dist/shared/vite-plugin.CiHfwMiN.d.mts +91 -0
  35. package/dist/shared/vite-plugin.CiHfwMiN.d.ts +91 -0
  36. package/dist/shared/vite-plugin.D6NYITpX.cjs +1 -0
  37. package/dist/shared/vite-plugin.D8HTI0Ni.cjs +2 -0
  38. package/dist/shared/vite-plugin.Dd2ogbSe.mjs +2 -0
  39. package/dist/shared/vite-plugin.DqWt65U-.cjs +1 -0
  40. package/dist/shared/vite-plugin.HZb-1B5l.mjs +1 -0
  41. package/dist/shared/vite-plugin.IGZeStMa.cjs +3 -0
  42. package/dist/shared/vite-plugin.UkE7CdSe.d.cts +43 -0
  43. package/dist/shared/vite-plugin.UkE7CdSe.d.mts +43 -0
  44. package/dist/shared/vite-plugin.UkE7CdSe.d.ts +43 -0
  45. package/package.json +24 -5
@@ -0,0 +1,235 @@
1
+ export { V as Validator } from '../shared/vite-plugin.CiHfwMiN.js';
2
+
3
+ /**
4
+ * 复制操作的选项接口
5
+ */
6
+ interface CopyOptions {
7
+ /**
8
+ * 是否支持递归复制
9
+ */
10
+ recursive: boolean;
11
+ /**
12
+ * 是否覆盖同名文件
13
+ */
14
+ overwrite: boolean;
15
+ /**
16
+ * 是否启用增量复制
17
+ */
18
+ incremental?: boolean;
19
+ /**
20
+ * 并行处理的最大文件数
21
+ */
22
+ parallelLimit?: number;
23
+ /**
24
+ * 是否跳过空目录
25
+ */
26
+ skipEmptyDirs?: boolean;
27
+ }
28
+ /**
29
+ * 复制结果接口
30
+ */
31
+ interface CopyResult {
32
+ /**
33
+ * 复制的文件数量
34
+ */
35
+ copiedFiles: number;
36
+ /**
37
+ * 跳过的文件数量
38
+ */
39
+ skippedFiles: number;
40
+ /**
41
+ * 复制的目录数量
42
+ */
43
+ copiedDirs: number;
44
+ /**
45
+ * 总执行时间(毫秒)
46
+ */
47
+ executionTime: number;
48
+ }
49
+
50
+ /**
51
+ * 文件/目录条目信息
52
+ */
53
+ interface FileEntry {
54
+ /** 完整路径 */
55
+ path: string;
56
+ /** 是否为文件 */
57
+ isFile: boolean;
58
+ /** 是否为目录 */
59
+ isDirectory: boolean;
60
+ }
61
+ /**
62
+ * 检查源文件是否存在
63
+ * @param sourcePath 源文件路径
64
+ * @throws 当源文件不存在或无法访问时抛出异常
65
+ */
66
+ declare function checkSourceExists(sourcePath: string): Promise<void>;
67
+ /**
68
+ * 创建目标目录
69
+ * @param targetPath 目标目录路径
70
+ * @throws 当无法创建目标目录时抛出异常
71
+ */
72
+ declare function ensureTargetDir(targetPath: string): Promise<void>;
73
+ /**
74
+ * 读取目录内容(优化版:一次性获取文件类型信息)
75
+ * @param dirPath 目录路径
76
+ * @param recursive 是否递归读取
77
+ * @returns 文件和目录条目列表
78
+ */
79
+ declare function readDirRecursive(dirPath: string, recursive: boolean): Promise<FileEntry[]>;
80
+ /**
81
+ * 检查文件是否需要更新
82
+ * @param sourceFile 源文件路径
83
+ * @param targetFile 目标文件路径
84
+ * @returns 是否需要更新
85
+ */
86
+ declare function shouldUpdateFile(sourceFile: string, targetFile: string): Promise<boolean>;
87
+ /**
88
+ * 执行文件复制操作(优化版:并行IO)
89
+ * @param sourcePath 源文件或目录路径
90
+ * @param targetPath 目标文件或目录路径
91
+ * @param options 复制选项
92
+ * @returns 复制结果
93
+ * @throws 当复制过程中出现错误时抛出异常
94
+ */
95
+ declare function copySourceToTarget(sourcePath: string, targetPath: string, options: CopyOptions): Promise<CopyResult>;
96
+ /**
97
+ * 写入文件内容
98
+ * @param filePath 文件路径
99
+ * @param content 文件内容
100
+ * @throws 当写入过程中出现错误时抛出异常
101
+ */
102
+ declare function writeFileContent(filePath: string, content: string): Promise<void>;
103
+ /**
104
+ * 同步读取文件内容
105
+ * @param filePath 文件路径
106
+ * @returns 文件内容字符串
107
+ * @throws 当读取过程中出现错误时抛出异常
108
+ */
109
+ declare function readFileSync(filePath: string): string;
110
+
111
+ /**
112
+ * 数字补零格式化
113
+ *
114
+ * @param num 要格式化的数字
115
+ * @param length 目标长度
116
+ * @returns 补零后的字符串
117
+ *
118
+ * @example
119
+ * ```typescript
120
+ * padNumber(5, 2) // '05'
121
+ * padNumber(12, 3) // '012'
122
+ * padNumber(123, 2) // '123'
123
+ * ```
124
+ */
125
+ declare function padNumber(num: number, length?: number): string;
126
+ /**
127
+ * 生成随机哈希字符串
128
+ *
129
+ * @param length 哈希长度,范围 1-64
130
+ * @returns 随机哈希字符串
131
+ *
132
+ * @example
133
+ * ```typescript
134
+ * generateRandomHash(8) // 'a1b2c3d4'
135
+ * generateRandomHash(16) // 'a1b2c3d4e5f6g7h8'
136
+ * ```
137
+ */
138
+ declare function generateRandomHash(length?: number): string;
139
+ /**
140
+ * 日期格式化选项
141
+ */
142
+ interface DateFormatOptions {
143
+ /** 四位年份 */
144
+ YYYY: string;
145
+ /** 两位年份 */
146
+ YY: string;
147
+ /** 两位月份 */
148
+ MM: string;
149
+ /** 两位日期 */
150
+ DD: string;
151
+ /** 两位小时(24小时制) */
152
+ HH: string;
153
+ /** 两位分钟 */
154
+ mm: string;
155
+ /** 两位秒数 */
156
+ ss: string;
157
+ /** 三位毫秒 */
158
+ SSS: string;
159
+ /** 时间戳(毫秒) */
160
+ timestamp: string;
161
+ }
162
+ /**
163
+ * 获取日期格式化参数
164
+ *
165
+ * @param date 日期对象
166
+ * @returns 日期格式化参数对象
167
+ *
168
+ * @example
169
+ * ```typescript
170
+ * const params = getDateFormatParams(new Date())
171
+ * // { YYYY: '2026', MM: '02', DD: '03', HH: '15', mm: '30', ss: '00', ... }
172
+ * ```
173
+ */
174
+ declare function getDateFormatParams(date?: Date): DateFormatOptions;
175
+ /**
176
+ * 格式化日期
177
+ *
178
+ * @param date 日期对象
179
+ * @param format 格式模板
180
+ * @returns 格式化后的日期字符串
181
+ *
182
+ * @example
183
+ * ```typescript
184
+ * formatDate(new Date(), '{YYYY}-{MM}-{DD}') // '2026-02-03'
185
+ * formatDate(new Date(), '{YYYY}{MM}{DD}{HH}{mm}{ss}') // '20260203153000'
186
+ * formatDate(new Date(), '{YYYY}.{MM}.{DD}') // '2026.02.03'
187
+ * ```
188
+ */
189
+ declare function formatDate(date: Date, format: string): string;
190
+ /**
191
+ * 解析模板字符串,替换占位符
192
+ *
193
+ * @param template 模板字符串
194
+ * @param values 占位符值映射
195
+ * @returns 替换后的字符串
196
+ *
197
+ * @example
198
+ * ```typescript
199
+ * parseTemplate('{name}-{version}', { name: 'app', version: '1.0.0' })
200
+ * // 'app-1.0.0'
201
+ * ```
202
+ */
203
+ declare function parseTemplate(template: string, values: Record<string, string>): string;
204
+
205
+ /**
206
+ * 深度合并对象
207
+ *
208
+ * @description 将多个源对象深度合并到一个新对象中。
209
+ * - undefined 值会被跳过,不会覆盖已有值
210
+ * - 嵌套对象会递归合并
211
+ * - 数组会直接覆盖,不会合并
212
+ * - null 值会覆盖已有值
213
+ *
214
+ * @param sources 源对象列表
215
+ * @returns 合并后的对象
216
+ *
217
+ * @example
218
+ * ```typescript
219
+ * // 基本合并
220
+ * deepMerge({ a: 1 }, { b: 2 }) // { a: 1, b: 2 }
221
+ *
222
+ * // undefined 不覆盖
223
+ * deepMerge({ a: 1 }, { a: undefined }) // { a: 1 }
224
+ *
225
+ * // 嵌套对象合并
226
+ * deepMerge({ a: { b: 1 } }, { a: { c: 2 } }) // { a: { b: 1, c: 2 } }
227
+ *
228
+ * // 数组覆盖
229
+ * deepMerge({ a: [1, 2] }, { a: [3, 4] }) // { a: [3, 4] }
230
+ * ```
231
+ */
232
+ declare function deepMerge<T extends Record<string, any>>(...sources: Partial<T>[]): T;
233
+
234
+ export { checkSourceExists, copySourceToTarget, deepMerge, ensureTargetDir, formatDate, generateRandomHash, getDateFormatParams, padNumber, parseTemplate, readDirRecursive, readFileSync, shouldUpdateFile, writeFileContent };
235
+ export type { DateFormatOptions };
@@ -0,0 +1 @@
1
+ export{c as checkSourceExists,a as copySourceToTarget,e as ensureTargetDir,f as formatDate,g as generateRandomHash,b as getDateFormatParams,p as padNumber,d as parseTemplate,r as readDirRecursive,h as readFileSync,s as shouldUpdateFile,w as writeFileContent}from"../shared/vite-plugin.HZb-1B5l.mjs";export{V as Validator,d as deepMerge}from"../shared/vite-plugin.B88RyRN8.mjs";import"fs";import"path";import"crypto";
@@ -0,0 +1 @@
1
+ "use strict";const index=require("../shared/vite-plugin.DqWt65U-.cjs");require("../logger/index.cjs"),require("fs"),require("path"),require("crypto"),require("../shared/vite-plugin.IGZeStMa.cjs"),exports.BasePlugin=index.BasePlugin,exports.createPluginFactory=index.createPluginFactory;
@@ -0,0 +1,260 @@
1
+ import { ResolvedConfig, Plugin } from 'vite';
2
+ import { B as BasePluginOptions, O as OptionsNormalizer, P as PluginFactory } from '../shared/vite-plugin.UkE7CdSe.cjs';
3
+ import { P as PluginLogger, a as LoggerOptions } from '../shared/vite-plugin.B3PARlU9.cjs';
4
+ import { V as Validator } from '../shared/vite-plugin.CiHfwMiN.cjs';
5
+
6
+ /**
7
+ * 基础插件抽象类,提供插件开发的核心功能和生命周期管理
8
+ *
9
+ * @class BasePlugin
10
+ * @template T - 插件配置类型,必须继承自 BasePluginOptions
11
+ * @abstract
12
+ * @description 该类是所有插件的基类,提供了插件配置管理、日志记录、生命周期管理等核心功能
13
+ * @example
14
+ * ```typescript
15
+ * class MyPlugin extends BasePlugin<MyPluginOptions> {
16
+ * protected getPluginName() {
17
+ * return 'my-plugin'
18
+ * }
19
+ *
20
+ * protected addPluginHooks(plugin: Plugin) {
21
+ * // 添加插件钩子
22
+ * }
23
+ * }
24
+ * ```
25
+ */
26
+ declare abstract class BasePlugin<T extends BasePluginOptions = BasePluginOptions> {
27
+ /**
28
+ * 插件配置
29
+ *
30
+ * @protected
31
+ * @description 插件配置,包含插件的运行参数和选项
32
+ */
33
+ protected options: Required<T>;
34
+ /**
35
+ * 插件日志记录器
36
+ *
37
+ * @protected
38
+ * @description 插件日志记录器,用于记录插件运行时的日志信息
39
+ */
40
+ protected logger: PluginLogger;
41
+ /**
42
+ * 插件配置验证器
43
+ *
44
+ * @protected
45
+ * @description 插件配置验证器,用于验证插件配置参数是否符合要求
46
+ */
47
+ protected validator: Validator<T>;
48
+ /**
49
+ * Vite 配置
50
+ *
51
+ * @protected
52
+ * @description Vite 配置,包含 Vite 构建的运行参数和选项
53
+ */
54
+ protected viteConfig: ResolvedConfig | null;
55
+ /**
56
+ * 插件构造函数
57
+ *
58
+ * @param options 插件配置
59
+ * @param loggerConfig 日志配置,可选
60
+ *
61
+ * @protected
62
+ * @description 插件构造函数,初始化插件配置、日志记录器和验证插件参数
63
+ */
64
+ constructor(options: T, loggerConfig?: LoggerOptions);
65
+ /**
66
+ * 获取插件的默认配置选项
67
+ *
68
+ * @protected
69
+ * @abstract
70
+ * @returns {Partial<T>} 插件特定的默认配置
71
+ * @description 子类必须实现此方法,以提供插件特定的默认配置值
72
+ */
73
+ protected abstract getDefaultOptions(): Partial<T>;
74
+ /**
75
+ * 合并插件配置,将用户提供的配置与默认配置合并
76
+ *
77
+ * @protected
78
+ * @template T - 插件配置类型,必须继承自 BasePluginOptions
79
+ * @param {T} options - 用户提供的插件配置
80
+ * @returns {Required<T>} 合并后的完整插件配置,包含所有必填字段
81
+ * @description 将用户提供的配置与基础默认值、插件特定默认值进行深度合并,确保所有必填字段都有值
82
+ * @example
83
+ * ```typescript
84
+ * const userOptions = { enabled: false }
85
+ * const mergedOptions = this.mergeOptions(userOptions)
86
+ * // mergedOptions 将包含基础默认值和插件特定默认值
87
+ * ```
88
+ */
89
+ protected mergeOptions(options: T): Required<T>;
90
+ /**
91
+ * 初始化日志记录器
92
+ *
93
+ * @private
94
+ * @param {LoggerOptions} loggerConfig - 日志配置对象,可选
95
+ * @returns {PluginLogger} 插件日志代理对象,用于记录插件日志
96
+ * @description 使用单例 Logger 创建插件特定的日志代理对象
97
+ */
98
+ private initLogger;
99
+ /**
100
+ * 验证插件配置参数,确保配置符合要求
101
+ *
102
+ * @protected
103
+ * @virtual
104
+ * @returns {void} 无返回值
105
+ * @throws {Error} 如果配置参数无效,抛出包含错误信息的异常
106
+ * @description 该方法在插件初始化时被调用,用于验证插件配置的有效性。子类可以重写此方法以添加自定义验证逻辑
107
+ * @example
108
+ * ```typescript
109
+ * protected validateOptions(): void {
110
+ * if (!this.options.sourceDir) {
111
+ * throw new Error('sourceDir 是必填项')
112
+ * }
113
+ *
114
+ * if (!this.options.targetDir) {
115
+ * throw new Error('targetDir 是必填项')
116
+ * }
117
+ * }
118
+ * ```
119
+ */
120
+ protected validateOptions(): void;
121
+ /**
122
+ * 获取插件名称
123
+ *
124
+ * @protected
125
+ * @returns {string} 插件的名称,用于 Vite 插件系统识别
126
+ */
127
+ protected abstract getPluginName(): string;
128
+ /**
129
+ * 获取插件执行时机
130
+ *
131
+ * @protected
132
+ * @returns {Plugin['enforce']} 插件的执行时机,可选值为 'pre'、'post' 或 undefined
133
+ * @description 'post' 表示插件在 Vite 构建后期执行
134
+ */
135
+ protected getEnforce(): Plugin['enforce'];
136
+ /**
137
+ * 处理配置解析完成事件
138
+ *
139
+ * @param config 解析后的 Vite 配置
140
+ *
141
+ * @protected
142
+ * @description 处理 Vite 配置解析完成事件,将解析后的配置存储到插件实例中
143
+ */
144
+ protected onConfigResolved(config: ResolvedConfig): void;
145
+ /**
146
+ * 添加插件钩子到 Vite 插件对象
147
+ *
148
+ * @protected
149
+ * @abstract
150
+ * @param {Plugin} plugin - Vite 插件对象,用于添加钩子
151
+ * @returns {void} 无返回值
152
+ * @description 添加插件钩子到 Vite 插件对象,用于在构建过程中执行插件逻辑
153
+ */
154
+ protected abstract addPluginHooks(plugin: Plugin): void;
155
+ /**
156
+ * 安全执行同步函数,自动处理执行过程中可能出现的错误
157
+ *
158
+ * @protected
159
+ * @template T - 函数的返回值类型
160
+ * @param {() => T} fn - 要执行的同步函数
161
+ * @param {string} context - 执行上下文描述,用于错误日志记录
162
+ * @returns {T | undefined} 函数的执行结果,如果执行过程中发生错误,根据错误策略返回 undefined 或抛出错误
163
+ * @description 该方法封装了同步函数的执行,自动处理可能出现的错误,根据插件配置的 errorStrategy 决定如何处理错误
164
+ * @example
165
+ * ```typescript
166
+ * // 安全执行同步操作
167
+ * const result = this.safeExecuteSync(() => {
168
+ * return someSyncOperation()
169
+ * }, '执行同步操作')
170
+ *
171
+ * // 如果 someSyncOperation() 抛出错误,会根据 errorStrategy 处理
172
+ * ```
173
+ */
174
+ protected safeExecuteSync<T>(fn: () => T, context: string): T | undefined;
175
+ /**
176
+ * 安全执行异步函数,自动处理执行过程中可能出现的错误
177
+ *
178
+ * @protected
179
+ * @async
180
+ * @template T - 异步函数的返回值类型
181
+ * @param {() => Promise<T>} fn - 要执行的异步函数
182
+ * @param {string} context - 执行上下文描述,用于错误日志记录
183
+ * @returns {Promise<T | undefined>} 异步函数的执行结果,如果执行过程中发生错误,根据错误策略返回 undefined 或抛出错误
184
+ * @description 该方法封装了异步函数的执行,自动处理可能出现的错误,根据插件配置的 errorStrategy 决定如何处理错误
185
+ * @example
186
+ * ```typescript
187
+ * // 安全执行异步操作
188
+ * const result = await this.safeExecute(async () => {
189
+ * return await someAsyncOperation()
190
+ * }, '执行异步操作')
191
+ *
192
+ * // 如果 someAsyncOperation() 抛出错误,会根据 errorStrategy 处理
193
+ * ```
194
+ */
195
+ protected safeExecute<T>(fn: () => Promise<T>, context: string): Promise<T | undefined>;
196
+ /**
197
+ * 处理插件执行过程中出现的错误,根据配置的错误策略决定如何处理
198
+ *
199
+ * @protected
200
+ * @template T - 返回值类型,仅当错误策略为 'log' 或 'ignore' 时返回 undefined
201
+ * @param {unknown} error - 捕获到的错误对象
202
+ * @param {string} context - 错误发生的上下文描述,用于错误日志记录
203
+ * @returns {T | undefined} 当错误策略为 'log' 或 'ignore' 时返回 undefined,否则抛出错误
204
+ * @description 根据插件配置的 errorStrategy 处理错误:
205
+ * - 'throw': 记录错误日志并抛出错误,中断执行
206
+ * - 'log': 记录错误日志但不抛出错误,继续执行
207
+ * - 'ignore': 记录错误日志但不抛出错误,继续执行
208
+ * - 默认:记录错误日志并抛出错误
209
+ * @example
210
+ * ```typescript
211
+ * // 当 errorStrategy 为 'throw' 时
212
+ * this.handleError(new Error('测试错误'), '测试上下文') // 记录错误日志并抛出错误
213
+ *
214
+ * // 当 errorStrategy 为 'log' 时
215
+ * this.handleError(new Error('测试错误'), '测试上下文') // 记录错误日志并返回 undefined
216
+ * ```
217
+ */
218
+ protected handleError<T>(error: unknown, context: string): T | undefined;
219
+ /**
220
+ * 将插件实例转换为 Vite 插件对象,用于 Vite 构建系统
221
+ *
222
+ * @public
223
+ * @returns {Plugin} Vite 插件对象,包含插件名称、执行时机和各种钩子函数
224
+ * @description 该方法创建并返回一个符合 Vite 插件规范的对象,设置了插件的基本信息和 configResolved 钩子,然后调用 addPluginHooks 方法添加插件特定的钩子
225
+ * @example
226
+ * ```typescript
227
+ * // 创建插件实例
228
+ * const pluginInstance = new MyPlugin(options)
229
+ *
230
+ * // 转换为 Vite 插件
231
+ * const vitePlugin = pluginInstance.toPlugin()
232
+ *
233
+ * // 导出 Vite 插件
234
+ * export const myPlugin = vitePlugin
235
+ * ```
236
+ */
237
+ toPlugin(): Plugin;
238
+ }
239
+ /**
240
+ * 创建插件工厂函数,用于生成 Vite 插件实例
241
+ *
242
+ * @template T - 插件配置类型,必须继承自 BasePluginOptions
243
+ * @template P - 插件实例类型,必须继承自 BasePlugin<T>
244
+ * @template R - 原始配置类型
245
+ * @param {new (options: T, loggerConfig?: LoggerOptions) => P} PluginClass - 插件类构造函数
246
+ * @param {OptionsNormalizer<T, R>} [normalizer] - 选项标准化器,可选
247
+ * @returns {PluginFactory<T, R>} 插件工厂函数,接收插件配置并返回 Vite 插件实例
248
+ * @description 该函数创建一个插件工厂,用于生成 Vite 插件实例。工厂函数接收插件配置,支持可选的标准化器,创建插件实例,转换为 Vite 插件对象,并在插件对象上添加对原始插件实例的引用
249
+ * @example
250
+ * ```typescript
251
+ * // 基本使用
252
+ * const myPluginFactory = createPluginFactory(MyPlugin)
253
+ *
254
+ * // 带标准化器的使用(支持字符串或对象)
255
+ * const myPluginWithNormalizer = createPluginFactory(MyPlugin, (opt) => typeof opt === 'string' ? { path: opt } : opt)
256
+ * ```
257
+ */
258
+ declare function createPluginFactory<T extends BasePluginOptions, P extends BasePlugin<T>, R = T>(PluginClass: new (options: T, loggerConfig?: LoggerOptions) => P, normalizer?: OptionsNormalizer<T, R>): PluginFactory<T, R>;
259
+
260
+ export { BasePlugin, createPluginFactory };