@kaumlaut/pure 0.1.12 → 0.1.13

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.
@@ -1,5 +1,5 @@
1
1
  export type Cloneable = string | number | boolean | null | Cloneable[] | {
2
2
  [key: string]: Cloneable;
3
3
  };
4
- export declare function clone(value: Cloneable): Cloneable;
4
+ export declare function clone<T extends Cloneable>(value: T): T;
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/clone/index.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GACf,MAAM,GACN,MAAM,GACN,OAAO,GACP,IAAI,GACJ,SAAS,EAAE,GACX;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAAC;AAEnC,wBAAgB,KAAK,CAAC,KAAK,EAAE,SAAS,GAAG,SAAS,CAiBjD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/clone/index.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GACf,MAAM,GACN,MAAM,GACN,OAAO,GACP,IAAI,GACJ,SAAS,EAAE,GACX;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAAC;AAEnC,wBAAgB,KAAK,CAAC,CAAC,SAAS,SAAS,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAkBtD"}
@@ -8,6 +8,7 @@ export function clone(value) {
8
8
  const clonedObj = {};
9
9
  for (const key in value) {
10
10
  if (Object.prototype.hasOwnProperty.call(value, key)) {
11
+ // @ts-expect-error all good
11
12
  clonedObj[key] = clone(value[key]);
12
13
  }
13
14
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kaumlaut/pure",
3
- "version": "0.1.12",
3
+ "version": "0.1.13",
4
4
  "description": "Types and functions for a state runtime inspired by Elm and functional programming",
5
5
  "author": "Max Kaemmerer",
6
6
  "license": "MIT",