inferred-types 0.45.0 → 0.45.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/dist/constants/Characters.d.ts +2 -0
- package/dist/constants/Characters.d.ts.map +1 -0
- package/dist/constants/Characters.js +5 -0
- package/dist/constants/NetworkConstants.d.ts.map +1 -1
- package/dist/constants/Phone.d.ts +8 -0
- package/dist/constants/Phone.d.ts.map +1 -0
- package/dist/constants/Phone.js +262 -0
- package/dist/constants/ProxmoxConstants.d.ts +2 -0
- package/dist/constants/ProxmoxConstants.d.ts.map +1 -0
- package/dist/constants/ProxmoxConstants.js +3 -0
- package/dist/constants/index.d.ts +3 -0
- package/dist/constants/index.d.ts.map +1 -1
- package/dist/constants/index.js +3 -0
- package/dist/constants/tsconfig.tsbuildinfo +1 -1
- package/dist/inferred-types/index.cjs +1091 -733
- package/dist/inferred-types/tsconfig.tsbuildinfo +1 -1
- package/dist/runtime/api/defineApi.d.ts +56 -0
- package/dist/runtime/api/defineApi.d.ts.map +1 -0
- package/dist/runtime/api/defineApi.js +97 -0
- package/dist/runtime/api/handleDoneFn.d.ts.map +1 -0
- package/dist/runtime/api/index.d.ts +3 -0
- package/dist/runtime/api/index.d.ts.map +1 -0
- package/dist/runtime/api/index.js +2 -0
- package/dist/runtime/boolean-logic/ifArrayPartial.d.ts +1 -1
- package/dist/runtime/boolean-logic/ifArrayPartial.d.ts.map +1 -1
- package/dist/runtime/boolean-logic/ifArrayPartial.js +1 -1
- package/dist/runtime/boolean-logic/ifLength.d.ts.map +1 -1
- package/dist/runtime/boolean-logic/ifScalar.d.ts.map +1 -1
- package/dist/runtime/boolean-logic/ifScalar.js +1 -1
- package/dist/runtime/boolean-logic/index.d.ts +0 -1
- package/dist/runtime/boolean-logic/index.d.ts.map +1 -1
- package/dist/runtime/boolean-logic/index.js +0 -1
- package/dist/runtime/dictionary/defineOptions.d.ts +26 -0
- package/dist/runtime/dictionary/defineOptions.d.ts.map +1 -0
- package/dist/runtime/dictionary/defineOptions.js +30 -0
- package/dist/runtime/dictionary/keysOf.d.ts +1 -1
- package/dist/runtime/dictionary/keysOf.d.ts.map +1 -1
- package/dist/runtime/errors/KindError.d.ts +2 -2
- package/dist/runtime/errors/KindError.d.ts.map +1 -1
- package/dist/runtime/functions/index.d.ts +1 -0
- package/dist/runtime/functions/index.d.ts.map +1 -1
- package/dist/runtime/functions/index.js +1 -0
- package/dist/runtime/functions/wrapFn.d.ts +2 -0
- package/dist/runtime/functions/wrapFn.d.ts.map +1 -0
- package/dist/runtime/functions/wrapFn.js +24 -0
- package/dist/runtime/index.d.ts +1 -1
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/index.js +1 -10
- package/dist/runtime/lists/find.d.ts +1 -1
- package/dist/runtime/lists/find.d.ts.map +1 -1
- package/dist/runtime/lists/intersection.d.ts.map +1 -1
- package/dist/runtime/lists/intersection.js +2 -1
- package/dist/runtime/literals/asPhoneNumber.d.ts +10 -0
- package/dist/runtime/literals/asPhoneNumber.d.ts.map +1 -0
- package/dist/runtime/literals/asPhoneNumber.js +62 -0
- package/dist/runtime/literals/index.d.ts +4 -0
- package/dist/runtime/literals/index.d.ts.map +1 -1
- package/dist/runtime/literals/index.js +4 -0
- package/dist/runtime/literals/retainAfter.d.ts +1 -1
- package/dist/runtime/literals/retainAfter.js +1 -1
- package/dist/runtime/literals/retainChars.d.ts +16 -0
- package/dist/runtime/literals/retainChars.d.ts.map +1 -0
- package/dist/runtime/literals/retainChars.js +17 -0
- package/dist/runtime/literals/retainWhile.d.ts +10 -0
- package/dist/runtime/literals/retainWhile.d.ts.map +1 -0
- package/dist/runtime/literals/retainWhile.js +13 -0
- package/dist/runtime/literals/stripChars.d.ts +10 -0
- package/dist/runtime/literals/stripChars.d.ts.map +1 -0
- package/dist/runtime/literals/stripChars.js +11 -0
- package/dist/runtime/literals/stripLeading.d.ts +3 -3
- package/dist/runtime/literals/stripLeading.d.ts.map +1 -1
- package/dist/runtime/literals/stripLeading.js +5 -5
- package/dist/runtime/literals/stripUntil.d.ts +9 -0
- package/dist/runtime/literals/stripUntil.d.ts.map +1 -0
- package/dist/runtime/literals/stripUntil.js +12 -0
- package/dist/runtime/literals/unset.d.ts +8 -0
- package/dist/runtime/literals/unset.d.ts.map +1 -0
- package/dist/runtime/literals/unset.js +14 -0
- package/dist/runtime/meta/youtube-meta.d.ts +8 -1
- package/dist/runtime/meta/youtube-meta.d.ts.map +1 -1
- package/dist/runtime/meta/youtube-meta.js +50 -2
- package/dist/runtime/runtime-types/dict.d.ts +2 -2
- package/dist/runtime/runtime-types/dict.d.ts.map +1 -1
- package/dist/runtime/runtime-types/ip6Prefix.d.ts +1 -1
- package/dist/runtime/runtime-types/parse.d.ts +1 -1
- package/dist/runtime/runtime-types/shape-helpers/getTokenData.d.ts +1 -1
- package/dist/runtime/runtime-types/shape-helpers/getTokenName.d.ts +1 -1
- package/dist/runtime/runtime-types/shape.d.ts +1 -1
- package/dist/runtime/runtime-types/shape.js +1 -1
- package/dist/runtime/tsconfig.tsbuildinfo +1 -1
- package/dist/runtime/type-guards/api-tg.d.ts +33 -0
- package/dist/runtime/type-guards/api-tg.d.ts.map +1 -0
- package/dist/runtime/type-guards/api-tg.js +38 -0
- package/dist/runtime/type-guards/hasWhitespace.d.ts +7 -0
- package/dist/runtime/type-guards/hasWhitespace.d.ts.map +1 -0
- package/dist/runtime/type-guards/hasWhitespace.js +11 -0
- package/dist/runtime/type-guards/index.d.ts +7 -0
- package/dist/runtime/type-guards/index.d.ts.map +1 -1
- package/dist/runtime/type-guards/index.js +7 -0
- package/dist/runtime/type-guards/isConstant.d.ts +6 -0
- package/dist/runtime/type-guards/isConstant.d.ts.map +1 -1
- package/dist/runtime/type-guards/isConstant.js +12 -2
- package/dist/runtime/type-guards/isEmail.d.ts +7 -0
- package/dist/runtime/type-guards/isEmail.d.ts.map +1 -0
- package/dist/runtime/type-guards/isEmail.js +11 -0
- package/dist/runtime/type-guards/isPhoneNumber.d.ts +14 -0
- package/dist/runtime/type-guards/isPhoneNumber.d.ts.map +1 -0
- package/dist/runtime/type-guards/isPhoneNumber.js +26 -0
- package/dist/runtime/type-guards/isSpecificConstant.js +2 -3
- package/dist/runtime/type-guards/isTrimmable.d.ts +7 -0
- package/dist/runtime/type-guards/isTrimmable.d.ts.map +1 -0
- package/dist/runtime/type-guards/isTrimmable.js +9 -0
- package/dist/runtime/type-guards/isUnset.d.ts +18 -0
- package/dist/runtime/type-guards/isUnset.d.ts.map +1 -0
- package/dist/runtime/type-guards/isUnset.js +23 -0
- package/dist/runtime/type-guards/isUrl.d.ts +1 -1
- package/dist/runtime/type-guards/network-tg.d.ts +9 -3
- package/dist/runtime/type-guards/network-tg.d.ts.map +1 -1
- package/dist/runtime/type-guards/network-tg.js +10 -1
- package/dist/runtime/type-guards/repos.d.ts +2 -2
- package/dist/runtime/type-guards/youtube.d.ts +4 -2
- package/dist/runtime/type-guards/youtube.d.ts.map +1 -1
- package/dist/runtime/type-guards/youtube.js +13 -3
- package/dist/types/api/api.d.ts +96 -37
- package/dist/types/api/api.d.ts.map +1 -1
- package/dist/types/base-types/fns/EscapeFunction.d.ts +22 -0
- package/dist/types/base-types/fns/EscapeFunction.d.ts.map +1 -0
- package/dist/types/base-types/fns/OptionalParamFn.d.ts +30 -0
- package/dist/types/base-types/fns/OptionalParamFn.d.ts.map +1 -0
- package/dist/types/base-types/fns/index.d.ts +2 -0
- package/dist/types/base-types/fns/index.d.ts.map +1 -1
- package/dist/types/base-types/fns/index.js +2 -0
- package/dist/types/boolean-logic/branching/If.d.ts +2 -3
- package/dist/types/boolean-logic/branching/If.d.ts.map +1 -1
- package/dist/types/boolean-logic/branching/IfUnset.d.ts +12 -0
- package/dist/types/boolean-logic/branching/IfUnset.d.ts.map +1 -0
- package/dist/types/boolean-logic/branching/OnPass.d.ts +4 -3
- package/dist/types/boolean-logic/branching/OnPass.d.ts.map +1 -1
- package/dist/types/boolean-logic/branching/WhenNever.d.ts +11 -0
- package/dist/types/boolean-logic/branching/WhenNever.d.ts.map +1 -0
- package/dist/types/boolean-logic/branching/WhenNever.js +1 -0
- package/dist/types/boolean-logic/branching/index.d.ts +2 -0
- package/dist/types/boolean-logic/branching/index.d.ts.map +1 -1
- package/dist/types/boolean-logic/branching/index.js +2 -0
- package/dist/types/boolean-logic/combinators/Compare.d.ts +3 -3
- package/dist/types/boolean-logic/combinators/Compare.d.ts.map +1 -1
- package/dist/types/boolean-logic/combinators/Some.d.ts +8 -0
- package/dist/types/boolean-logic/combinators/Some.d.ts.map +1 -0
- package/dist/types/boolean-logic/combinators/Some.js +1 -0
- package/dist/types/boolean-logic/combinators/index.d.ts +1 -0
- package/dist/types/boolean-logic/combinators/index.d.ts.map +1 -1
- package/dist/types/boolean-logic/combinators/index.js +1 -0
- package/dist/types/boolean-logic/narrowing/AsDoneFn.d.ts +2 -2
- package/dist/types/boolean-logic/narrowing/AsDoneFn.d.ts.map +1 -1
- package/dist/types/boolean-logic/operators/ApiOperators.d.ts +11 -0
- package/dist/types/boolean-logic/operators/ApiOperators.d.ts.map +1 -0
- package/dist/types/boolean-logic/operators/ApiOperators.js +1 -0
- package/dist/types/boolean-logic/operators/HasSameValues.d.ts +4 -3
- package/dist/types/boolean-logic/operators/HasSameValues.d.ts.map +1 -1
- package/dist/types/boolean-logic/operators/IsGreaterThan.d.ts +2 -2
- package/dist/types/boolean-logic/operators/IsGreaterThan.d.ts.map +1 -1
- package/dist/types/boolean-logic/operators/IsUnset.d.ts +9 -0
- package/dist/types/boolean-logic/operators/IsUnset.d.ts.map +1 -0
- package/dist/types/boolean-logic/operators/IsUnset.js +1 -0
- package/dist/types/boolean-logic/operators/PhoneOperators.d.ts +33 -0
- package/dist/types/boolean-logic/operators/PhoneOperators.d.ts.map +1 -0
- package/dist/types/boolean-logic/operators/PhoneOperators.js +1 -0
- package/dist/types/boolean-logic/operators/index.d.ts +3 -0
- package/dist/types/boolean-logic/operators/index.d.ts.map +1 -1
- package/dist/types/boolean-logic/operators/index.js +3 -0
- package/dist/types/dictionary/Keys.d.ts +58 -4
- package/dist/types/dictionary/Keys.d.ts.map +1 -1
- package/dist/types/dictionary/KvFn.d.ts +2 -2
- package/dist/types/dictionary/KvFn.d.ts.map +1 -1
- package/dist/types/dictionary/MakeKeysOptional.d.ts +12 -3
- package/dist/types/dictionary/MakeKeysOptional.d.ts.map +1 -1
- package/dist/types/dictionary/MakeKeysRequired.d.ts +14 -0
- package/dist/types/dictionary/MakeKeysRequired.d.ts.map +1 -0
- package/dist/types/dictionary/MakeKeysRequired.js +1 -0
- package/dist/types/dictionary/OptionalKeys.d.ts +19 -4
- package/dist/types/dictionary/OptionalKeys.d.ts.map +1 -1
- package/dist/types/dictionary/OptionalKeys.js +1 -0
- package/dist/types/dictionary/RequiredKeys.d.ts +14 -6
- package/dist/types/dictionary/RequiredKeys.d.ts.map +1 -1
- package/dist/types/dictionary/Values.d.ts +2 -2
- package/dist/types/dictionary/Values.d.ts.map +1 -1
- package/dist/types/dictionary/index.d.ts +1 -2
- package/dist/types/dictionary/index.d.ts.map +1 -1
- package/dist/types/dictionary/index.js +1 -2
- package/dist/types/errors/KindError.d.ts +1 -1
- package/dist/types/errors/KindError.d.ts.map +1 -1
- package/dist/types/functions/FnFrom.d.ts +5 -0
- package/dist/types/functions/FnFrom.d.ts.map +1 -1
- package/dist/types/functions/{Fn.d.ts → FnWithDescription.d.ts} +2 -2
- package/dist/types/functions/FnWithDescription.d.ts.map +1 -0
- package/dist/types/functions/FnWithDescription.js +1 -0
- package/dist/types/functions/WrapperFn.d.ts +23 -0
- package/dist/types/functions/WrapperFn.d.ts.map +1 -0
- package/dist/types/functions/WrapperFn.js +1 -0
- package/dist/types/functions/index.d.ts +2 -1
- package/dist/types/functions/index.d.ts.map +1 -1
- package/dist/types/functions/index.js +2 -1
- package/dist/types/lists/ConvertSet.d.ts +2 -2
- package/dist/types/lists/ConvertSet.d.ts.map +1 -1
- package/dist/types/lists/Find.d.ts +7 -18
- package/dist/types/lists/Find.d.ts.map +1 -1
- package/dist/types/literals/DoneFnTuple.d.ts +3 -3
- package/dist/types/literals/DoneFnTuple.d.ts.map +1 -1
- package/dist/types/literals/Unset.d.ts +13 -0
- package/dist/types/literals/Unset.d.ts.map +1 -0
- package/dist/types/literals/Unset.js +1 -0
- package/dist/types/literals/index.d.ts +1 -0
- package/dist/types/literals/index.d.ts.map +1 -1
- package/dist/types/literals/index.js +1 -0
- package/dist/types/numeric-literals/NumberLike.d.ts +1 -1
- package/dist/types/numeric-literals/NumberLike.d.ts.map +1 -1
- package/dist/types/string-literals/Proxmox.d.ts +7 -0
- package/dist/types/string-literals/Proxmox.d.ts.map +1 -0
- package/dist/types/string-literals/Proxmox.js +1 -0
- package/dist/types/string-literals/StripLeading.d.ts +2 -2
- package/dist/types/string-literals/StripLeading.d.ts.map +1 -1
- package/dist/types/string-literals/StripUntil.d.ts +12 -0
- package/dist/types/string-literals/StripUntil.d.ts.map +1 -1
- package/dist/types/string-literals/character-sets/Whitespace.d.ts +3 -1
- package/dist/types/string-literals/character-sets/Whitespace.d.ts.map +1 -1
- package/dist/types/string-literals/character-sets/index.d.ts +1 -0
- package/dist/types/string-literals/character-sets/index.d.ts.map +1 -1
- package/dist/types/string-literals/character-sets/index.js +1 -0
- package/dist/types/string-literals/character-sets/phone.d.ts +192 -0
- package/dist/types/string-literals/character-sets/phone.d.ts.map +1 -0
- package/dist/types/string-literals/character-sets/phone.js +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/dist/types/type-conversion/ReduceValues.d.ts +19 -0
- package/dist/types/type-conversion/ReduceValues.d.ts.map +1 -0
- package/dist/types/type-conversion/ReduceValues.js +1 -0
- package/dist/types/type-conversion/ReturnValues.d.ts +10 -6
- package/dist/types/type-conversion/ReturnValues.d.ts.map +1 -1
- package/dist/types/type-conversion/Trim.d.ts +3 -1
- package/dist/types/type-conversion/Trim.d.ts.map +1 -1
- package/dist/types/type-conversion/UnionFilter.d.ts +2 -2
- package/dist/types/type-conversion/UnionFilter.d.ts.map +1 -1
- package/dist/types/type-conversion/form-fields.d.ts +5 -1
- package/dist/types/type-conversion/form-fields.d.ts.map +1 -1
- package/dist/types/type-conversion/index.d.ts +1 -0
- package/dist/types/type-conversion/index.d.ts.map +1 -1
- package/dist/types/type-conversion/index.js +1 -0
- package/package.json +17 -11
- package/dist/runtime/boolean-logic/handleDoneFn.d.ts.map +0 -1
- package/dist/types/dictionary/PrivateKeys.d.ts +0 -17
- package/dist/types/dictionary/PrivateKeys.d.ts.map +0 -1
- package/dist/types/dictionary/PublicKeys.d.ts +0 -10
- package/dist/types/dictionary/PublicKeys.d.ts.map +0 -1
- package/dist/types/functions/Fn.d.ts.map +0 -1
- /package/dist/runtime/{boolean-logic → api}/handleDoneFn.d.ts +0 -0
- /package/dist/runtime/{boolean-logic → api}/handleDoneFn.js +0 -0
- /package/dist/types/{dictionary/PrivateKeys.js → base-types/fns/EscapeFunction.js} +0 -0
- /package/dist/types/{dictionary/PublicKeys.js → base-types/fns/OptionalParamFn.js} +0 -0
- /package/dist/types/{functions/Fn.js → boolean-logic/branching/IfUnset.js} +0 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { AfterFirst, Dictionary, First, TypedFunction, Values } from "../index";
|
|
2
|
+
type ProcessTuple<TArray extends readonly unknown[] | unknown[], TResults extends readonly unknown[] = []> = [
|
|
3
|
+
] extends TArray ? TResults : First<TArray> extends TypedFunction ? ProcessTuple<AfterFirst<TArray>, [...TResults, ReturnType<First<TArray>>]> : ProcessTuple<AfterFirst<TArray>, [...TResults, First<TArray>]>;
|
|
4
|
+
/**
|
|
5
|
+
* **ReduceValues**`<TContainer>`
|
|
6
|
+
*
|
|
7
|
+
* Reduces a container to it's _values_ where if it's a function then the
|
|
8
|
+
* ReturnType` is returned, if not a function than just it's normal value.
|
|
9
|
+
*
|
|
10
|
+
* ```ts
|
|
11
|
+
* // [true, "blue"]
|
|
12
|
+
* type T = ReduceValues<[true, false, () => true, () => "blue"]
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* **Related:** `ReturnValues`, `Values`
|
|
16
|
+
*/
|
|
17
|
+
export type ReduceValues<TContainer extends readonly unknown[] | Dictionary> = TContainer extends readonly unknown[] ? ProcessTuple<TContainer> : TContainer extends Dictionary ? ProcessTuple<Values<TContainer>> : never;
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=ReduceValues.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReduceValues.d.ts","sourceRoot":"","sources":["../../../src/types/type-conversion/ReduceValues.ts"],"names":[],"mappings":"AAAA,OAAO,EAAG,UAAU,EAAE,UAAU,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,iBAAwB;AAGxF,KAAK,YAAY,CACf,MAAM,SAAS,SAAS,OAAO,EAAE,GAAG,OAAO,EAAE,EAC7C,QAAQ,SAAS,SAAS,OAAO,EAAE,GAAG,EAAE,IAExC;CAAE,SAAS,MAAM,GACb,QAAQ,GACR,KAAK,CAAC,MAAM,CAAC,SAAS,aAAa,GACjC,YAAY,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC,GAAG,QAAQ,EAAE,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAC1E,YAAY,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC,GAAG,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AACvE;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,YAAY,CACtB,UAAU,SAAS,SAAS,OAAO,EAAE,GAAG,UAAU,IAChD,UAAU,SAAS,SAAS,OAAO,EAAE,GACvC,YAAY,CAAC,UAAU,CAAC,GACxB,UAAU,SAAS,UAAU,GAC3B,YAAY,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,GAChC,KAAK,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,14 +1,18 @@
|
|
|
1
|
-
import { AfterFirst, First, TypedFunction } from "../index";
|
|
1
|
+
import { AfterFirst, Dictionary, First, TypedFunction, Values } from "../index";
|
|
2
|
+
type ProcessTuple<TArray extends readonly unknown[] | unknown[], TResults extends readonly unknown[] = []> = [
|
|
3
|
+
] extends TArray ? TResults : First<TArray> extends TypedFunction ? ProcessTuple<AfterFirst<TArray>, [...TResults, ReturnType<First<TArray>>]> : ProcessTuple<AfterFirst<TArray>, TResults>;
|
|
2
4
|
/**
|
|
3
|
-
* **ReturnValues**`<
|
|
5
|
+
* **ReturnValues**`<TContainer>`
|
|
4
6
|
*
|
|
5
|
-
* Reduces
|
|
6
|
-
*
|
|
7
|
+
* Reduces a container's values down to just the return type of the
|
|
8
|
+
* functions.
|
|
7
9
|
* ```ts
|
|
8
10
|
* // [true, "blue"]
|
|
9
11
|
* type T = ReturnValues<[true, false, () => true, () => "blue"]
|
|
10
12
|
* ```
|
|
13
|
+
*
|
|
14
|
+
* **Related:** `ReduceValues`
|
|
11
15
|
*/
|
|
12
|
-
export type ReturnValues<
|
|
13
|
-
|
|
16
|
+
export type ReturnValues<TContainer extends readonly unknown[] | Dictionary> = TContainer extends readonly unknown[] ? ProcessTuple<TContainer> : TContainer extends Dictionary ? ProcessTuple<Values<TContainer>> : never;
|
|
17
|
+
export {};
|
|
14
18
|
//# sourceMappingURL=ReturnValues.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReturnValues.d.ts","sourceRoot":"","sources":["../../../src/types/type-conversion/ReturnValues.ts"],"names":[],"mappings":"AAAA,OAAO,EAAG,UAAU,EAAE,KAAK,EAAE,aAAa,EAAE,iBAAwB;
|
|
1
|
+
{"version":3,"file":"ReturnValues.d.ts","sourceRoot":"","sources":["../../../src/types/type-conversion/ReturnValues.ts"],"names":[],"mappings":"AAAA,OAAO,EAAG,UAAU,EAAE,UAAU,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,iBAAwB;AAGxF,KAAK,YAAY,CACf,MAAM,SAAS,SAAS,OAAO,EAAE,GAAG,OAAO,EAAE,EAC7C,QAAQ,SAAS,SAAS,OAAO,EAAE,GAAG,EAAE,IAExC;CAAE,SAAS,MAAM,GACb,QAAQ,GACR,KAAK,CAAC,MAAM,CAAC,SAAS,aAAa,GACjC,YAAY,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC,GAAG,QAAQ,EAAE,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAC1E,YAAY,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,QAAQ,CAAC,CAAC;AACnD;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,YAAY,CACtB,UAAU,SAAS,SAAS,OAAO,EAAE,GAAG,UAAU,IAChD,UAAU,SAAS,SAAS,OAAO,EAAE,GACvC,YAAY,CAAC,UAAU,CAAC,GACxB,UAAU,SAAS,UAAU,GAC3B,YAAY,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,GAChC,KAAK,CAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Whitespace } from "../index";
|
|
2
|
+
type Process<S extends string> = string extends S ? string : S extends `${Whitespace}${infer Right}` ? Process<Right> : S extends `${infer Left}${Whitespace}` ? Process<Left> : S;
|
|
2
3
|
/**
|
|
3
4
|
* Trims off blank spaces, `\n` and `\t` characters from both sides of a _string literal_.
|
|
4
5
|
* ```ts
|
|
@@ -8,5 +9,6 @@ import { Whitespace } from "../index";
|
|
|
8
9
|
* type T = Trim<string>;
|
|
9
10
|
* ```
|
|
10
11
|
*/
|
|
11
|
-
export type Trim<S extends string> =
|
|
12
|
+
export type Trim<S extends string> = Process<S> extends string ? Process<S> : never;
|
|
13
|
+
export {};
|
|
12
14
|
//# sourceMappingURL=Trim.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Trim.d.ts","sourceRoot":"","sources":["../../../src/types/type-conversion/Trim.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,iBAAwB;
|
|
1
|
+
{"version":3,"file":"Trim.d.ts","sourceRoot":"","sources":["../../../src/types/type-conversion/Trim.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,iBAAwB;AAE7C,KAAK,OAAO,CACZ,CAAC,SAAS,MAAM,IACZ,MAAM,SAAS,CAAC,GAClB,MAAM,GACN,CAAC,SAAS,GAAG,UAAU,GAAG,MAAM,KAAK,EAAE,GACvC,OAAO,CAAC,KAAK,CAAC,GACd,CAAC,SAAS,GAAG,MAAM,IAAI,GAAG,UAAU,EAAE,GACtC,OAAO,CAAC,IAAI,CAAC,GACb,CAAC,CAAC;AAGJ;;;;;;;;GAQG;AACH,MAAM,MAAM,IAAI,CACd,CAAC,SAAS,MAAM,IACd,OAAO,CAAC,CAAC,CAAC,SAAS,MAAM,GAC3B,OAAO,CAAC,CAAC,CAAC,GACV,KAAK,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UnionToTuple, TupleToUnion, Filter,
|
|
1
|
+
import { UnionToTuple, TupleToUnion, Filter, IsUnion, Tuple } from "../index";
|
|
2
2
|
type Reduce<T extends Tuple, E> = TupleToUnion<Filter<{
|
|
3
3
|
[K in keyof T]: T[K] extends E ? never : T[K];
|
|
4
4
|
}, never>>;
|
|
@@ -13,7 +13,7 @@ type Isolate<T extends Tuple, E> = TupleToUnion<Filter<{
|
|
|
13
13
|
*
|
|
14
14
|
* **Related:** `UnionRetain`
|
|
15
15
|
*/
|
|
16
|
-
export type UnionFilter<U, E> = [U] extends [never] ? never :
|
|
16
|
+
export type UnionFilter<U, E> = [U] extends [never] ? never : [IsUnion<U>] extends [true] ? Reduce<UnionToTuple<U>, E> : [U] extends [E] ? never : U;
|
|
17
17
|
/**
|
|
18
18
|
* **UnionRetain**`<U, E>`
|
|
19
19
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UnionFilter.d.ts","sourceRoot":"","sources":["../../../src/types/type-conversion/UnionFilter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"UnionFilter.d.ts","sourceRoot":"","sources":["../../../src/types/type-conversion/UnionFilter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,iBAAwB;AAGrF,KAAK,MAAM,CACP,CAAC,SAAS,KAAK,EACf,CAAC,IACD,YAAY,CACZ,MAAM,CAAC;KACF,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,GACxB,KAAK,GACL,CAAC,CAAC,CAAC,CAAC;CACb,EAAE,KAAK,CAAC,CACZ,CAAC;AAEF,KAAK,OAAO,CACR,CAAC,SAAS,KAAK,EACf,CAAC,IACD,YAAY,CACZ,MAAM,CAAC;KACF,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,GACxB,CAAC,CAAC,CAAC,CAAC,GACJ,KAAK;CACd,EAAE,KAAK,CAAC,CACZ,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,MAAM,WAAW,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,GACjD,KAAK,GACL,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,GACvB,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,EAAC,CAAC,CAAC,GACzB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GACX,KAAK,GACL,CAAC,CAAC;AAEZ;;;;;;;GAOG;AACH,MAAM,MAAM,WAAW,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,GACjD,KAAK,GACL,OAAO,CAAC,CAAC,CAAC,SAAS,IAAI,GACnB,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,EAAC,CAAC,CAAC,GAC1B,CAAC,SAAS,CAAC,GACP,CAAC,GACD,KAAK,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-fields.d.ts","sourceRoot":"","sources":["../../../src/types/type-conversion/form-fields.ts"],"names":[],"mappings":"AAEA
|
|
1
|
+
{"version":3,"file":"form-fields.d.ts","sourceRoot":"","sources":["../../../src/types/type-conversion/form-fields.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,MAAM,MAAM,KAAK,GAAG,GAAG,MAAM,IAAI,MAAM,IAAI,MAAM,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/type-conversion/index.ts"],"names":[],"mappings":"AAOA,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAE7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAE/B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/type-conversion/index.ts"],"names":[],"mappings":"AAOA,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAE7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAE/B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC"}
|
|
@@ -54,6 +54,7 @@ export * from "./WithDefault.js";
|
|
|
54
54
|
export * from "./AsContainer.js";
|
|
55
55
|
export * from "./StripChars.js";
|
|
56
56
|
export * from "./RetainChars.js";
|
|
57
|
+
export * from "./ReduceValues.js";
|
|
57
58
|
// #endregion auto-indexed files
|
|
58
59
|
// see https://github.com/inocan-group/do-devops/docs/autoindex.md
|
|
59
60
|
// for more info
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "inferred-types",
|
|
3
|
-
"version": "0.45.
|
|
3
|
+
"version": "0.45.3",
|
|
4
4
|
"description": "Functions which provide useful type inference on TS projects",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Ken Snyder<ken@ken.net>",
|
|
@@ -50,12 +50,12 @@
|
|
|
50
50
|
"watch:bundle": "tsup src/index.ts --format=esm --dts"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@arktype/attest": "^0.7.
|
|
53
|
+
"@arktype/attest": "^0.7.10",
|
|
54
54
|
"@eslint/js": "^9.4.0",
|
|
55
55
|
"@type-challenges/utils": "~0.1.1",
|
|
56
|
-
"@types/node": "^18.19.
|
|
57
|
-
"@typescript-eslint/eslint-plugin": "^7.
|
|
58
|
-
"@typescript-eslint/parser": "^7.
|
|
56
|
+
"@types/node": "^18.19.34",
|
|
57
|
+
"@typescript-eslint/eslint-plugin": "^7.13.0",
|
|
58
|
+
"@typescript-eslint/parser": "^7.13.0",
|
|
59
59
|
"@typescript/analyze-trace": "^0.10.1",
|
|
60
60
|
"@vitest/ui": "^1.6.0",
|
|
61
61
|
"bumpp": "^9.4.1",
|
|
@@ -71,19 +71,25 @@
|
|
|
71
71
|
"glob": "^10.4.1",
|
|
72
72
|
"npm-run-all": "~4.1.5",
|
|
73
73
|
"pathe": "^1.1.2",
|
|
74
|
-
"prettier": "^3.2
|
|
74
|
+
"prettier": "^3.3.2",
|
|
75
75
|
"rimraf": "^5.0.7",
|
|
76
|
-
"ts-patch": "^3.
|
|
76
|
+
"ts-patch": "^3.2.0",
|
|
77
77
|
"ts-type-tester": "^0.3.2",
|
|
78
|
-
"tsup": "^8.0
|
|
79
|
-
"tsx": "^4.
|
|
78
|
+
"tsup": "^8.1.0",
|
|
79
|
+
"tsx": "^4.15.4",
|
|
80
80
|
"typescript": "^5.4.5",
|
|
81
|
-
"typescript-eslint": "^7.
|
|
81
|
+
"typescript-eslint": "^7.13.0",
|
|
82
82
|
"typescript-transform-paths": "^3.4.7",
|
|
83
83
|
"typescript-transformer-esm": "^1.1.0",
|
|
84
|
-
"vite": "^5.
|
|
84
|
+
"vite": "^5.3.0",
|
|
85
85
|
"vite-node": "^1.6.0",
|
|
86
86
|
"vitest": "^1.6.0",
|
|
87
87
|
"vue": "^3.4.27"
|
|
88
|
+
},
|
|
89
|
+
"pnpm": {
|
|
90
|
+
"overrides": {
|
|
91
|
+
"tar@<6.2.1": ">=6.2.1",
|
|
92
|
+
"braces@<3.0.3": ">=3.0.3"
|
|
93
|
+
}
|
|
88
94
|
}
|
|
89
95
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"handleDoneFn.d.ts","sourceRoot":"","sources":["../../../src/runtime/boolean-logic/handleDoneFn.ts"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AACH,eAAO,MAAM,YAAY,uCAIlB,IAAI,iBACK,OAAO,QAWtB,CAAA"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { AlphaChar } from "../index";
|
|
2
|
-
/**
|
|
3
|
-
* A `PrivateKey` must start with a `_` character and then follow with
|
|
4
|
-
* an alphabetic character
|
|
5
|
-
*/
|
|
6
|
-
export type PrivateKey = `_${AlphaChar}${string}`;
|
|
7
|
-
/**
|
|
8
|
-
* **PrivateKeys**`<T>`
|
|
9
|
-
*
|
|
10
|
-
* Keys on an object which have a `_` character as first part of the
|
|
11
|
-
* name are considered private and this utility will create a union
|
|
12
|
-
* of all the keys in this category.
|
|
13
|
-
*/
|
|
14
|
-
export type PrivateKeys<T extends object> = {
|
|
15
|
-
[K in keyof T]: K extends `_${string}` ? K : never;
|
|
16
|
-
}[keyof T];
|
|
17
|
-
//# sourceMappingURL=PrivateKeys.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PrivateKeys.d.ts","sourceRoot":"","sources":["../../../src/types/dictionary/PrivateKeys.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,iBAAwB;AAG5C;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,IAAI,SAAS,GAAG,MAAM,EAAE,CAAC;AAElD;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,MAAM,IAAI;KACzC,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,SAAS,IAAI,MAAM,EAAE,GAAG,CAAC,GAAG,KAAK;CACnD,CAAC,MAAM,CAAC,CAAC,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* **PublicKeys**`<T>`
|
|
3
|
-
*
|
|
4
|
-
* Builds a union type of all keys which are "public" where a public
|
|
5
|
-
* key is any key which _does not_ start with the `_` character.
|
|
6
|
-
*/
|
|
7
|
-
export type PublicKeys<T extends object> = {
|
|
8
|
-
[K in keyof T]: K extends `_${string}` ? never : K;
|
|
9
|
-
}[keyof T];
|
|
10
|
-
//# sourceMappingURL=PublicKeys.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PublicKeys.d.ts","sourceRoot":"","sources":["../../../src/types/dictionary/PublicKeys.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,MAAM,UAAU,CAAC,CAAC,SAAS,MAAM,IAAI;KACxC,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,SAAS,IAAI,MAAM,EAAE,GAAG,KAAK,GAAG,CAAC;CACnD,CAAC,MAAM,CAAC,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Fn.d.ts","sourceRoot":"","sources":["../../../src/types/functions/Fn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAEvD,MAAM,MAAM,MAAM,GAAG,CAAC,EAAE,EAAE,WAAW,CAAE,GACrC,CAAC,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,CAAC,GAC/B,CAAC,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAE,CAAC;AAExD;;GAEG;AACH,MAAM,MAAM,EAAE,CACZ,GAAG,SAAS,MAAM,GAAG,MAAM,IACzB,GAAG,SAAS,CAAE,EAAE,EAAE,WAAW,CAAE,GACjC,GAAG,CAAC,CAAC,CAAC,GACN,GAAG,SAAS,CAAE,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,CAAC,GAC1C,GAAG,CAAC,CAAC,CAAC,GAAG;IAAE,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC,CAAA;CAAE,GACzB,GAAG,SAAS,CAAE,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAE,GAChE,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,GACf,KAAK,CAAC"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|