inferred-types 0.44.0 → 0.45.2
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 +29 -0
- package/dist/constants/NetworkConstants.d.ts.map +1 -0
- package/dist/constants/NetworkConstants.js +83 -0
- 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 +4 -1
- package/dist/constants/index.d.ts.map +1 -1
- package/dist/constants/index.js +4 -1
- package/dist/constants/tsconfig.tsbuildinfo +1 -1
- package/dist/inferred-types/index.cjs +1657 -1029
- 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/dictionary/withKeys.d.ts +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 +2 -1
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/index.js +2 -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 +5 -0
- package/dist/runtime/literals/index.d.ts.map +1 -1
- package/dist/runtime/literals/index.js +5 -0
- 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 +11 -0
- package/dist/runtime/literals/retainWhile.d.ts.map +1 -0
- package/dist/runtime/literals/retainWhile.js +12 -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/takeNumericCharacters.d.ts +9 -0
- package/dist/runtime/literals/takeNumericCharacters.d.ts.map +1 -0
- package/dist/runtime/literals/takeNumericCharacters.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/index.d.ts +3 -0
- package/dist/runtime/meta/index.d.ts.map +1 -0
- package/dist/runtime/meta/index.js +2 -0
- package/dist/runtime/meta/urlMeta.d.ts +52 -0
- package/dist/runtime/meta/urlMeta.d.ts.map +1 -0
- package/dist/runtime/meta/urlMeta.js +57 -0
- package/dist/runtime/meta/youtube-meta.d.ts +38 -0
- package/dist/runtime/meta/youtube-meta.d.ts.map +1 -0
- package/dist/runtime/meta/youtube-meta.js +67 -0
- 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-helpers/singletons.d.ts.map +1 -1
- package/dist/runtime/runtime-types/shape-helpers/singletons.js +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-conversion/asChars.d.ts +8 -0
- package/dist/runtime/type-conversion/asChars.d.ts.map +1 -0
- package/dist/runtime/type-conversion/asChars.js +8 -0
- package/dist/runtime/type-conversion/index.d.ts +2 -0
- package/dist/runtime/type-conversion/index.d.ts.map +1 -1
- package/dist/runtime/type-conversion/index.js +2 -0
- package/dist/runtime/type-conversion/ip6GroupExpansion.d.ts +14 -0
- package/dist/runtime/type-conversion/ip6GroupExpansion.d.ts.map +1 -0
- package/dist/runtime/type-conversion/ip6GroupExpansion.js +15 -0
- 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 +11 -0
- package/dist/runtime/type-guards/index.d.ts.map +1 -1
- package/dist/runtime/type-guards/index.js +11 -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/isHexadecimal.d.ts +8 -0
- package/dist/runtime/type-guards/isHexadecimal.d.ts.map +1 -0
- package/dist/runtime/type-guards/isHexadecimal.js +13 -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 +2 -4
- package/dist/runtime/type-guards/isUrl.d.ts.map +1 -1
- package/dist/runtime/type-guards/isUrl.js +2 -3
- package/dist/runtime/type-guards/network-tg.d.ts +54 -0
- package/dist/runtime/type-guards/network-tg.d.ts.map +1 -0
- package/dist/runtime/type-guards/network-tg.js +94 -0
- package/dist/runtime/type-guards/repos.d.ts +6 -6
- package/dist/runtime/type-guards/repos.d.ts.map +1 -1
- package/dist/runtime/type-guards/youtube.d.ts +44 -0
- package/dist/runtime/type-guards/youtube.d.ts.map +1 -0
- package/dist/runtime/type-guards/youtube.js +84 -0
- 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/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/And.d.ts +1 -1
- package/dist/types/boolean-logic/combinators/And.d.ts.map +1 -1
- 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/Not.d.ts +5 -6
- package/dist/types/boolean-logic/combinators/Not.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/Extends.d.ts +2 -1
- package/dist/types/boolean-logic/operators/Extends.d.ts.map +1 -1
- 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/IsBoolean.d.ts +2 -1
- package/dist/types/boolean-logic/operators/IsBoolean.d.ts.map +1 -1
- package/dist/types/boolean-logic/operators/IsCssHexadecimal.d.ts +9 -0
- package/dist/types/boolean-logic/operators/IsCssHexadecimal.d.ts.map +1 -0
- package/dist/types/boolean-logic/operators/IsCssHexadecimal.js +1 -0
- package/dist/types/boolean-logic/operators/IsEqual.d.ts +7 -1
- package/dist/types/boolean-logic/operators/IsEqual.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/IsLessThan.d.ts +13 -0
- package/dist/types/boolean-logic/operators/IsLessThan.d.ts.map +1 -0
- package/dist/types/boolean-logic/operators/IsLessThan.js +1 -0
- package/dist/types/boolean-logic/operators/IsNever.d.ts +2 -1
- package/dist/types/boolean-logic/operators/IsNever.d.ts.map +1 -1
- package/dist/types/boolean-logic/operators/IsNumber.d.ts +2 -2
- package/dist/types/boolean-logic/operators/IsNumber.d.ts.map +1 -1
- package/dist/types/boolean-logic/operators/IsString.d.ts +2 -2
- package/dist/types/boolean-logic/operators/IsString.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/IsUrl.d.ts +35 -0
- package/dist/types/boolean-logic/operators/IsUrl.d.ts.map +1 -0
- package/dist/types/boolean-logic/operators/IsUrl.js +1 -0
- package/dist/types/boolean-logic/operators/Network-operators.d.ts +71 -0
- package/dist/types/boolean-logic/operators/Network-operators.d.ts.map +1 -0
- package/dist/types/boolean-logic/operators/Network-operators.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/YouTube-operators.d.ts +32 -0
- package/dist/types/boolean-logic/operators/YouTube-operators.d.ts.map +1 -0
- package/dist/types/boolean-logic/operators/YouTube-operators.js +1 -0
- package/dist/types/boolean-logic/operators/index.d.ts +7 -1
- package/dist/types/boolean-logic/operators/index.d.ts.map +1 -1
- package/dist/types/boolean-logic/operators/index.js +7 -1
- 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/RetainUntil.d.ts +33 -0
- package/dist/types/string-literals/RetainUntil.d.ts.map +1 -0
- package/dist/types/string-literals/RetainUntil.js +1 -0
- package/dist/types/string-literals/Split.d.ts +3 -3
- package/dist/types/string-literals/Split.d.ts.map +1 -1
- package/dist/types/string-literals/StripAfter.d.ts +2 -2
- package/dist/types/string-literals/StripAfter.d.ts.map +1 -1
- package/dist/types/string-literals/StripBefore.d.ts +2 -2
- package/dist/types/string-literals/StripBefore.d.ts.map +1 -1
- 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 +18 -0
- package/dist/types/string-literals/StripUntil.d.ts.map +1 -0
- package/dist/types/string-literals/StripUntil.js +1 -0
- package/dist/types/string-literals/character-sets/DomainName.d.ts +17 -18
- package/dist/types/string-literals/character-sets/DomainName.d.ts.map +1 -1
- package/dist/types/string-literals/character-sets/IpAddress.d.ts +28 -4
- package/dist/types/string-literals/character-sets/IpAddress.d.ts.map +1 -1
- package/dist/types/string-literals/character-sets/Optional.d.ts +14 -0
- package/dist/types/string-literals/character-sets/Optional.d.ts.map +1 -0
- package/dist/types/string-literals/character-sets/Optional.js +1 -0
- package/dist/types/string-literals/character-sets/Repos.d.ts.map +1 -1
- package/dist/types/string-literals/character-sets/Url.d.ts +85 -37
- package/dist/types/string-literals/character-sets/Url.d.ts.map +1 -1
- package/dist/types/string-literals/character-sets/Url.js +1 -0
- 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/YouTube.d.ts +127 -0
- package/dist/types/string-literals/character-sets/YouTube.d.ts.map +1 -0
- package/dist/types/string-literals/character-sets/YouTube.js +1 -0
- package/dist/types/string-literals/character-sets/index.d.ts +3 -0
- package/dist/types/string-literals/character-sets/index.d.ts.map +1 -1
- package/dist/types/string-literals/character-sets/index.js +3 -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/string-literals/index.d.ts +2 -0
- package/dist/types/string-literals/index.d.ts.map +1 -1
- package/dist/types/string-literals/index.js +2 -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/constants/Network.d.ts +0 -22
- package/dist/constants/Network.d.ts.map +0 -1
- package/dist/constants/Network.js +0 -21
- package/dist/runtime/boolean-logic/handleDoneFn.d.ts.map +0 -1
- package/dist/types/boolean-logic/operators/IsHexadecimal.d.ts +0 -9
- package/dist/types/boolean-logic/operators/IsHexadecimal.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/{boolean-logic/operators/IsHexadecimal.js → base-types/fns/EscapeFunction.js} +0 -0
- /package/dist/types/{dictionary/PrivateKeys.js → base-types/fns/OptionalParamFn.js} +0 -0
- /package/dist/types/{dictionary/PublicKeys.js → boolean-logic/branching/IfUnset.js} +0 -0
- /package/dist/types/{functions/Fn.js → boolean-logic/branching/WhenNever.js} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { IsEqual, If, AfterFirst, First } from "../index";
|
|
2
|
-
type FindAcc<TList extends readonly unknown[],
|
|
1
|
+
import { IsEqual, If, AfterFirst, First, Or, NumberLike, Compare } from "../index";
|
|
2
|
+
type FindAcc<TList extends readonly unknown[], TOp extends "extends" | "equals" | "startsWith" | "endsWith" | "lessThan" | "greaterThan", TComparator, TDeref extends string | number | null> = [] extends TList ? undefined : TDeref extends keyof First<TList> ? If<Compare<First<TList>[TDeref], TOp, TComparator>, First<TList>, FindAcc<AfterFirst<TList>, TOp, TComparator, TDeref>> : If<Compare<First<TList>, TOp, TComparator>, First<TList>, FindAcc<AfterFirst<TList>, TOp, TComparator, TDeref>>;
|
|
3
3
|
/**
|
|
4
|
-
* **Find**`<TList,
|
|
4
|
+
* **Find**`<TList,TOp,TComparator,[TDeref]>`
|
|
5
5
|
*
|
|
6
6
|
* Type utility used to find the first value in `TList` which _equals_ `TValue`.
|
|
7
7
|
* Will return _undefined_ if no matches found.
|
|
@@ -18,20 +18,9 @@ type FindAcc<TList extends readonly unknown[], TFind, TDeref extends string | nu
|
|
|
18
18
|
*
|
|
19
19
|
* **Related**: `FindExtends`
|
|
20
20
|
*/
|
|
21
|
-
export type Find<TList extends readonly unknown[],
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
*
|
|
26
|
-
* Type utility used to find the first value in `TList` which _extends_ `TValue`.
|
|
27
|
-
* Will return _undefined_ if no matches found.
|
|
28
|
-
*
|
|
29
|
-
* - use **Find** if you want a stricter match
|
|
30
|
-
* - by default, values in `TList` will be compared directly but you can _dereference_
|
|
31
|
-
* array and object properties with `TIndex` if you want to compare on a child property
|
|
32
|
-
*
|
|
33
|
-
* **Related:** `Find`
|
|
34
|
-
*/
|
|
35
|
-
export type FindExtends<TList extends readonly unknown[], TFind, TDeref extends string | number | null = null> = FindExtendsAcc<TList, TFind, TDeref>;
|
|
21
|
+
export type Find<TList extends readonly unknown[], TOp extends "extends" | "equals" | "startsWith" | "endsWith" | "lessThan" | "greaterThan", TComparator extends Or<[
|
|
22
|
+
IsEqual<TOp, "startsWith">,
|
|
23
|
+
IsEqual<TOp, "endsWith">
|
|
24
|
+
]> extends true ? string : Or<[IsEqual<TOp, "lessThan">, IsEqual<TOp, "greaterThan">]> extends true ? NumberLike : unknown, TDeref extends string | number | null = null> = FindAcc<TList, TOp, TComparator, TDeref>;
|
|
36
25
|
export {};
|
|
37
26
|
//# sourceMappingURL=Find.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Find.d.ts","sourceRoot":"","sources":["../../../src/types/lists/Find.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE,iBAAwB;
|
|
1
|
+
{"version":3,"file":"Find.d.ts","sourceRoot":"","sources":["../../../src/types/lists/Find.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE,EAAE,EAAE,UAAU,EAAE,OAAO,EAAE,iBAAwB;AAE1F,KAAK,OAAO,CACV,KAAK,SAAS,SAAS,OAAO,EAAE,EAChC,GAAG,SAAS,SAAS,GAAG,QAAQ,GAAG,YAAY,GAAG,UAAU,GAAG,UAAU,GAAG,aAAa,EACzF,WAAW,EACX,MAAM,SAAS,MA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ription, FnDefn, TupleToUnion, Narrow } from "../index";
|
|
2
2
|
/**
|
|
3
3
|
* **DoneFnTuple**`<[TTuple],[TMakeUnion],[TFns]>`
|
|
4
4
|
*
|
|
@@ -16,11 +16,11 @@ export type DoneFnTuple<TFns extends {
|
|
|
16
16
|
"add a value to the tuple/union"
|
|
17
17
|
];
|
|
18
18
|
}, TMakeUnion extends boolean = false, TState extends readonly Narrow[] = Narrow[]> = {
|
|
19
|
-
[K in keyof TFns]:
|
|
19
|
+
[K in keyof TFns]: FnWithDescription<TFns[K]>;
|
|
20
20
|
} & {
|
|
21
21
|
state: TState;
|
|
22
22
|
type_as_union: TMakeUnion;
|
|
23
|
-
done:
|
|
23
|
+
done: FnWithDescription<[
|
|
24
24
|
() => If<IsTrue<TMakeUnion>, TupleToUnion<TState>, TState>,
|
|
25
25
|
"exits the API surface with the state which has been accumulated so far"
|
|
26
26
|
]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DoneFnTuple.d.ts","sourceRoot":"","sources":["../../../src/types/literals/DoneFnTuple.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"DoneFnTuple.d.ts","sourceRoot":"","sources":["../../../src/types/literals/DoneFnTuple.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,iBAAiB,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAC,iBAAwB;AAG7F;;;;;;;;GAQG;AACH,MAAM,MAAM,WAAW,CACvB,IAAI,SAAS;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAC,GAAG;IACrC,GAAG,EAAE;QACH,CAAC,IAAI,SAAS,MAAM,EAAE,CAAC,EAAE,IAAI,KAAK,OAAO;QACzC,gCAAgC;KACjC,CAAC;CACH,EACD,UAAU,SAAS,OAAO,GAAG,KAAK,EAClC,MAAM,SAAS,SAAS,MAAM,EAAE,GAAG,MAAM,EAAE,IACvC;KACD,CAAC,IAAI,MAAM,IAAI,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;CAC9C,GAAG;IACF,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,UAAU,CAAC;IAC1B,IAAI,EAAE,iBAAiB,CAAC;QACtB,MAAM,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAC1D,wEAAwE;KACzE,CAAC,CAAC;CACJ,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* **Unset**
|
|
3
|
+
*
|
|
4
|
+
* The **Unset** type allows you to specify a _parameter_ which
|
|
5
|
+
* has **not** been set yet but then allows a user to choose any
|
|
6
|
+
* value they like.
|
|
7
|
+
*
|
|
8
|
+
* **Related:** `unset()`
|
|
9
|
+
*/
|
|
10
|
+
export type Unset = {
|
|
11
|
+
kind: "Unset";
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=Unset.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Unset.d.ts","sourceRoot":"","sources":["../../../src/types/literals/Unset.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AACH,MAAM,MAAM,KAAK,GAAG;IAClB,IAAI,EAAE,OAAO,CAAC;CACf,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/literals/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/literals/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,SAAS,CAAC"}
|
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
* A type which represents a number whether it be a _number_ or
|
|
5
5
|
* a string literal shaped as a number (aka, `${string}`).
|
|
6
6
|
*/
|
|
7
|
-
export type NumberLike
|
|
7
|
+
export type NumberLike = number | `${number}`;
|
|
8
8
|
//# sourceMappingURL=NumberLike.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NumberLike.d.ts","sourceRoot":"","sources":["../../../src/types/numeric-literals/NumberLike.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"NumberLike.d.ts","sourceRoot":"","sources":["../../../src/types/numeric-literals/NumberLike.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,GAAG,MAAM,EAAE,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PROXMOX_CT_STATE } from "../../constants/index";
|
|
2
|
+
import { TupleToUnion } from "../index";
|
|
3
|
+
/**
|
|
4
|
+
* the _states_ a Proxmox LXC container can be in
|
|
5
|
+
*/
|
|
6
|
+
export type ProxmoxCtState = TupleToUnion<typeof PROXMOX_CT_STATE>;
|
|
7
|
+
//# sourceMappingURL=Proxmox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Proxmox.d.ts","sourceRoot":"","sources":["../../../src/types/string-literals/Proxmox.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,8BAA4B;AACvD,OAAO,EAAE,YAAY,EAAE,iBAAwB;AAE/C;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,YAAY,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { AfterFirst, First } from "../lists";
|
|
2
|
+
import { Chars } from "./Chars";
|
|
3
|
+
type Process<TChars extends readonly string[], TOp extends "is" | "not", TComparator extends string, TResult extends string = ""> = [] extends TChars ? TResult : First<TChars> extends TComparator ? TOp extends "is" ? Process<AfterFirst<TChars>, TOp, TComparator, `${TResult}${First<TChars>}`> : TResult : TOp extends "is" ? TResult : Process<AfterFirst<TChars>, TOp, TComparator, `${TResult}${First<TChars>}`>;
|
|
4
|
+
/**
|
|
5
|
+
* **RetainUntil**`<TContent,TComparator>`
|
|
6
|
+
*
|
|
7
|
+
* Proxies the content of `TContent` character-by-character _until_
|
|
8
|
+
* a character _extends_ `TComparator`.
|
|
9
|
+
*
|
|
10
|
+
* ```ts
|
|
11
|
+
* // "1984"
|
|
12
|
+
* type Num = RetainUntil<"1984 is a number", WhiteSpace>;
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* **Related:** `RetainWhile`
|
|
16
|
+
*/
|
|
17
|
+
export type RetainUntil<TContent extends string, TComparator extends string> = Process<Chars<TContent>, "not", TComparator>;
|
|
18
|
+
/**
|
|
19
|
+
* **RetainWhile**`<TContent,TComparator>`
|
|
20
|
+
*
|
|
21
|
+
* Proxies the content of `TContent` character-by-character _until_
|
|
22
|
+
* a character _does not extend_ `TComparator`.
|
|
23
|
+
*
|
|
24
|
+
* ```ts
|
|
25
|
+
* // "1984"
|
|
26
|
+
* type Num = RetainWhile<"1984 is a number", NumericChar>;
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* **Related:** `RetainUntil`
|
|
30
|
+
*/
|
|
31
|
+
export type RetainWhile<TContent extends string, TComparator extends string> = Process<Chars<TContent>, "is", TComparator>;
|
|
32
|
+
export {};
|
|
33
|
+
//# sourceMappingURL=RetainUntil.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RetainUntil.d.ts","sourceRoot":"","sources":["../../../src/types/string-literals/RetainUntil.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,KAAK,OAAO,CACV,MAAM,SAAS,SAAS,MAAM,EAAE,EAChC,GAAG,SAAS,IAAI,GAAG,KAAK,EACxB,WAAW,SAAS,MAAM,EAC1B,OAAO,SAAS,MAAM,GAAG,EAAE,IACzB,EAAE,SAAS,MAAM,GACnB,OAAO,GACP,KAAK,CAAC,MAAM,CAAC,SAAS,WAAW,GAC/B,GAAG,SAAS,IAAI,GACd,OAAO,CACL,UAAU,CAAC,MAAM,CAAC,EAClB,GAAG,EACH,WAAW,EACX,GAAG,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC,EAAE,CAC7B,GACD,OAAO,GACT,GAAG,SAAS,IAAI,GACd,OAAO,GACP,OAAO,CACL,UAAU,CAAC,MAAM,CAAC,EAClB,GAAG,EACH,WAAW,EACX,GAAG,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC,EAAE,CAC7B,CAAC;AAER;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,WAAW,CACrB,QAAQ,SAAS,MAAM,EACvB,WAAW,SAAS,MAAM,IACxB,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAC,KAAK,EAAC,WAAW,CAAC,CAAC;AAG/C;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,WAAW,CACrB,QAAQ,SAAS,MAAM,EACvB,WAAW,SAAS,MAAM,IACxB,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAC,IAAI,EAAC,WAAW,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AfterFirst, BeforeLast, Chars, Filter, First,
|
|
1
|
+
import { AfterFirst, BeforeLast, Chars, Filter, First, IsUnion, IsStringLiteral, IsWideType, Last, TupleToUnion, UnionToTuple, As } from "../index";
|
|
2
2
|
type UnionPolicy = "omit" | "include";
|
|
3
3
|
type UnionSplit<TContent extends readonly string[], TSep extends string, TUnionPolicy extends UnionPolicy, TResult extends readonly string[] = []> = [] extends TContent ? TResult : UnionSplit<AfterFirst<TContent>, // advance to next character
|
|
4
4
|
TSep, TUnionPolicy, First<TContent> extends TSep ? [
|
|
@@ -13,7 +13,7 @@ type LiteralSplit<TContent extends string, TSep extends string, TUnionPolicy ext
|
|
|
13
13
|
TUnionPolicy extends "omit" ? Block : `${Block}${TSep}`
|
|
14
14
|
]> : Filter<[...TResults, TContent], "">;
|
|
15
15
|
type Process<TContent extends string, TSep extends string | readonly string[], TUnionPolicy extends UnionPolicy = "omit"> = IsWideType<TContent> extends true ? string : TSep extends readonly string[] ? TupleToUnion<TSep> extends string ? Chars<TContent> extends readonly string[] ? UnionSplit<Chars<TContent>, TupleToUnion<TSep>, TUnionPolicy> : never : never : TSep extends string ? LiteralSplit<TContent, TSep, TUnionPolicy> : never;
|
|
16
|
-
type PreProcess<TContent extends string, TSep extends string | readonly string[], TUnionPolicy extends UnionPolicy = "omit"> =
|
|
16
|
+
type PreProcess<TContent extends string, TSep extends string | readonly string[], TUnionPolicy extends UnionPolicy = "omit"> = IsUnion<TSep> extends true ? UnionToTuple<TSep> extends readonly string[] ? Process<TContent, UnionToTuple<TSep>, TUnionPolicy> : never : Process<TContent, TSep, TUnionPolicy>;
|
|
17
17
|
/**
|
|
18
18
|
* **Split**`<TContent,TSep,[TPolicy]>`
|
|
19
19
|
*
|
|
@@ -24,6 +24,6 @@ type PreProcess<TContent extends string, TSep extends string | readonly string[]
|
|
|
24
24
|
* - typically you want to have the `TSep` _omitted_ from the result elements
|
|
25
25
|
* but you can opt to include them by changing `TPolicy` to "include"
|
|
26
26
|
*/
|
|
27
|
-
export type Split<TContent extends string, TSep extends string | readonly string[], TPolicy extends UnionPolicy = "omit"> =
|
|
27
|
+
export type Split<TContent extends string, TSep extends string | readonly string[], TPolicy extends UnionPolicy = "omit"> = IsStringLiteral<TContent> extends true ? As<PreProcess<TContent, TSep, TPolicy>, readonly string[]> : string[];
|
|
28
28
|
export {};
|
|
29
29
|
//# sourceMappingURL=Split.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Split.d.ts","sourceRoot":"","sources":["../../../src/types/string-literals/Split.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,UAAU,EACV,KAAK,EACL,MAAM,EACN,KAAK,EACL,
|
|
1
|
+
{"version":3,"file":"Split.d.ts","sourceRoot":"","sources":["../../../src/types/string-literals/Split.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,UAAU,EACV,KAAK,EACL,MAAM,EACN,KAAK,EACL,OAAO,EACP,eAAe,E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AAC,UAAU,CAAC,QAAQ,EAAC,IAAI,EAAC,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC,GACxD,MAAM,EAAE,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IsStringLiteral
|
|
1
|
+
import { IsStringLiteral } from "../index";
|
|
2
2
|
/**
|
|
3
3
|
* **StripAfter**`<TStr, TBreak>`
|
|
4
4
|
*
|
|
@@ -11,5 +11,5 @@ import { IsStringLiteral, If } from "../index";
|
|
|
11
11
|
* type T = StripAfter<"hello world", " ">;
|
|
12
12
|
* ```
|
|
13
13
|
*/
|
|
14
|
-
export type StripAfter<TStr extends string, TBreak extends string> =
|
|
14
|
+
export type StripAfter<TStr extends string, TBreak extends string> = IsStringLiteral<TStr> extends true ? IsStringLiteral<TBreak> extends true ? TStr extends `${infer Before}${TBreak}${string}` ? Before : TStr : string : string;
|
|
15
15
|
//# sourceMappingURL=StripAfter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StripAfter.d.ts","sourceRoot":"","sources":["../../../src/types/string-literals/StripAfter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAG,eAAe,EAAE,
|
|
1
|
+
{"version":3,"file":"StripAfter.d.ts","sourceRoot":"","sources":["../../../src/types/string-literals/StripAfter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAG,eAAe,EAAE,iBAAwB;AAEnD;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,UAAU,CACpB,IAAI,SAAS,MAAM,EACnB,MAAM,SAAS,MAAM,IACnB,eAAe,CAAC,IAAI,CAAC,SAAS,IAAI,GAClC,eAAe,CAAC,MAAM,CAAC,SAAS,IAAI,GAClC,IAAI,SAAS,GAAG,MAAM,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,GAC9C,MAAM,GACN,IAAI,GACN,MAAM,GACR,MAAM,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IsStringLiteral } from "../index";
|
|
2
2
|
/**
|
|
3
3
|
* **StripBefore**`<TStr, TBreak>`
|
|
4
4
|
*
|
|
@@ -11,5 +11,5 @@ import { If, IsStringLiteral } from "../index";
|
|
|
11
11
|
* type T = StripBefore<"hello world", " ">;
|
|
12
12
|
* ```
|
|
13
13
|
*/
|
|
14
|
-
export type StripBefore<TStr extends string, TBreak extends string> =
|
|
14
|
+
export type StripBefore<TStr extends string, TBreak extends string> = IsStringLiteral<TStr> extends true ? IsStringLiteral<TBreak> extends true ? TStr extends `${string}${TBreak}${infer REST}` ? `${REST}` : TStr : string : string;
|
|
15
15
|
//# sourceMappingURL=StripBefore.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StripBefore.d.ts","sourceRoot":"","sources":["../../../src/types/string-literals/StripBefore.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"StripBefore.d.ts","sourceRoot":"","sources":["../../../src/types/string-literals/StripBefore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,iBAAwB;AAElD;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,WAAW,CACrB,IAAI,SAAS,MAAM,EACnB,MAAM,SAAS,MAAM,IACnB,eAAe,CAAC,IAAI,CAAC,SAAS,IAAI,GAClC,eAAe,CAAC,MAAM,CAAC,SAAS,IAAI,GAClC,IAAI,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,IAAI,EAAE,GAC5C,GAAG,IAAI,EAAE,GACT,IAAI,GACN,MAAM,GACR,MAAM,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { And, AsNumber, AsString,
|
|
1
|
+
import { And, AsNumber, AsString, IsStringLiteral } from "../index";
|
|
2
2
|
type Process<TContent extends string, TStrip extends string> = And<[IsStringLiteral<TContent>, IsStringLiteral<TStrip>]> extends true ? TContent extends `${TStrip & string}${infer After}` ? After : TContent : string;
|
|
3
3
|
/**
|
|
4
4
|
* **StripLeading**`<T, U>`
|
|
@@ -16,6 +16,6 @@ type Process<TContent extends string, TStrip extends string> = And<[IsStringLite
|
|
|
16
16
|
* - if `T` is a non-string type then no transformation will be done
|
|
17
17
|
* - same applies to `U`
|
|
18
18
|
*/
|
|
19
|
-
export type StripLeading<TContent extends string | number, TStrip extends string | number> =
|
|
19
|
+
export type StripLeading<TContent extends string | number, TStrip extends string | number> = TContent extends number ? AsNumber<Process<AsString<TContent>, AsString<TStrip>>> : TContent extends string ? Process<AsString<TContent>, AsString<TStrip>> : never;
|
|
20
20
|
export {};
|
|
21
21
|
//# sourceMappingURL=StripLeading.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StripLeading.d.ts","sourceRoot":"","sources":["../../../src/types/string-literals/StripLeading.ts"],"names":[],"mappings":"AAAA,OAAO,EAAI,GAAG,EAAE,QAAQ,EAAE,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"StripLeading.d.ts","sourceRoot":"","sources":["../../../src/types/string-literals/StripLeading.ts"],"names":[],"mappings":"AAAA,OAAO,EAAI,GAAG,EAAE,QAAQ,EAAE,QAAQ,EAAE,eAAe,EAAE,iBAAwB;AAE7E,KAAK,OAAO,CACV,QAAQ,SAAS,MAAM,EACvB,MAAM,SAAS,MAAM,IACnB,GAAG,CAAC,CAAE,eAAe,CAAC,QAAQ,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,IAAI,GACvE,QAAQ,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,KAAK,EAAE,GACjD,KAAK,GACL,QAAQ,GACV,MAAM,CAAC;AAEX;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,YAAY,CACtB,QAAQ,SAAS,MAAM,GAAC,MAAM,EAC9B,MAAM,SAAS,MAAM,GAAC,MAAM,IAC1B,QAAQ,SAAS,MAAM,GACzB,QAAQ,CACN,OAAO,CACL,QAAQ,CAAC,QAAQ,CAAC,EAClB,QAAQ,CAAC,MAAM,CAAC,CACjB,CACF,GACD,QAAQ,SAAS,MAAM,GACrB,OAAO,CACP,QAAQ,CAAC,QAAQ,CAAC,EAClB,QAAQ,CAAC,MAAM,CAAC,CACjB,GACC,KAAK,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { AfterFirst, First, Shift, Chars } from "../index";
|
|
2
|
+
type Process<TChars extends readonly string[], TOp extends "is" | "not", TComparator extends string, TResult extends string> = [] extends TChars ? TResult : First<TChars> extends TComparator ? TOp extends "is" ? Process<AfterFirst<TChars>, TOp, TComparator, Shift<TResult>> : TResult : TOp extends "is" ? TResult : Process<AfterFirst<TChars>, TOp, TComparator, Shift<TResult>>;
|
|
3
|
+
/**
|
|
4
|
+
* **StripUntil**`<TContent,TComparator>`
|
|
5
|
+
*
|
|
6
|
+
* Strip characters from the start of `TContent` _until_ a
|
|
7
|
+
* character extends `TComparator`.
|
|
8
|
+
*/
|
|
9
|
+
export type StripUntil<TContent extends string, TComparator extends string> = Process<Chars<TContent>, "not", TComparator, TContent>;
|
|
10
|
+
/**
|
|
11
|
+
* **StripWhile**`<TContent,TComparator>`
|
|
12
|
+
*
|
|
13
|
+
* Strip characters from the start of `TContent` _while_ those
|
|
14
|
+
* characters extend `TComparator`.
|
|
15
|
+
*/
|
|
16
|
+
export type StripWhile<TContent extends string, TComparator extends string> = Process<Chars<TContent>, "is", TComparator, TContent>;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=StripUntil.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StripUntil.d.ts","sourceRoot":"","sources":["../../../src/types/string-literals/StripUntil.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAC,KAAK,EAAE,iBAAwB;AAGjE,KAAK,OAAO,CACV,MAAM,SAAS,SAAS,MAAM,EAAE,EAChC,GAAG,SAAS,IAAI,GAAG,KAAK,EACxB,WAAW,SAAS,MAAM,EAC1B,OAAO,SAAS,MAAM,IACpB,EAAE,SAAS,MAAM,GACnB,OAAO,GACP,KAAK,CAAC,MAAM,CAAC,SAAS,WAAW,GAC/B,GAAG,SAAS,IAAI,GACd,OAAO,CACL,UAAU,CAAC,MAAM,CAAC,EAClB,GAAG,EACH,WAAW,EACX,KAAK,CAAC,OAAO,CAAC,CACf,GACD,OAAO,GACT,GAAG,SAAS,IAAI,GACd,OAAO,GACP,OAAO,CACL,UAAU,CAAC,MAAM,CAAC,EAClB,GAAG,EACH,WAAW,EACX,KAAK,CAAC,OAAO,CAAC,CACf,CAAC;AAGR;;;;;GAKG;AACH,MAAM,MAAM,UAAU,CACpB,QAAQ,SAAS,MAAM,EACvB,WAAW,SAAS,MAAM,IACxB,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAC,KAAK,EAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;AAIzD;;;;;GAKG;AACH,MAAM,MAAM,UAAU,CACpB,QAAQ,SAAS,MAAM,EACvB,WAAW,SAAS,MAAM,IACxB,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAC,IAAI,EAAC,WAAW,EAAE,QAAQ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,5 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { TupleToUnion, Mutable, IsStringLiteral, IsDomainName } from "../../index";
|
|
2
|
+
import { TOP_LEVEL_DOMAINS } from "../../../constants/index";
|
|
3
|
+
/**
|
|
4
|
+
* **TLD**
|
|
5
|
+
*
|
|
6
|
+
* A union type of all of the common top-level domains along with many
|
|
7
|
+
* others which are starting to be used. This is _not_ meant to be
|
|
8
|
+
* comprehensive.
|
|
9
|
+
*/
|
|
10
|
+
export type TLD = Mutable<TupleToUnion<typeof TOP_LEVEL_DOMAINS>>;
|
|
3
11
|
/**
|
|
4
12
|
* **DnsName**
|
|
5
13
|
*
|
|
@@ -8,27 +16,18 @@ type DefaultPrefix = ["www"];
|
|
|
8
16
|
* **Related:** `DomainName`, `UrlsFrom`
|
|
9
17
|
*/
|
|
10
18
|
export type DnsName = `${string}.${string}`;
|
|
11
|
-
type _Names<TDomain extends readonly DnsName[], TPrefixes extends readonly string[], TResults extends readonly DomainName[] = []> = [] extends TDomain ? TResults : IfLength<TPrefixes, 0, _Names<AfterFirst<TDomain>, TPrefixes, [
|
|
12
|
-
...TResults,
|
|
13
|
-
First<TDomain>
|
|
14
|
-
]>, _Names<AfterFirst<TDomain>, TPrefixes, [
|
|
15
|
-
...TResults,
|
|
16
|
-
...([First<TDomain>, `${TupleToUnion<TPrefixes>}.${First<TDomain>}`])
|
|
17
|
-
]>>;
|
|
18
19
|
/**
|
|
19
20
|
* **DomainName**
|
|
20
21
|
*
|
|
21
22
|
* Designed to represents a DNS name.
|
|
22
23
|
*
|
|
23
|
-
* - Without the use of
|
|
24
|
-
*
|
|
25
|
-
* -
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
* - each domain name _prefixed_ by one or more
|
|
24
|
+
* - Without the use of a generic this simply applies the same type
|
|
25
|
+
* as `DnsName`
|
|
26
|
+
* - When using the generic to _test_ the potential DNS name we can
|
|
27
|
+
* run more validations and return `never` if they do not pass.
|
|
28
|
+
* - When using the generic with a wide `T` you will get `unknown`
|
|
29
29
|
*
|
|
30
|
-
* **Related:** `
|
|
30
|
+
* **Related:** `DnsName`
|
|
31
31
|
*/
|
|
32
|
-
export type DomainName<
|
|
33
|
-
export {};
|
|
32
|
+
export type DomainName<T extends string | null = null> = T extends null ? DnsName : T extends string ? IsStringLiteral<T> extends true ? IsDomainName<T> extends true ? T & DnsName : never : unknown : never;
|
|
34
33
|
//# sourceMappingURL=DomainName.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DomainName.d.ts","sourceRoot":"","sources":["../../../../src/types/string-literals/character-sets/DomainName.ts"],"names":[],"mappings":"AACA,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"DomainName.d.ts","sourceRoot":"","sources":["../../../../src/types/string-literals/character-sets/DomainName.ts"],"names":[],"mappings":"AACA,OAAO,EACL,YAAY,EACZ,OAAO,EACP,eAAe,EACf,YAAY,EACb,oBAAwB;AACzB,OAAO,EAAE,iBAAiB,EAAE,iCAA6B;AAEzD;;;;;;GAMG;AACH,MAAM,MAAM,GAAG,GAAG,OAAO,CACvB,YAAY,CAAC,OAAO,iBAAiB,CAAC,CACvC,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,OAAO,GAAG,GAAG,MAAM,IAAI,MAAM,EAAE,CAAC;AAE5C;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,UAAU,CACpB,CAAC,SAAS,MAAM,GAAG,IAAI,GAAG,IAAI,IAC5B,CAAC,SAAS,IAAI,GAChB,OAAO,GACP,CAAC,SAAS,MAAM,GAChB,eAAe,CAAC,CAAC,CAAC,SAAS,IAAI,GAC7B,YAAY,CAAC,CAAC,CAAC,SAAS,IAAI,GAC1B,CAAC,GAAG,OAAO,GACX,KAAK,GACP,OAAO,GACT,KAAK,CAAC"}
|
|
@@ -1,11 +1,29 @@
|
|
|
1
|
-
import { HexadecimalChar, NumericChar, NumericCharZeroToFive, Suggest } from "../../index";
|
|
1
|
+
import { AsString, HexadecimalChar, IsStringLiteral, NumericChar, NumericCharZeroToFive, ReplaceAll, StripTrailing, Suggest, UnionToTuple } from "../../index";
|
|
2
2
|
import { IPv6 } from "../../../constants/index";
|
|
3
3
|
/**
|
|
4
4
|
* **IPv4Number**
|
|
5
5
|
*
|
|
6
6
|
* A high resolution typing for a single octet of an **IP version 4** IP address.
|
|
7
7
|
*/
|
|
8
|
-
export type
|
|
8
|
+
export type Ip4Octet = `25${NumericCharZeroToFive}` | `24${NumericChar}` | `23${NumericChar}` | `22${NumericChar}` | `21${NumericChar}` | `20${NumericChar}` | `1${NumericChar}${NumericChar}` | `${NumericChar}${NumericChar}` | `${NumericChar}`;
|
|
9
|
+
export type Ip4NetmaskSuggestion<TVlan extends readonly number[] = [1, 10]> = Suggest<[
|
|
10
|
+
`10.0.0.0/8`,
|
|
11
|
+
`192.168.0.0/16`,
|
|
12
|
+
`172.16.0.0/16`,
|
|
13
|
+
`10.10.${AsString<UnionToTuple<TVlan>>}.0/24`,
|
|
14
|
+
`192.168.${AsString<UnionToTuple<TVlan>>}.0/24`,
|
|
15
|
+
`172.16.${AsString<UnionToTuple<TVlan>>}.0/24`
|
|
16
|
+
]>;
|
|
17
|
+
export type Ip4Netmask8 = `${Ip4Octet}.0.0.0/8`;
|
|
18
|
+
export type Ip4Netmask16 = `${Ip4Octet}.${number}.0.0/16`;
|
|
19
|
+
export type Ip4Netmask24 = `${Ip4Octet}.${number}.${number}.0/24`;
|
|
20
|
+
export type Ip4Netmask32 = `${number}.${number}.${number}.${number}/32`;
|
|
21
|
+
/**
|
|
22
|
+
* **Ip4Netmask**
|
|
23
|
+
*
|
|
24
|
+
* A type which includes patterns for `/8`, `/16`, `/24`, and `/32` netmasks
|
|
25
|
+
*/
|
|
26
|
+
export type Ip4Netmask = Ip4Netmask8 | Ip4Netmask16 | Ip4Netmask24 | Ip4Netmask32;
|
|
9
27
|
/**
|
|
10
28
|
* the range of IPv6 addresses which are considered **multicast**.
|
|
11
29
|
*/
|
|
@@ -22,8 +40,14 @@ export type Ip6Group = `${HexadecimalChar}${string}`;
|
|
|
22
40
|
* A simple representation of an IPv4 address
|
|
23
41
|
*/
|
|
24
42
|
export type Ip4Address = `${number}.${number}.${number}.${number}`;
|
|
25
|
-
export type
|
|
26
|
-
export type
|
|
43
|
+
export type Ip6AddressFull = `${string}:${string}:${string}:${string}:${string}:${string}:${string}:${string}`;
|
|
44
|
+
export type Ip6AddressLoose = `${HexadecimalChar}${string}:${string}`;
|
|
45
|
+
/**
|
|
46
|
+
* **Ip6GroupExpansion**`<T>`
|
|
47
|
+
*
|
|
48
|
+
* Expands an IPv6's address by changing
|
|
49
|
+
*/
|
|
50
|
+
export type Ip6GroupExpansion<T> = T extends string ? IsStringLiteral<T> extends true ? StripTrailing<ReplaceAll<T, "::", ":0000:">, ":"> : string : never;
|
|
27
51
|
/**
|
|
28
52
|
* An IPv6 Address
|
|
29
53
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IpAddress.d.ts","sourceRoot":"","sources":["../../../../src/types/string-literals/character-sets/IpAddress.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,WAAW,EACX,qBAAqB,EACrB,OAAO,
|
|
1
|
+
{"version":3,"file":"IpAddress.d.ts","sourceRoot":"","sources":["../../../../src/types/string-literals/character-sets/IpAddress.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,eAAe,EACf,eAAe,EACf,WAAW,EACX,qBAAqB,EACrB,UAAU,EACV,aAAa,EACb,OAAO,EACP,YAAY,EACb,oBAAwB;AACzB,OAAO,EAAE,IAAI,EAAE,iCAA4B;AAE3C;;;;GAIG;AACH,MAAM,MAAM,QAAQ,GAClB,KAAK,qBAAqB,EAAE,GAC3B,KAAK,WAAW,EAAE,GAClB,KAAK,WAAW,EAAE,GAClB,KAAK,WAAW,EAAE,GAClB,KAAK,WAAW,EAAE,GAClB,KAAK,WAAW,EAAE,GAClB,IAAI,WAAW,GAAG,WAAW,EAAE,GAC/B,GAAG,WAAW,GAAG,WAAW,EAAE,GAC9B,GAAG,WAAW,EAAE,CAAC;AAGpB,MAAM,MAAM,oBAAoB,CAAC,KAAK,SAAS,SAAS,MAAM,EAAE,GAAG,CAAC,CAAC,EAAC,EAAE,CAAC,IAAI,OAAO,CAAC;IACnF,YAAY;IACZ,gBAAgB;IAChB,eAAe;IACf,SAAS,QAAQ,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,OAAO;IAC7C,WAAW,QAAQ,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,OAAO;IAC/C,UAAU,QAAQ,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,OAAO;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CAAC,CAAC,CAAC,CAAC,IAAI,MAAM,IAAI,MAAM,EAAE,GACrC,CAAC,SAAS,CAAC,QAAQ,EAAC,QAAQ,EAAC,QAAQ,CAAC,GACtC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,MAAM,EAAE,GACnC,CAAC,SAAS,CAAC,QAAQ,EAAC,QAAQ,EAAC,QAAQ,EAAC,QAAQ,EAAC,GAAG,QAAQ,EAAE,CAAC,GAC7D,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,GACjC,GAAG,MAAM,IAAI,MAAM,IAAI,MAAM,IAAI,MAAM,EAAE,CAAC;AAE5C;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,SAAS,CACnB,OAAO,SAAS,eAAe,GAAG,eAAe,EACjD,KAAK,SAAS,MAAM,GAAG,MAAM,IAC3B,GAAG,OAAO,MAAM,KAAK,EAAE,CAAC;AAG5B;;;;;;GAMG;AACH,MAAM,MAAM,gBAAgB,GAAG,OAAO,CAAC,aAAa,GAAG,WAAW,GAAG,aAAa,CAAC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AfterFirst, First } from "../..";
|
|
2
|
+
type Cascade<T extends readonly string[], TResult extends string = ""> = [] extends T ? TResult : Cascade<AfterFirst<T>, `${TResult}${First<T> | ""}`>;
|
|
3
|
+
/**
|
|
4
|
+
* **Optional**`<T>`
|
|
5
|
+
*
|
|
6
|
+
* String literal utility which makes the text `T` either present
|
|
7
|
+
* or just an _empty string_ (aka, "optional").
|
|
8
|
+
*
|
|
9
|
+
* - if you send in an array of strings they will build a
|
|
10
|
+
* string literal up left-to-right.
|
|
11
|
+
*/
|
|
12
|
+
export type Optional<T extends string | readonly string[]> = T extends readonly string[] ? Cascade<T> : T | "";
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=Optional.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Optional.d.ts","sourceRoot":"","sources":["../../../../src/types/string-literals/character-sets/Optional.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAE1C,KAAK,OAAO,CACV,CAAC,SAAS,SAAS,MAAM,EAAE,EAC3B,OAAO,SAAS,MAAM,GAAG,EAAE,IACzB,EAAE,SAAS,CAAC,GACd,OAAO,GACP,OAAO,CACL,UAAU,CAAC,CAAC,CAAC,EACb,GAAG,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,EAAE,EAAE,CAC7B,CAAC;AAGJ;;;;;;;;GAQG;AACH,MAAM,MAAM,QAAQ,CAClB,CAAC,SAAS,MAAM,GAAG,SAAS,MAAM,EAAE,IAClC,CAAC,SAAS,SAAS,MAAM,EAAE,GAC7B,OAAO,CAAC,CAAC,CAAC,GACV,CAAC,GAAG,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Repos.d.ts","sourceRoot":"","sources":["../../../../src/types/string-literals/character-sets/Repos.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Repos.d.ts","sourceRoot":"","sources":["../../../../src/types/string-literals/character-sets/Repos.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,YAAY,EACZ,aAAa,EACb,MAAM,EACN,OAAO,EACP,QAAQ,EACR,gBAAgB,EAChB,UAAU,EACV,MAAM,EACN,IAAI,EACJ,iBAAiB,EACjB,OAAO,EACP,YAAY,EACZ,EAAE,EACH,oBAAwB;AACzB,OAAO,EAAE,QAAQ,EAAE,8BAA8B,EAAE,eAAe,EAAE,YAAY,EAAE,kBAAkB,EAAE,iCAA4B;AAElI;;;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