@jckj/dict 1.0.2 → 1.0.3
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/index.d.ts +8 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -71,3 +71,11 @@ export declare class Dict<T extends DictData = DictData> {
|
|
|
71
71
|
*/
|
|
72
72
|
includes<V extends StrNum>(value: NoInfer<V>, values: readonly V[]): boolean;
|
|
73
73
|
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* 创建字典的工厂函数
|
|
77
|
+
* @template T - 字典数据类型,必须符合DictData接口
|
|
78
|
+
* @param data - 字典数据对象
|
|
79
|
+
* @returns 字典实例
|
|
80
|
+
*/
|
|
81
|
+
export declare function createDictFactory<T extends DictData>(data: T): Dict<T>;
|