inferred-types 0.49.0 → 0.49.1

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,9 +1,9 @@
1
1
  import { Dictionary, EmptyObject, ObjectKey } from "../base-types";
2
2
  import { ComparatorOperation, Compare } from "../boolean-logic";
3
- import { Keys } from "../dictionary/Keys";
3
+ import { Keys } from "./Keys";
4
4
  import { ExpandDictionary } from "../literals";
5
- import { AfterFirst } from "./AfterFirst";
6
- import { First } from "./First";
5
+ import { AfterFirst } from "../lists/AfterFirst";
6
+ import { First } from "../lists/First";
7
7
  type Process<TObj extends Dictionary, TComparator, TOp extends ComparatorOperation, TKeys extends readonly ObjectKey[], TResult extends Dictionary = EmptyObject> = [] extends TKeys ? ExpandDictionary<TResult> : Process<TObj, TComparator, TOp, AfterFirst<TKeys>, Compare<TObj[First<TKeys>], TOp, TComparator> extends true ? TResult : TResult & Record<First<TKeys>, TObj[First<TKeys>]>>;
8
8
  /**
9
9
  * **FilterProps**`<TObj, TComparator, [TOp]>`
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FilterProps.d.ts","sourceRoot":"","sources":["../../../src/types/dictionary/FilterProps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEvC,KAAK,OAAO,CACZ,IAAI,SAAS,UAAU,EACvB,WAAW,EACX,GAAG,SAAS,mBAAmB,EAC/B,KAAK,SAAS,SAAS,SAAS,EAAE,EAClC,OAAO,SAAS,UAAU,GAAG,WAAW,IACpC,EAAE,SAAS,KAAK,GAClB,gBAAgB,CAAE,OAAO,CAAE,GAC3B,OAAO,CACL,IAAI,EACJ,WAAW,EACX,GAAG,EACH,UAAU,CAAC,KAAK,CAAC,EACjB,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,EAAE,WAAW,CAAC,SAAS,IAAI,GACtD,OAAO,GACP,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CACvD,CAAC;AAEJ;;;;;;;;;GASG;AACH,MAAM,MAAM,WAAW,CACrB,IAAI,SAAS,UAAU,EACvB,WAAW,EACX,GAAG,SAAS,mBAAmB,GAAG,SAAS,IACzC,OAAO,CACT,IAAI,EACJ,WAAW,EACX,GAAG,EACH,IAAI,CAAC,IAAI,CAAC,CACX,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { Dictionary, EmptyObject, ObjectKey } from "../base-types";
2
+ import { ComparatorOperation, Compare } from "../boolean-logic";
3
+ import { Keys } from "./Keys";
4
+ import { ExpandDictionary } from "../literals";
5
+ import { AfterFirst } from "../lists/AfterFirst";
6
+ import { First } from "../lists/First";
7
+ type Process<TObj extends Dictionary, TComparator, TOp extends ComparatorOperation, TKeys extends readonly ObjectKey[], TResult extends Dictionary = EmptyObject> = [] extends TKeys ? ExpandDictionary<TResult> : Process<TObj, TComparator, TOp, AfterFirst<TKeys>, Compare<TObj[First<TKeys>], TOp, TComparator> extends true ? TResult & Record<First<TKeys>, TObj[First<TKeys>]> : TResult>;
8
+ /**
9
+ * **RetainProps**`<TObj, TComparator, [TOp]>`
10
+ *
11
+ * Type utility which targets dictionary objects and _retains_
12
+ * the key/value pairs which _extend_ the type `TComparator`.
13
+ *
14
+ * - by default the comparison operation -- dictated by `TOp` -- is
15
+ * "extends" but you can change the comparison operation to
16
+ * `equals`, `startsWith`, `endsWith`, ...
17
+ */
18
+ export type RetainProps<TObj extends Dictionary, TComparator, TOp extends ComparatorOperation = "extends"> = Process<TObj, TComparator, TOp, Keys<TObj>>;
19
+ export {};
20
+ //# sourceMappingURL=RetainProps.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RetainProps.d.ts","sourceRoot":"","sources":["../../../src/types/dictionary/RetainProps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEvC,KAAK,OAAO,CACV,IAAI,SAAS,UAAU,EACvB,WAAW,EACX,GAAG,SAAS,mBAAmB,EAC/B,KAAK,SAAS,SAAS,SAAS,EAAE,EAClC,OAAO,SAAS,UAAU,GAAG,WAAW,IACtC,EAAE,SAAS,KAAK,GAClB,gBAAgB,CAAE,OAAO,CAAE,GAC3B,OAAO,CACL,IAAI,EACJ,WAAW,EACX,GAAG,EACH,UAAU,CAAC,KAAK,CAAC,EACjB,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,EAAE,WAAW,CAAC,SAAS,IAAI,GACtD,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,GAClD,OAAO,CACZ,CAAC;AAEJ;;;;;;;;;GASG;AACH,MAAM,MAAM,WAAW,CACrB,IAAI,SAAS,UAAU,EACvB,WAAW,EACX,GAAG,SAAS,mBAAmB,GAAG,SAAS,IACzC,OAAO,CACT,IAAI,EACJ,WAAW,EACX,GAAG,EACH,IAAI,CAAC,IAAI,CAAC,CACX,CAAC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -44,4 +44,6 @@ export * from "./MergeKVs";
44
44
  export * from "./TakeProp";
45
45
  export * from "./MakeKeysOptional";
46
46
  export * from "./MakeKeysRequired";
47
+ export * from "./FilterProps";
48
+ export * from "./RetainProps";
47
49
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/dictionary/index.ts"],"names":[],"mappings":"AAMA,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,OAAO,CAAC;AACtB,cAAc,kBAAkB,CAAC;AACjC,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAA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;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAA;AAC1B,cAAc,YAAY,CAAA;AAC1B,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC"}
@@ -49,6 +49,8 @@ export * from "./MergeKVs.js";
49
49
  export * from "./TakeProp.js";
50
50
  export * from "./MakeKeysOptional.js";
51
51
  export * from "./MakeKeysRequired.js";
52
+ export * from "./FilterProps.js";
53
+ export * from "./RetainProps.js";
52
54
  // #endregion auto-indexed files
53
55
  // see https://github.com/inocan-group/do-devops/docs/autoindex.md
54
56
  // for more info