@vope/utils 1.4.11 → 1.4.12

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/cjs/index.js CHANGED
@@ -690,12 +690,12 @@ var Union = class {
690
690
  /**
691
691
  * 从已有的联合中拷贝数据
692
692
  */
693
- clone(union, key) {
694
- const { data, options } = union;
693
+ clone(target, key) {
694
+ const { data, options } = target;
695
695
  const keys = Array.isArray(key) ? key : [key];
696
696
  keys.forEach((key2) => {
697
697
  if (key2 in data) {
698
- this.#raws[key2] = union.getRaw(key2);
698
+ this.#raws[key2] = target.getRaw(key2);
699
699
  this.#data[key2] = data[key2];
700
700
  this.#options[key2] = options[key2];
701
701
  }
package/lib/union.js CHANGED
@@ -29,12 +29,12 @@ class Union {
29
29
  /**
30
30
  * 从已有的联合中拷贝数据
31
31
  */
32
- clone(union, key) {
33
- const { data, options } = union;
32
+ clone(target, key) {
33
+ const { data, options } = target;
34
34
  const keys = Array.isArray(key) ? key : [key];
35
35
  keys.forEach((key2) => {
36
36
  if (key2 in data) {
37
- this.#raws[key2] = union.getRaw(key2);
37
+ this.#raws[key2] = target.getRaw(key2);
38
38
  this.#data[key2] = data[key2];
39
39
  this.#options[key2] = options[key2];
40
40
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vope/utils",
3
- "version": "1.4.11",
3
+ "version": "1.4.12",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "publishConfig": {
package/types/union.d.ts CHANGED
@@ -29,6 +29,6 @@ export declare class Union<Primary extends string, Member extends string, Origin
29
29
  /**
30
30
  * 从已有的联合中拷贝数据
31
31
  */
32
- clone<T extends Union<Primary, string, Origin, Data, Option>, P extends GetStatus<T> & Member>(union: T, key: P | P[]): Union<Primary, Member, Origin, Data, Option, Status | P> & Omit<this, keyof Union<Primary, Member, Origin, Data, Option, Status | P>>;
32
+ clone<T extends Union<Primary, string, Origin, Data, Option>, const P extends Exclude<GetStatus<T> & Member, Status>>(target: T, key: P | P[]): Union<Primary, Member, Origin, Data, Option, Status | P> & Omit<this, keyof Union<Primary, Member, Origin, Data, Option, Status | P>>;
33
33
  }
34
34
  export {};