@rickard.antonsson/ts-utility 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.
@@ -1,3 +1,4 @@
1
1
  export * from './functions';
2
+ export * from './types';
2
3
  export { List } from './interfaces/list';
3
4
  export { deepPartialSet } from './functions/other/deep-partial-set';
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  exports.deepPartialSet = void 0;
18
18
  __exportStar(require("./functions"), exports);
19
+ __exportStar(require("./types"), exports);
19
20
  var deep_partial_set_1 = require("./functions/other/deep-partial-set");
20
21
  Object.defineProperty(exports, "deepPartialSet", { enumerable: true, get: function () { return deep_partial_set_1.deepPartialSet; } });
21
22
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,8CAA4B;AAE5B,uEAAkE;AAA1D,kHAAA,cAAc,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,0CAAwB;AAExB,uEAAkE;AAA1D,kHAAA,cAAc,OAAA"}
@@ -0,0 +1,12 @@
1
+ export type AnyObject = Record<PropertyKey, any>;
2
+ export type Fn<Args extends unknown[], RetType = unknown> = (...args: Args) => RetType;
3
+ export type AnyFn = Fn<any[], any>;
4
+ export type DeepPartial<T extends AnyObject> = {
5
+ [P in keyof T]?: T[P] extends AnyObject ? DeepPartial<T[P]> : T[P];
6
+ };
7
+ export type DeepPartialOrFn<T extends AnyObject> = {
8
+ [P in keyof T]?: T[P] extends AnyObject ? T[P] extends unknown[] ? Fn<[T[P]], T[P]> | T[P] : DeepPartialOrFn<T[P]> : Fn<[T[P]], T[P]> | T[P];
9
+ };
10
+ export type NoExtras<A extends AnyObject, B extends AnyObject> = {
11
+ [K in keyof B]: K extends keyof A ? A[K] : never;
12
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rickard.antonsson/ts-utility",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "",
5
5
  "main": "build/src/index.js",
6
6
  "types": "build/src/index.d.ts",