inferred-types 0.46.1 → 0.47.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.
- package/dist/constants/Marked.d.ts +7 -0
- package/dist/constants/Marked.d.ts.map +1 -1
- package/dist/constants/Never.d.ts.map +1 -1
- package/dist/constants/Tailwind.d.ts +31 -0
- package/dist/constants/Tailwind.d.ts.map +1 -0
- package/dist/constants/Tailwind.js +30 -0
- package/dist/constants/TypeTokens.d.ts +15 -0
- package/dist/constants/TypeTokens.d.ts.map +1 -1
- package/dist/constants/TypeTokens.js +92 -0
- package/dist/constants/Wide.d.ts +2 -1
- package/dist/constants/Wide.d.ts.map +1 -1
- package/dist/constants/Wide.js +0 -1
- package/dist/constants/createConstant.d.ts.map +1 -1
- package/dist/constants/index.d.ts +1 -0
- package/dist/constants/index.d.ts.map +1 -1
- package/dist/constants/index.js +1 -0
- package/dist/constants/tsconfig.tsbuildinfo +1 -1
- package/dist/inferred-types/index.cjs +1827 -1076
- package/dist/inferred-types/tsconfig.tsbuildinfo +1 -1
- package/dist/runtime/api/defineApi.d.ts +1 -36
- package/dist/runtime/api/defineApi.d.ts.map +1 -1
- package/dist/runtime/api/defineApi.js +90 -73
- package/dist/runtime/api/handleDoneFn.d.ts.map +1 -1
- package/dist/runtime/api/index.d.ts +1 -1
- package/dist/runtime/boolean-logic/ifArray.d.ts.map +1 -1
- 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/ifBoolean.d.ts.map +1 -1
- package/dist/runtime/boolean-logic/ifChar.d.ts.map +1 -1
- package/dist/runtime/boolean-logic/ifFalse.d.ts.map +1 -1
- package/dist/runtime/boolean-logic/ifHasKey.d.ts.map +1 -1
- package/dist/runtime/boolean-logic/ifLength.d.ts.map +1 -1
- package/dist/runtime/boolean-logic/ifNotNull.d.ts.map +1 -1
- package/dist/runtime/boolean-logic/ifNull.d.ts.map +1 -1
- package/dist/runtime/boolean-logic/ifNumber.d.ts.map +1 -1
- package/dist/runtime/boolean-logic/ifScalar.d.ts.map +1 -1
- package/dist/runtime/boolean-logic/ifString.d.ts.map +1 -1
- package/dist/runtime/boolean-logic/ifTrue.d.ts.map +1 -1
- package/dist/runtime/boolean-logic/ifUndefined.d.ts.map +1 -1
- package/dist/runtime/boolean-logic/ifUndefined.js +1 -1
- package/dist/runtime/combinators/and.d.ts.map +1 -1
- package/dist/runtime/combinators/or.d.ts.map +1 -1
- package/dist/runtime/dictionary/entries.js +1 -1
- package/dist/runtime/dictionary/get.d.ts.map +1 -1
- package/dist/runtime/dictionary/keysOf.d.ts.map +1 -1
- package/dist/runtime/dictionary/omit.d.ts.map +1 -1
- package/dist/runtime/dictionary/retain.d.ts +4 -9
- package/dist/runtime/dictionary/retain.d.ts.map +1 -1
- package/dist/runtime/dictionary/sharedKeys.d.ts +1 -1
- package/dist/runtime/dictionary/sharedKeys.d.ts.map +1 -1
- package/dist/runtime/dictionary/takeProp.d.ts.map +1 -1
- package/dist/runtime/dictionary/valuesOf.d.ts.map +1 -1
- package/dist/runtime/dictionary/withDefaults.d.ts.map +1 -1
- package/dist/runtime/dictionary/withKeys.d.ts +2 -2
- package/dist/runtime/dictionary/withKeys.d.ts.map +1 -1
- package/dist/runtime/dictionary/withoutKeys.d.ts +1 -13
- package/dist/runtime/dictionary/withoutKeys.d.ts.map +1 -1
- package/dist/runtime/dictionary/withoutValue.d.ts.map +1 -1
- package/dist/runtime/errors/KindError.d.ts.map +1 -1
- package/dist/runtime/errors/TypedError.d.ts.map +1 -1
- package/dist/runtime/errors/createErrorCondition.d.ts +5 -0
- package/dist/runtime/errors/createErrorCondition.d.ts.map +1 -1
- package/dist/runtime/errors/createErrorCondition.js +5 -0
- package/dist/runtime/errors/kindedError.d.ts.map +1 -1
- package/dist/runtime/functions/fnMeta.d.ts.map +1 -1
- package/dist/runtime/index.d.ts +2 -0
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/index.js +2 -0
- package/dist/runtime/initializers/addFnToProps.d.ts +2 -2
- package/dist/runtime/initializers/addFnToProps.d.ts.map +1 -1
- package/dist/runtime/initializers/addPropsToFn.d.ts +2 -2
- package/dist/runtime/initializers/addPropsToFn.d.ts.map +1 -1
- package/dist/runtime/initializers/createFnWithProps.d.ts.map +1 -1
- package/dist/runtime/initializers/defineObj.d.ts +2 -2
- package/dist/runtime/initializers/defineObj.d.ts.map +1 -1
- package/dist/runtime/initializers/defineTuple.d.ts.map +1 -1
- package/dist/runtime/lists/asArray.d.ts.map +1 -1
- package/dist/runtime/lists/createComparison.d.ts +2 -3
- package/dist/runtime/lists/createComparison.d.ts.map +1 -1
- package/dist/runtime/lists/createComparison.js +1 -1
- package/dist/runtime/lists/createConverter.d.ts +1 -1
- package/dist/runtime/lists/createConverter.d.ts.map +1 -1
- package/dist/runtime/lists/filter.d.ts +1 -1
- package/dist/runtime/lists/filter.js +4 -4
- package/dist/runtime/lists/find.d.ts +1 -1
- package/dist/runtime/lists/find.d.ts.map +1 -1
- package/dist/runtime/lists/index.d.ts +0 -1
- package/dist/runtime/lists/index.d.ts.map +1 -1
- package/dist/runtime/lists/index.js +0 -1
- package/dist/runtime/lists/indexOf.d.ts.map +1 -1
- package/dist/runtime/lists/indexOf.js +8 -5
- package/dist/runtime/lists/intersection.d.ts.map +1 -1
- package/dist/runtime/lists/join.d.ts +1 -1
- package/dist/runtime/lists/join.d.ts.map +1 -1
- package/dist/runtime/lists/join.js +6 -2
- package/dist/runtime/lists/last.d.ts +2 -2
- package/dist/runtime/lists/last.d.ts.map +1 -1
- package/dist/runtime/lists/logicalReturns.d.ts.map +1 -1
- package/dist/runtime/lists/reverse.d.ts.map +1 -1
- package/dist/runtime/lists/shift.d.ts +17 -5
- package/dist/runtime/lists/shift.d.ts.map +1 -1
- package/dist/runtime/lists/shift.js +33 -5
- package/dist/runtime/lists/slice.d.ts +2 -2
- package/dist/runtime/lists/slice.d.ts.map +1 -1
- package/dist/runtime/lists/unique.d.ts +2 -2
- package/dist/runtime/lists/unique.d.ts.map +1 -1
- package/dist/runtime/literals/box.d.ts.map +1 -1
- package/dist/runtime/literals/ensureLeading.d.ts +2 -2
- package/dist/runtime/literals/ensureLeading.d.ts.map +1 -1
- package/dist/runtime/literals/ensureLeading.js +6 -2
- package/dist/runtime/literals/ensureSurround.d.ts.map +1 -1
- package/dist/runtime/literals/ensureSurround.js +3 -1
- package/dist/runtime/literals/identity.d.ts.map +1 -1
- package/dist/runtime/literals/index.d.ts +2 -1
- package/dist/runtime/literals/index.d.ts.map +1 -1
- package/dist/runtime/literals/index.js +2 -1
- package/dist/runtime/literals/narrow.d.ts.map +1 -1
- package/dist/runtime/literals/phone/asPhoneNumber.d.ts +2 -0
- package/dist/runtime/literals/phone/asPhoneNumber.d.ts.map +1 -0
- package/dist/runtime/literals/phone/asPhoneNumber.js +62 -0
- package/dist/runtime/literals/phone/getPhoneCountryCode.d.ts +3 -0
- package/dist/runtime/literals/phone/getPhoneCountryCode.d.ts.map +1 -0
- package/dist/runtime/literals/phone/getPhoneCountryCode.js +7 -0
- package/dist/runtime/literals/phone/index.d.ts +4 -0
- package/dist/runtime/literals/phone/index.d.ts.map +1 -0
- package/dist/runtime/literals/phone/index.js +3 -0
- package/dist/runtime/literals/phone/removePhoneCountryCode.d.ts +3 -0
- package/dist/runtime/literals/phone/removePhoneCountryCode.d.ts.map +1 -0
- package/dist/runtime/literals/phone/removePhoneCountryCode.js +7 -0
- package/dist/runtime/literals/pluralize.d.ts.map +1 -1
- package/dist/runtime/literals/pluralize.js +4 -1
- package/dist/runtime/literals/retainAfter.d.ts.map +1 -1
- package/dist/runtime/literals/retainChars.d.ts +1 -1
- package/dist/runtime/literals/retainChars.d.ts.map +1 -1
- package/dist/runtime/literals/retainChars.js +2 -1
- package/dist/runtime/literals/retainWhile.d.ts.map +1 -1
- package/dist/runtime/literals/split.d.ts.map +1 -1
- package/dist/runtime/literals/stripAfter.d.ts.map +1 -1
- package/dist/runtime/literals/stripBefore.d.ts.map +1 -1
- package/dist/runtime/literals/stripChars.d.ts +1 -1
- package/dist/runtime/literals/stripChars.d.ts.map +1 -1
- package/dist/runtime/literals/stripChars.js +2 -1
- package/dist/runtime/literals/stripLeading.d.ts +1 -1
- package/dist/runtime/literals/stripLeading.d.ts.map +1 -1
- package/dist/runtime/literals/stripLeading.js +8 -6
- package/dist/runtime/literals/stripSurround.d.ts +19 -0
- package/dist/runtime/literals/stripSurround.d.ts.map +1 -0
- package/dist/runtime/literals/stripSurround.js +30 -0
- package/dist/runtime/literals/stripTrailing.d.ts +2 -2
- package/dist/runtime/literals/stripTrailing.d.ts.map +1 -1
- package/dist/runtime/literals/stripTrailing.js +9 -10
- package/dist/runtime/literals/stripUntil.d.ts.map +1 -1
- package/dist/runtime/literals/takeNumericCharacters.d.ts +2 -2
- package/dist/runtime/literals/takeNumericCharacters.d.ts.map +1 -1
- package/dist/runtime/literals/toKebabCase.d.ts.map +1 -1
- package/dist/runtime/literals/toNumericArray.d.ts +2 -2
- package/dist/runtime/literals/toNumericArray.d.ts.map +1 -1
- package/dist/runtime/literals/toPascalCase.d.ts.map +1 -1
- package/dist/runtime/literals/truncate.d.ts +1 -1
- package/dist/runtime/literals/truncate.d.ts.map +1 -1
- package/dist/runtime/literals/tuple.d.ts +1 -1
- package/dist/runtime/literals/tuple.d.ts.map +1 -1
- package/dist/runtime/meta/urlMeta.d.ts.map +1 -1
- package/dist/runtime/meta/urlMeta.js +8 -5
- package/dist/runtime/meta/youtube-meta.d.ts.map +1 -1
- package/dist/runtime/queues/fifo.d.ts +3 -0
- package/dist/runtime/queues/fifo.d.ts.map +1 -0
- package/dist/runtime/queues/fifo.js +40 -0
- package/dist/runtime/queues/index.d.ts +3 -0
- package/dist/runtime/queues/index.d.ts.map +1 -0
- package/dist/runtime/queues/index.js +2 -0
- package/dist/runtime/queues/lifo.d.ts +3 -0
- package/dist/runtime/queues/lifo.d.ts.map +1 -0
- package/dist/runtime/queues/lifo.js +34 -0
- package/dist/runtime/runtime-types/asToken.d.ts +35 -0
- package/dist/runtime/runtime-types/asToken.d.ts.map +1 -0
- package/dist/runtime/runtime-types/asToken.js +115 -0
- package/dist/runtime/runtime-types/asType.d.ts +4 -0
- package/dist/runtime/runtime-types/asType.d.ts.map +1 -0
- package/dist/runtime/runtime-types/asType.js +6 -0
- package/dist/runtime/runtime-types/choices.js +8 -8
- package/dist/runtime/runtime-types/index.d.ts +3 -2
- package/dist/runtime/runtime-types/index.d.ts.map +1 -1
- package/dist/runtime/runtime-types/index.js +3 -2
- package/dist/runtime/runtime-types/ip6Prefix.d.ts +2 -2
- package/dist/runtime/runtime-types/ip6Prefix.d.ts.map +1 -1
- package/dist/runtime/runtime-types/list.d.ts.map +1 -1
- package/dist/runtime/runtime-types/rec.d.ts.map +1 -1
- package/dist/runtime/runtime-types/shape-helpers/addToken.d.ts.map +1 -1
- package/dist/runtime/runtime-types/shape-helpers/atomics.d.ts.map +1 -1
- package/dist/runtime/runtime-types/shape-helpers/functions.d.ts +7 -2
- package/dist/runtime/runtime-types/shape-helpers/functions.d.ts.map +1 -1
- package/dist/runtime/runtime-types/shape-helpers/functions.js +5 -0
- package/dist/runtime/runtime-types/shape-helpers/getTokenData.d.ts +2 -1
- package/dist/runtime/runtime-types/shape-helpers/getTokenData.d.ts.map +1 -1
- package/dist/runtime/runtime-types/shape-helpers/getTokenName.d.ts +2 -1
- package/dist/runtime/runtime-types/shape-helpers/getTokenName.d.ts.map +1 -1
- package/dist/runtime/runtime-types/shape-helpers/literal-containers.d.ts.map +1 -1
- package/dist/runtime/runtime-types/shape-helpers/regexToken.d.ts +12 -0
- package/dist/runtime/runtime-types/shape-helpers/regexToken.d.ts.map +1 -0
- package/dist/runtime/runtime-types/shape-helpers/regexToken.js +39 -0
- package/dist/runtime/runtime-types/shape-helpers/singletons.d.ts +10 -0
- package/dist/runtime/runtime-types/shape-helpers/singletons.d.ts.map +1 -1
- package/dist/runtime/runtime-types/shape-helpers/singletons.js +15 -0
- package/dist/runtime/runtime-types/shape-helpers/union.d.ts +5 -0
- package/dist/runtime/runtime-types/shape-helpers/union.d.ts.map +1 -1
- package/dist/runtime/runtime-types/shape-helpers/union.js +5 -0
- package/dist/runtime/runtime-types/shape-helpers/wide-containers.d.ts +1 -1
- package/dist/runtime/runtime-types/shape-helpers/wide-containers.d.ts.map +1 -1
- package/dist/runtime/runtime-types/shape.d.ts +2 -2
- package/dist/runtime/runtime-types/shape.d.ts.map +1 -1
- package/dist/runtime/runtime-types/shape.js +1 -1
- package/dist/runtime/runtime-types/tokens/createTypeToken.d.ts +30 -0
- package/dist/runtime/runtime-types/tokens/createTypeToken.d.ts.map +1 -0
- package/dist/runtime/runtime-types/tokens/createTypeToken.js +29 -0
- package/dist/runtime/runtime-types/tokens/index.d.ts +3 -0
- package/dist/runtime/runtime-types/tokens/index.d.ts.map +1 -0
- package/dist/runtime/runtime-types/tokens/index.js +2 -0
- package/dist/runtime/runtime-types/tokens/simpleToken.d.ts +51 -0
- package/dist/runtime/runtime-types/tokens/simpleToken.d.ts.map +1 -0
- package/dist/runtime/runtime-types/tokens/simpleToken.js +64 -0
- package/dist/runtime/sets/uniqueKeys.d.ts.map +1 -1
- package/dist/runtime/tsconfig.tsbuildinfo +1 -1
- package/dist/runtime/type-conversion/asChars.d.ts.map +1 -1
- package/dist/runtime/type-conversion/asRecord.d.ts +1 -1
- package/dist/runtime/type-conversion/asRecord.d.ts.map +1 -1
- package/dist/runtime/type-conversion/asString.d.ts +7 -1
- package/dist/runtime/type-conversion/asString.d.ts.map +1 -1
- package/dist/runtime/type-conversion/asString.js +11 -3
- package/dist/runtime/type-conversion/csv.d.ts +17 -0
- package/dist/runtime/type-conversion/csv.d.ts.map +1 -0
- package/dist/runtime/type-conversion/csv.js +31 -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.map +1 -1
- package/dist/runtime/type-conversion/json.d.ts +18 -0
- package/dist/runtime/type-conversion/json.d.ts.map +1 -0
- package/dist/runtime/type-conversion/json.js +27 -0
- package/dist/runtime/type-conversion/mergeObjects.d.ts.map +1 -1
- package/dist/runtime/type-conversion/mergeScalars.d.ts.map +1 -1
- package/dist/runtime/type-conversion/optional.d.ts +20 -4
- package/dist/runtime/type-conversion/optional.d.ts.map +1 -1
- package/dist/runtime/type-conversion/optional.js +24 -6
- package/dist/runtime/type-conversion/union.d.ts.map +1 -1
- package/dist/runtime/type-guards/api-tg.d.ts.map +1 -1
- package/dist/runtime/type-guards/hasErrorConditions.d.ts +2 -4
- package/dist/runtime/type-guards/hasErrorConditions.d.ts.map +1 -1
- package/dist/runtime/type-guards/hasIndexOf.d.ts +2 -2
- package/dist/runtime/type-guards/hasIndexOf.d.ts.map +1 -1
- package/dist/runtime/type-guards/hasKeys.d.ts.map +1 -1
- package/dist/runtime/type-guards/hasWhitespace.d.ts.map +1 -1
- package/dist/runtime/type-guards/hasWhitespace.js +1 -1
- package/dist/runtime/type-guards/higher-order/endsWith.d.ts.map +1 -1
- package/dist/runtime/type-guards/higher-order/isEqual.d.ts.map +1 -1
- package/dist/runtime/type-guards/higher-order/isEqual.js +1 -1
- package/dist/runtime/type-guards/higher-order/isLength.d.ts.map +1 -1
- package/dist/runtime/type-guards/higher-order/isLength.js +1 -5
- package/dist/runtime/type-guards/higher-order/isSameTypeOf.d.ts.map +1 -1
- package/dist/runtime/type-guards/higher-order/isTuple.d.ts +1 -2
- package/dist/runtime/type-guards/higher-order/isTuple.d.ts.map +1 -1
- package/dist/runtime/type-guards/higher-order/isTuple.js +1 -2
- package/dist/runtime/type-guards/higher-order/isTypeOf.d.ts +1 -1
- package/dist/runtime/type-guards/higher-order/isTypeOf.d.ts.map +1 -1
- package/dist/runtime/type-guards/higher-order/startsWith.d.ts.map +1 -1
- package/dist/runtime/type-guards/higher-order/startsWith.js +1 -2
- package/dist/runtime/type-guards/index.d.ts +5 -0
- package/dist/runtime/type-guards/index.d.ts.map +1 -1
- package/dist/runtime/type-guards/index.js +5 -0
- package/dist/runtime/type-guards/isAlpha.d.ts.map +1 -1
- package/dist/runtime/type-guards/isBooleanLike.d.ts +9 -0
- package/dist/runtime/type-guards/isBooleanLike.d.ts.map +1 -0
- package/dist/runtime/type-guards/isBooleanLike.js +11 -0
- package/dist/runtime/type-guards/isCssAspectRatio.d.ts +1 -1
- package/dist/runtime/type-guards/isCssAspectRatio.d.ts.map +1 -1
- package/dist/runtime/type-guards/isDoneFn.d.ts.map +1 -1
- package/dist/runtime/type-guards/isEmail.d.ts +2 -1
- package/dist/runtime/type-guards/isEmail.d.ts.map +1 -1
- package/dist/runtime/type-guards/isEmail.js +10 -4
- package/dist/runtime/type-guards/isFalsy.d.ts.map +1 -1
- package/dist/runtime/type-guards/isHexadecimal.d.ts.map +1 -1
- package/dist/runtime/type-guards/isInlineSvg.d.ts +2 -1
- package/dist/runtime/type-guards/isInlineSvg.d.ts.map +1 -1
- package/dist/runtime/type-guards/isLeftRight.d.ts +2 -2
- package/dist/runtime/type-guards/isLeftRight.d.ts.map +1 -1
- package/dist/runtime/type-guards/isNever.d.ts.map +1 -1
- package/dist/runtime/type-guards/isNumericString.d.ts +8 -0
- package/dist/runtime/type-guards/isNumericString.d.ts.map +1 -1
- package/dist/runtime/type-guards/isNumericString.js +11 -0
- package/dist/runtime/type-guards/isPhoneNumber.d.ts +1 -1
- package/dist/runtime/type-guards/isPhoneNumber.d.ts.map +1 -1
- package/dist/runtime/type-guards/isPhoneNumber.js +16 -10
- package/dist/runtime/type-guards/isRegExp.d.ts +17 -0
- package/dist/runtime/type-guards/isRegExp.d.ts.map +1 -0
- package/dist/runtime/type-guards/isRegExp.js +32 -0
- package/dist/runtime/type-guards/isRuntimeUnion.d.ts.map +1 -1
- package/dist/runtime/type-guards/isSpecificConstant.d.ts.map +1 -1
- package/dist/runtime/type-guards/isTrimmable.d.ts.map +1 -1
- package/dist/runtime/type-guards/isTruthy.d.ts.map +1 -1
- package/dist/runtime/type-guards/isUnset.d.ts.map +1 -1
- package/dist/runtime/type-guards/isUrl.d.ts +3 -3
- package/dist/runtime/type-guards/isUrl.d.ts.map +1 -1
- package/dist/runtime/type-guards/network-tg.d.ts +6 -7
- package/dist/runtime/type-guards/network-tg.d.ts.map +1 -1
- package/dist/runtime/type-guards/network-tg.js +4 -9
- package/dist/runtime/type-guards/repos.d.ts +9 -7
- package/dist/runtime/type-guards/repos.d.ts.map +1 -1
- package/dist/runtime/type-guards/repos.js +1 -3
- package/dist/runtime/type-guards/tokens/index.d.ts +6 -0
- package/dist/runtime/type-guards/tokens/index.d.ts.map +1 -0
- package/dist/runtime/type-guards/tokens/index.js +5 -0
- package/dist/runtime/type-guards/tokens/isAtomicToken.d.ts +9 -0
- package/dist/runtime/type-guards/tokens/isAtomicToken.d.ts.map +1 -0
- package/dist/runtime/type-guards/tokens/isAtomicToken.js +12 -0
- package/dist/runtime/type-guards/tokens/isContainerToken.d.ts +21 -0
- package/dist/runtime/type-guards/tokens/isContainerToken.d.ts.map +1 -0
- package/dist/runtime/type-guards/tokens/isContainerToken.js +48 -0
- package/dist/runtime/type-guards/tokens/isFunctionToken.d.ts +4 -0
- package/dist/runtime/type-guards/tokens/isFunctionToken.d.ts.map +1 -0
- package/dist/runtime/type-guards/tokens/isFunctionToken.js +7 -0
- package/dist/runtime/type-guards/tokens/isShapeToken.d.ts +9 -0
- package/dist/runtime/type-guards/tokens/isShapeToken.d.ts.map +1 -0
- package/dist/runtime/type-guards/tokens/isShapeToken.js +21 -0
- package/dist/runtime/type-guards/tokens/isSimpleToken.d.ts +53 -0
- package/dist/runtime/type-guards/tokens/isSimpleToken.d.ts.map +1 -0
- package/dist/runtime/type-guards/tokens/isSimpleToken.js +74 -0
- package/dist/runtime/type-guards/tokens/isSingletonToken.d.ts +9 -0
- package/dist/runtime/type-guards/tokens/isSingletonToken.d.ts.map +1 -0
- package/dist/runtime/type-guards/tokens/isSingletonToken.js +12 -0
- package/dist/runtime/type-guards/tokens/isTupleToken.d.ts +1 -0
- package/dist/runtime/type-guards/tokens/isTupleToken.d.ts.map +1 -0
- package/dist/runtime/type-guards/tokens/isTupleToken.js +1 -0
- package/dist/runtime/type-guards/tokens/isUnionSetToken.d.ts +1 -0
- package/dist/runtime/type-guards/tokens/isUnionSetToken.d.ts.map +1 -0
- package/dist/runtime/type-guards/tokens/isUnionSetToken.js +1 -0
- package/dist/runtime/type-guards/tokens/isUnionToken.d.ts +9 -0
- package/dist/runtime/type-guards/tokens/isUnionToken.d.ts.map +1 -0
- package/dist/runtime/type-guards/tokens/isUnionToken.js +12 -0
- package/dist/runtime/type-guards/youtube.d.ts +5 -5
- package/dist/runtime/type-guards/youtube.d.ts.map +1 -1
- package/dist/runtime/type-guards/youtube.js +1 -3
- package/dist/runtime/vuejs/asVueRef.d.ts +1 -1
- package/dist/runtime/vuejs/asVueRef.d.ts.map +1 -1
- package/dist/types/base-types/LikeRegExp.d.ts +9 -0
- package/dist/types/base-types/LikeRegExp.d.ts.map +1 -0
- package/dist/types/base-types/Something.d.ts.map +1 -1
- package/dist/types/base-types/Something.js +1 -0
- package/dist/types/base-types/fns/AnyFunction.d.ts.map +1 -1
- package/dist/types/base-types/fns/AnyFunction.js +1 -1
- package/dist/types/base-types/fns/FnAllowingProps.d.ts +11 -0
- package/dist/types/base-types/fns/FnAllowingProps.d.ts.map +1 -0
- package/dist/types/base-types/fns/index.d.ts +1 -2
- package/dist/types/base-types/fns/index.d.ts.map +1 -1
- package/dist/types/base-types/fns/index.js +1 -2
- package/dist/types/base-types/index.d.ts +1 -0
- package/dist/types/base-types/index.d.ts.map +1 -1
- package/dist/types/base-types/index.js +1 -0
- package/dist/types/boolean-logic/branching/OnPass.d.ts.map +1 -1
- package/dist/types/boolean-logic/combinators/Compare.d.ts.map +1 -1
- package/dist/types/boolean-logic/operators/AreSameLength.d.ts +2 -2
- package/dist/types/boolean-logic/operators/AreSameLength.d.ts.map +1 -1
- package/dist/types/boolean-logic/operators/Contains.d.ts +4 -3
- package/dist/types/boolean-logic/operators/Contains.d.ts.map +1 -1
- package/dist/types/boolean-logic/operators/HasArray.d.ts +10 -0
- package/dist/types/boolean-logic/operators/HasArray.d.ts.map +1 -0
- package/dist/types/boolean-logic/operators/HasRequiredProps.d.ts +1 -2
- package/dist/types/boolean-logic/operators/HasRequiredProps.d.ts.map +1 -1
- package/dist/types/boolean-logic/operators/HaveSameNumericSign.d.ts +9 -0
- package/dist/types/boolean-logic/operators/HaveSameNumericSign.d.ts.map +1 -0
- package/dist/types/boolean-logic/operators/HaveSameNumericSign.js +1 -0
- package/dist/types/boolean-logic/operators/IsEmptyString.d.ts +12 -0
- package/dist/types/boolean-logic/operators/IsEmptyString.d.ts.map +1 -0
- package/dist/types/boolean-logic/operators/IsEmptyString.js +1 -0
- package/dist/types/boolean-logic/operators/IsFloat.d.ts +2 -2
- package/dist/types/boolean-logic/operators/IsFloat.d.ts.map +1 -1
- package/dist/types/boolean-logic/operators/IsGreaterThan.d.ts +8 -2
- package/dist/types/boolean-logic/operators/IsGreaterThan.d.ts.map +1 -1
- package/dist/types/boolean-logic/operators/IsInteger.d.ts +2 -2
- package/dist/types/boolean-logic/operators/IsInteger.d.ts.map +1 -1
- package/dist/types/boolean-logic/operators/IsLessThan.d.ts +8 -2
- package/dist/types/boolean-logic/operators/IsLessThan.d.ts.map +1 -1
- package/dist/types/boolean-logic/operators/IsNegativeNumber.d.ts +2 -4
- package/dist/types/boolean-logic/operators/IsNegativeNumber.d.ts.map +1 -1
- package/dist/types/boolean-logic/operators/IsNonLiteralUnion.d.ts +1 -1
- package/dist/types/boolean-logic/operators/IsNonLiteralUnion.d.ts.map +1 -1
- package/dist/types/boolean-logic/operators/IsPositiveNumber.d.ts +11 -0
- package/dist/types/boolean-logic/operators/IsPositiveNumber.d.ts.map +1 -0
- package/dist/types/boolean-logic/operators/IsPositiveNumber.js +1 -0
- package/dist/types/boolean-logic/operators/IsTuple.d.ts +1 -1
- package/dist/types/boolean-logic/operators/IsUrl.d.ts +7 -8
- package/dist/types/boolean-logic/operators/IsUrl.d.ts.map +1 -1
- package/dist/types/boolean-logic/operators/MaybeError.d.ts +20 -0
- package/dist/types/boolean-logic/operators/MaybeError.d.ts.map +1 -0
- package/dist/types/boolean-logic/operators/MaybeError.js +2 -0
- package/dist/types/boolean-logic/operators/PhoneOperators.d.ts +2 -3
- package/dist/types/boolean-logic/operators/PhoneOperators.d.ts.map +1 -1
- package/dist/types/boolean-logic/operators/StartsWith.d.ts +8 -9
- package/dist/types/boolean-logic/operators/StartsWith.d.ts.map +1 -1
- package/dist/types/boolean-logic/operators/UnionHasArray.d.ts +14 -0
- package/dist/types/boolean-logic/operators/UnionHasArray.d.ts.map +1 -0
- package/dist/types/boolean-logic/operators/UnionHasArray.js +1 -0
- package/dist/types/boolean-logic/operators/index.d.ts +6 -0
- package/dist/types/boolean-logic/operators/index.d.ts.map +1 -1
- package/dist/types/boolean-logic/operators/index.js +6 -0
- package/dist/types/containers/RemoveEmpty.d.ts +30 -0
- package/dist/types/containers/RemoveEmpty.d.ts.map +1 -0
- package/dist/types/containers/RemoveEmpty.js +1 -0
- package/dist/types/containers/RemoveMarked.d.ts +1 -1
- package/dist/types/containers/RemoveMarked.d.ts.map +1 -1
- package/dist/types/containers/RemoveUndefined.d.ts +1 -7
- package/dist/types/containers/RemoveUndefined.d.ts.map +1 -1
- package/dist/types/containers/index.d.ts +1 -0
- package/dist/types/containers/index.d.ts.map +1 -1
- package/dist/types/containers/index.js +1 -0
- package/dist/types/dictionary/EnsureKeys.d.ts +1 -3
- package/dist/types/dictionary/EnsureKeys.d.ts.map +1 -1
- package/dist/types/dictionary/Keys.d.ts +2 -2
- package/dist/types/dictionary/Keys.d.ts.map +1 -1
- package/dist/types/dictionary/OptionalKeys.d.ts +2 -2
- package/dist/types/dictionary/OptionalKeys.d.ts.map +1 -1
- package/dist/types/dictionary/OptionalKeys.js +0 -1
- package/dist/types/dictionary/RequireProps.d.ts +2 -2
- package/dist/types/dictionary/RequireProps.d.ts.map +1 -1
- package/dist/types/dictionary/RequiredKeys.d.ts +2 -2
- package/dist/types/dictionary/RequiredKeys.d.ts.map +1 -1
- package/dist/types/dictionary/WithValue.d.ts +2 -3
- package/dist/types/dictionary/WithValue.d.ts.map +1 -1
- package/dist/types/dictionary/WithoutKeys.d.ts +3 -3
- package/dist/types/dictionary/WithoutKeys.d.ts.map +1 -1
- package/dist/types/functional/Result.d.ts +1 -1
- package/dist/types/functional/Result.d.ts.map +1 -1
- package/dist/types/functions/FnFrom.d.ts +1 -1
- package/dist/types/functions/FnFrom.d.ts.map +1 -1
- package/dist/types/functions/FnWithProps.d.ts +10 -0
- package/dist/types/functions/FnWithProps.d.ts.map +1 -0
- package/dist/types/functions/FnWithProps.js +1 -0
- package/dist/types/functions/IdentityFn.d.ts +1 -2
- package/dist/types/functions/IdentityFn.d.ts.map +1 -1
- package/dist/types/functions/index.d.ts +1 -0
- package/dist/types/functions/index.d.ts.map +1 -1
- package/dist/types/functions/index.js +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +1 -0
- package/dist/types/lists/AsArray.d.ts +7 -2
- package/dist/types/lists/AsArray.d.ts.map +1 -1
- package/dist/types/lists/BeforeLast.d.ts +3 -3
- package/dist/types/lists/Filter.d.ts +2 -9
- package/dist/types/lists/Filter.d.ts.map +1 -1
- package/dist/types/lists/FilterByProp.d.ts +37 -0
- package/dist/types/lists/FilterByProp.d.ts.map +1 -0
- package/dist/types/lists/FilterByProp.js +1 -0
- package/dist/types/lists/Flatten.d.ts +31 -14
- package/dist/types/lists/Flatten.d.ts.map +1 -1
- package/dist/types/lists/Last.d.ts +2 -2
- package/dist/types/lists/Last.d.ts.map +1 -1
- package/dist/types/lists/Length.d.ts +3 -4
- package/dist/types/lists/Length.d.ts.map +1 -1
- package/dist/types/lists/RetainByProp.d.ts +38 -0
- package/dist/types/lists/RetainByProp.d.ts.map +1 -0
- package/dist/types/lists/RetainByProp.js +1 -0
- package/dist/types/lists/Shift.d.ts +5 -3
- package/dist/types/lists/Shift.d.ts.map +1 -1
- package/dist/types/lists/Slice.d.ts +17 -9
- package/dist/types/lists/Slice.d.ts.map +1 -1
- package/dist/types/lists/TakeFirst.d.ts +21 -0
- package/dist/types/lists/TakeFirst.d.ts.map +1 -0
- package/dist/types/lists/TakeFirst.js +1 -0
- package/dist/types/lists/TakeLast.d.ts +16 -0
- package/dist/types/lists/TakeLast.d.ts.map +1 -0
- package/dist/types/lists/TakeLast.js +1 -0
- package/dist/types/lists/index.d.ts +4 -0
- package/dist/types/lists/index.d.ts.map +1 -1
- package/dist/types/lists/index.js +4 -0
- package/dist/types/literals/BooleanLike.d.ts +8 -0
- package/dist/types/literals/BooleanLike.d.ts.map +1 -0
- package/dist/types/literals/BooleanLike.js +1 -0
- package/dist/types/literals/NarrowableDefined.d.ts +2 -1
- package/dist/types/literals/NarrowableDefined.d.ts.map +1 -1
- package/dist/types/literals/NarrowableDefined.js +0 -1
- package/dist/types/literals/Shape.d.ts +10 -1
- package/dist/types/literals/Shape.d.ts.map +1 -1
- 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/Abs.d.ts +2 -2
- package/dist/types/numeric-literals/Abs.d.ts.map +1 -1
- package/dist/types/numeric-literals/Add.d.ts +5 -3
- package/dist/types/numeric-literals/Add.d.ts.map +1 -1
- package/dist/types/numeric-literals/AsNegativeNumber.d.ts +12 -0
- package/dist/types/numeric-literals/AsNegativeNumber.d.ts.map +1 -0
- package/dist/types/numeric-literals/AsNegativeNumber.js +1 -0
- package/dist/types/numeric-literals/CSV.d.ts +73 -0
- package/dist/types/numeric-literals/CSV.d.ts.map +1 -0
- package/dist/types/numeric-literals/CSV.js +1 -0
- package/dist/types/numeric-literals/Delta.d.ts +14 -0
- package/dist/types/numeric-literals/Delta.d.ts.map +1 -0
- package/dist/types/numeric-literals/Delta.js +1 -0
- package/dist/types/numeric-literals/Digit.d.ts +2 -3
- package/dist/types/numeric-literals/Digit.d.ts.map +1 -1
- package/dist/types/numeric-literals/Digitize.d.ts +10 -20
- package/dist/types/numeric-literals/Digitize.d.ts.map +1 -1
- package/dist/types/numeric-literals/Increment.d.ts +2 -5
- package/dist/types/numeric-literals/Increment.d.ts.map +1 -1
- package/dist/types/numeric-literals/InvertNumericSign.d.ts +9 -0
- package/dist/types/numeric-literals/InvertNumericSign.d.ts.map +1 -0
- package/dist/types/numeric-literals/InvertNumericSign.js +1 -0
- package/dist/types/numeric-literals/NumberLike.d.ts.map +1 -1
- package/dist/types/numeric-literals/Subtract.d.ts +11 -8
- package/dist/types/numeric-literals/Subtract.d.ts.map +1 -1
- package/dist/types/numeric-literals/Zero.d.ts +8 -0
- package/dist/types/numeric-literals/Zero.d.ts.map +1 -0
- package/dist/types/numeric-literals/Zero.js +1 -0
- package/dist/types/numeric-literals/index.d.ts +5 -0
- package/dist/types/numeric-literals/index.d.ts.map +1 -1
- package/dist/types/numeric-literals/index.js +5 -0
- package/dist/types/queues/FifoQueue.d.ts +31 -0
- package/dist/types/queues/FifoQueue.d.ts.map +1 -0
- package/dist/types/queues/FifoQueue.js +1 -0
- package/dist/types/queues/LifoQueue.d.ts +31 -0
- package/dist/types/queues/LifoQueue.d.ts.map +1 -0
- package/dist/types/queues/LifoQueue.js +1 -0
- package/dist/types/queues/index.d.ts +3 -0
- package/dist/types/queues/index.d.ts.map +1 -0
- package/dist/types/queues/index.js +2 -0
- package/dist/types/runtime-types/AsType.d.ts +16 -0
- package/dist/types/runtime-types/AsType.d.ts.map +1 -0
- package/dist/types/runtime-types/AsType.js +1 -0
- package/dist/types/runtime-types/SimpleType.d.ts +47 -0
- package/dist/types/runtime-types/SimpleType.d.ts.map +1 -0
- package/dist/types/runtime-types/SimpleType.js +1 -0
- package/dist/types/runtime-types/Type.d.ts +1 -1
- package/dist/types/runtime-types/Type.d.ts.map +1 -1
- package/dist/types/runtime-types/TypeOf.d.ts +1 -1
- package/dist/types/runtime-types/TypeOf.d.ts.map +1 -1
- package/dist/types/runtime-types/TypeToken.d.ts +119 -9
- package/dist/types/runtime-types/TypeToken.d.ts.map +1 -1
- package/dist/types/runtime-types/index.d.ts +2 -1
- package/dist/types/runtime-types/index.d.ts.map +1 -1
- package/dist/types/runtime-types/index.js +2 -1
- package/dist/types/sets/Intersection.d.ts +1 -1
- package/dist/types/sets/Intersection.d.ts.map +1 -1
- package/dist/types/string-literals/Date.d.ts +4 -4
- package/dist/types/string-literals/Date.d.ts.map +1 -1
- package/dist/types/string-literals/EnsureLeading.d.ts +10 -6
- package/dist/types/string-literals/EnsureLeading.d.ts.map +1 -1
- package/dist/types/string-literals/EnsureTrailing.d.ts +5 -6
- package/dist/types/string-literals/EnsureTrailing.d.ts.map +1 -1
- package/dist/types/string-literals/Join.d.ts +3 -2
- package/dist/types/string-literals/Join.d.ts.map +1 -1
- package/dist/types/string-literals/Proxmox.d.ts +2 -3
- package/dist/types/string-literals/Proxmox.d.ts.map +1 -1
- package/dist/types/string-literals/Split.d.ts +1 -1
- package/dist/types/string-literals/Split.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/StripSurround.d.ts +16 -0
- package/dist/types/string-literals/StripSurround.d.ts.map +1 -0
- package/dist/types/string-literals/StripSurround.js +1 -0
- package/dist/types/string-literals/StripTrailing.d.ts +2 -2
- package/dist/types/string-literals/StripTrailing.d.ts.map +1 -1
- package/dist/types/string-literals/StripUntil.d.ts +1 -1
- package/dist/types/string-literals/StripUntil.d.ts.map +1 -1
- package/dist/types/string-literals/Suggest.d.ts.map +1 -1
- package/dist/types/string-literals/Surround.d.ts +2 -2
- package/dist/types/string-literals/Surround.d.ts.map +1 -1
- package/dist/types/string-literals/Truncate.d.ts +4 -4
- package/dist/types/string-literals/Truncate.d.ts.map +1 -1
- package/dist/types/string-literals/UnderlyingType.d.ts +18 -0
- package/dist/types/string-literals/UnderlyingType.d.ts.map +1 -0
- package/dist/types/string-literals/UnderlyingType.js +1 -0
- package/dist/types/string-literals/character-sets/Consonants.d.ts +3 -4
- package/dist/types/string-literals/character-sets/Consonants.d.ts.map +1 -1
- package/dist/types/string-literals/character-sets/DomainName.d.ts +1 -1
- package/dist/types/string-literals/character-sets/DomainName.d.ts.map +1 -1
- package/dist/types/string-literals/character-sets/IpAddress.d.ts +1 -1
- package/dist/types/string-literals/character-sets/IpAddress.d.ts.map +1 -1
- package/dist/types/string-literals/character-sets/LowerAlphaChar.d.ts +2 -3
- package/dist/types/string-literals/character-sets/LowerAlphaChar.d.ts.map +1 -1
- package/dist/types/string-literals/character-sets/NumericChar.d.ts +3 -4
- package/dist/types/string-literals/character-sets/NumericChar.d.ts.map +1 -1
- package/dist/types/string-literals/character-sets/Repos.d.ts +2 -1
- package/dist/types/string-literals/character-sets/Repos.d.ts.map +1 -1
- package/dist/types/string-literals/character-sets/SingularNoun.d.ts +1 -1
- package/dist/types/string-literals/character-sets/SingularNoun.d.ts.map +1 -1
- package/dist/types/string-literals/character-sets/UpperAlphaChar.d.ts +2 -3
- package/dist/types/string-literals/character-sets/UpperAlphaChar.d.ts.map +1 -1
- package/dist/types/string-literals/character-sets/Url.d.ts +4 -3
- package/dist/types/string-literals/character-sets/Url.d.ts.map +1 -1
- package/dist/types/string-literals/character-sets/Url.js +0 -1
- package/dist/types/string-literals/character-sets/Whitespace.d.ts +1 -1
- package/dist/types/string-literals/character-sets/Whitespace.d.ts.map +1 -1
- package/dist/types/string-literals/character-sets/css/color.d.ts +24 -0
- package/dist/types/string-literals/character-sets/css/color.d.ts.map +1 -0
- package/dist/types/string-literals/character-sets/css/color.js +1 -0
- package/dist/types/string-literals/character-sets/css/display-position.d.ts +26 -0
- package/dist/types/string-literals/character-sets/css/display-position.d.ts.map +1 -0
- package/dist/types/string-literals/character-sets/css/display-position.js +1 -0
- package/dist/types/string-literals/character-sets/css/index.d.ts +4 -0
- package/dist/types/string-literals/character-sets/css/index.d.ts.map +1 -0
- package/dist/types/string-literals/character-sets/css/index.js +3 -0
- package/dist/types/string-literals/character-sets/css/sizing.d.ts +10 -0
- package/dist/types/string-literals/character-sets/css/sizing.d.ts.map +1 -0
- package/dist/types/string-literals/character-sets/css/sizing.js +1 -0
- package/dist/types/string-literals/character-sets/index.d.ts +3 -2
- package/dist/types/string-literals/character-sets/index.d.ts.map +1 -1
- package/dist/types/string-literals/character-sets/index.js +3 -2
- package/dist/types/string-literals/character-sets/phone/CountryPhoneNumber.d.ts +12 -0
- package/dist/types/string-literals/character-sets/phone/CountryPhoneNumber.d.ts.map +1 -0
- package/dist/types/string-literals/character-sets/phone/CountryPhoneNumber.js +1 -0
- package/dist/types/string-literals/character-sets/phone/DialCountryCode.d.ts +9 -0
- package/dist/types/string-literals/character-sets/phone/DialCountryCode.d.ts.map +1 -0
- package/dist/types/string-literals/character-sets/phone/DialCountryCode.js +1 -0
- package/dist/types/string-literals/character-sets/phone/GetPhoneCountryCode.d.ts +14 -0
- package/dist/types/string-literals/character-sets/phone/GetPhoneCountryCode.d.ts.map +1 -0
- package/dist/types/string-literals/character-sets/phone/GetPhoneCountryCode.js +1 -0
- package/dist/types/string-literals/character-sets/phone/GetPhoneNumberType.d.ts +10 -0
- package/dist/types/string-literals/character-sets/phone/GetPhoneNumberType.d.ts.map +1 -0
- package/dist/types/string-literals/character-sets/phone/GetPhoneNumberType.js +1 -0
- package/dist/types/string-literals/character-sets/phone/InternationalPhoneNumber.d.ts +12 -0
- package/dist/types/string-literals/character-sets/phone/InternationalPhoneNumber.d.ts.map +1 -0
- package/dist/types/string-literals/character-sets/phone/InternationalPhoneNumber.js +1 -0
- package/dist/types/string-literals/character-sets/phone/LocalPhoneNumber.d.ts +12 -0
- package/dist/types/string-literals/character-sets/phone/LocalPhoneNumber.d.ts.map +1 -0
- package/dist/types/string-literals/character-sets/phone/LocalPhoneNumber.js +1 -0
- package/dist/types/string-literals/character-sets/phone/PhoneAreaCode.d.ts +6 -0
- package/dist/types/string-literals/character-sets/phone/PhoneAreaCode.d.ts.map +1 -0
- package/dist/types/string-literals/character-sets/phone/PhoneAreaCode.js +1 -0
- package/dist/types/string-literals/character-sets/phone/PhoneCountryCode.d.ts +13 -0
- package/dist/types/string-literals/character-sets/phone/PhoneCountryCode.d.ts.map +1 -0
- package/dist/types/string-literals/character-sets/phone/PhoneCountryCode.js +1 -0
- package/dist/types/string-literals/character-sets/phone/PhoneNumber.d.ts +23 -0
- package/dist/types/string-literals/character-sets/phone/PhoneNumber.d.ts.map +1 -0
- package/dist/types/string-literals/character-sets/phone/PhoneNumber.js +1 -0
- package/dist/types/string-literals/character-sets/phone/PhoneNumberDelimiter.d.ts +5 -0
- package/dist/types/string-literals/character-sets/phone/PhoneNumberDelimiter.d.ts.map +1 -0
- package/dist/types/string-literals/character-sets/phone/PhoneNumberDelimiter.js +1 -0
- package/dist/types/string-literals/character-sets/phone/PhoneShortCode.d.ts +19 -0
- package/dist/types/string-literals/character-sets/phone/PhoneShortCode.d.ts.map +1 -0
- package/dist/types/string-literals/character-sets/phone/PhoneShortCode.js +1 -0
- package/dist/types/string-literals/character-sets/phone/RawPhoneNumber.d.ts +30 -0
- package/dist/types/string-literals/character-sets/phone/RawPhoneNumber.d.ts.map +1 -0
- package/dist/types/string-literals/character-sets/phone/RawPhoneNumber.js +1 -0
- package/dist/types/string-literals/character-sets/phone/RemovePhoneCountryCode.d.ts +27 -0
- package/dist/types/string-literals/character-sets/phone/RemovePhoneCountryCode.d.ts.map +1 -0
- package/dist/types/string-literals/character-sets/phone/RemovePhoneCountryCode.js +1 -0
- package/dist/types/string-literals/character-sets/phone/ToPhoneFormat.d.ts +17 -0
- package/dist/types/string-literals/character-sets/phone/ToPhoneFormat.d.ts.map +1 -0
- package/dist/types/string-literals/character-sets/phone/ToPhoneFormat.js +1 -0
- package/dist/types/string-literals/character-sets/phone/index.d.ts +15 -0
- package/dist/types/string-literals/character-sets/phone/index.d.ts.map +1 -0
- package/dist/types/string-literals/character-sets/phone/index.js +14 -0
- package/dist/types/string-literals/character-sets/phone.d.ts +0 -187
- package/dist/types/string-literals/character-sets/phone.d.ts.map +1 -1
- package/dist/types/string-literals/character-sets/tw/TwColor.d.ts +41 -0
- package/dist/types/string-literals/character-sets/tw/TwColor.d.ts.map +1 -0
- package/dist/types/string-literals/character-sets/tw/TwColor.js +1 -0
- package/dist/types/string-literals/character-sets/tw/index.d.ts +2 -0
- package/dist/types/string-literals/character-sets/tw/index.d.ts.map +1 -0
- package/dist/types/string-literals/character-sets/tw/index.js +1 -0
- package/dist/types/string-literals/geo/state.d.ts +1 -1
- package/dist/types/string-literals/geo/state.d.ts.map +1 -1
- package/dist/types/string-literals/geo/zip.d.ts +1 -1
- package/dist/types/string-literals/geo/zip.d.ts.map +1 -1
- 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/AsBoolean.d.ts +7 -4
- package/dist/types/type-conversion/AsBoolean.d.ts.map +1 -1
- package/dist/types/type-conversion/AsNumber.d.ts +8 -3
- package/dist/types/type-conversion/AsNumber.d.ts.map +1 -1
- package/dist/types/type-conversion/AsString.d.ts +3 -1
- package/dist/types/type-conversion/AsString.d.ts.map +1 -1
- package/dist/types/type-conversion/AsStringUnion.d.ts +25 -0
- package/dist/types/type-conversion/AsStringUnion.d.ts.map +1 -0
- package/dist/types/type-conversion/AsStringUnion.js +1 -0
- package/dist/types/type-conversion/JSON.d.ts +25 -0
- package/dist/types/type-conversion/JSON.d.ts.map +1 -0
- package/dist/types/type-conversion/JSON.js +1 -0
- package/dist/types/type-conversion/StringLiteralFromTuple.d.ts +18 -0
- package/dist/types/type-conversion/StringLiteralFromTuple.d.ts.map +1 -0
- package/dist/types/type-conversion/StringLiteralFromTuple.js +1 -0
- package/dist/types/type-conversion/StripChars.d.ts +7 -6
- package/dist/types/type-conversion/StripChars.d.ts.map +1 -1
- package/dist/types/type-conversion/ToJsonValue.d.ts +11 -0
- package/dist/types/type-conversion/ToJsonValue.d.ts.map +1 -0
- package/dist/types/type-conversion/ToJsonValue.js +1 -0
- package/dist/types/type-conversion/ToStringArray.d.ts +4 -3
- package/dist/types/type-conversion/ToStringArray.d.ts.map +1 -1
- package/dist/types/type-conversion/TupleToUnion.d.ts +2 -2
- package/dist/types/type-conversion/TupleToUnion.d.ts.map +1 -1
- package/dist/types/type-conversion/Widen.js +1 -0
- package/dist/types/type-conversion/index.d.ts +4 -0
- package/dist/types/type-conversion/index.d.ts.map +1 -1
- package/dist/types/type-conversion/index.js +4 -0
- package/package.json +38 -37
- package/dist/runtime/lists/pop.d.ts +0 -17
- package/dist/runtime/lists/pop.d.ts.map +0 -1
- package/dist/runtime/lists/pop.js +0 -16
- package/dist/runtime/literals/asPhoneNumber.d.ts +0 -10
- package/dist/runtime/literals/asPhoneNumber.d.ts.map +0 -1
- package/dist/runtime/literals/asPhoneNumber.js +0 -62
- package/dist/runtime/runtime-types/dict.d.ts +0 -10
- package/dist/runtime/runtime-types/dict.d.ts.map +0 -1
- package/dist/runtime/runtime-types/dict.js +0 -11
- package/dist/runtime/runtime-types/parse.d.ts +0 -16
- package/dist/runtime/runtime-types/parse.d.ts.map +0 -1
- package/dist/runtime/runtime-types/parse.js +0 -29
- package/dist/types/base-types/fns/AnyFnWithDict.d.ts +0 -9
- package/dist/types/base-types/fns/AnyFnWithDict.d.ts.map +0 -1
- package/dist/types/base-types/fns/FnWithDict.d.ts +0 -10
- package/dist/types/base-types/fns/FnWithDict.d.ts.map +0 -1
- package/dist/types/runtime-types/DescribeType.d.ts +0 -40
- package/dist/types/runtime-types/DescribeType.d.ts.map +0 -1
- package/dist/types/runtime-types/DescribeType.js +0 -2
- package/dist/types/string-literals/character-sets/CSS.d.ts +0 -13
- package/dist/types/string-literals/character-sets/CSS.d.ts.map +0 -1
- /package/dist/types/base-types/{fns/AnyFnWithDict.js → LikeRegExp.js} +0 -0
- /package/dist/types/base-types/fns/{FnWithDict.js → FnAllowingProps.js} +0 -0
- /package/dist/types/{string-literals/character-sets/CSS.js → boolean-logic/operators/HasArray.js} +0 -0
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
/**
|
|
2
|
+
* **AsBoolean**`<T>`
|
|
3
|
+
*
|
|
4
|
+
* Converts any `BooleanLike` value to a boolean value
|
|
5
|
+
* and return `never` otherwise.
|
|
6
|
+
*/
|
|
7
|
+
export type AsBoolean<T> = T extends boolean ? T : T extends "true" ? true : T extends "false" ? false : T extends "boolean" ? boolean : never;
|
|
5
8
|
//# sourceMappingURL=AsBoolean.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AsBoolean.d.ts","sourceRoot":"","sources":["../../../src/types/type-conversion/AsBoolean.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AsBoolean.d.ts","sourceRoot":"","sources":["../../../src/types/type-conversion/AsBoolean.ts"],"names":[],"mappings":"AACA;;;;;GAKG;AACH,MAAM,MAAM,SAAS,CAAC,CAAC,IAAI,CAAC,SAAS,OAAO,GACxC,CAAC,GACD,CAAC,SAAS,MAAM,GAChB,IAAI,GACJ,CAAC,SAAS,OAAO,GACjB,KAAK,GACL,CAAC,SAAS,SAAS,GACnB,OAAO,GACP,KAAK,CAAC"}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* **ParseInt**`<T>`
|
|
3
|
+
*
|
|
4
|
+
* Converts a known string literal representation of a number
|
|
5
|
+
* to an actual number.
|
|
6
|
+
*/
|
|
7
|
+
export type ParseInt<T> = T extends `${infer N extends number}` ? N : never;
|
|
2
8
|
/**
|
|
3
9
|
* **AsNumber**`<T>`
|
|
4
10
|
*
|
|
@@ -11,6 +17,5 @@ type ParseInt<T> = T extends `${infer N extends number}` ? N : never;
|
|
|
11
17
|
* ```
|
|
12
18
|
* **Related:** `ToNumber`
|
|
13
19
|
*/
|
|
14
|
-
export type AsNumber<T> = T extends number ? T
|
|
15
|
-
export {};
|
|
20
|
+
export type AsNumber<T> = T extends number ? T : T extends `${number}` ? ParseInt<T> : never;
|
|
16
21
|
//# sourceMappingURL=AsNumber.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AsNumber.d.ts","sourceRoot":"","sources":["../../../src/types/type-conversion/AsNumber.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AsNumber.d.ts","sourceRoot":"","sources":["../../../src/types/type-conversion/AsNumber.ts"],"names":[],"mappings":"AACA;;;;;GAKG;AACH,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,MAAM,EAAE,GAC3D,CAAC,GACD,KAAK,CAAC;AAGV;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI,CAAC,SAAS,MAAM,GACtC,CAAC,GACD,CAAC,SAAS,GAAG,MAAM,EAAE,GACjB,QAAQ,CAAC,CAAC,CAAC,GACX,KAAK,CAAC"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { IsWideType } from "../boolean-logic";
|
|
2
|
+
import { Join } from "../string-literals/Join";
|
|
1
3
|
/**
|
|
2
4
|
* **AsString**<T>
|
|
3
5
|
*
|
|
@@ -9,5 +11,5 @@
|
|
|
9
11
|
*
|
|
10
12
|
* **Related:** `ToString`
|
|
11
13
|
*/
|
|
12
|
-
export type AsString<T> = T extends string ? T & string : T extends number ? `${T}` : T extends boolean ? `${T}` : string extends T ? string : never;
|
|
14
|
+
export type AsString<T> = T extends string ? T & string : T extends number ? `${T}` : T extends boolean ? `${T}` : string extends T ? string : T extends string[] ? IsWideType<T> extends true ? never : Join<T> : never;
|
|
13
15
|
//# sourceMappingURL=AsString.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AsString.d.ts","sourceRoot":"","sources":["../../../src/types/type-conversion/AsString.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI,CAAC,SAAS,MAAM,GACtC,CAAC,GAAG,MAAM,GACV,CAAC,SAAS,MAAM,
|
|
1
|
+
{"version":3,"file":"AsString.d.ts","sourceRoot":"","sources":["../../../src/types/type-conversion/AsString.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAE/C;;;;;;;;;;GAUG;AACH,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI,CAAC,SAAS,MAAM,GACtC,CAAC,GAAG,MAAM,GACV,CAAC,SAAS,MAAM,GAChB,GAAG,CAAC,EAAE,GACN,CAAC,SAAS,OAAO,GACjB,GAAG,CAAC,EAAE,GACN,MAAM,SAAS,CAAC,GAChB,MAAM,GACN,CAAC,SAAS,MAAM,EAAE,GAClB,UAAU,CAAC,CAAC,CAAC,SAAS,IAAI,GACxB,KAAK,GACL,IAAI,CAAC,CAAC,CAAC,GACR,KAAK,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { IsUnion, TupleToUnion, UnionToTuple } from "../index";
|
|
2
|
+
type ConvertUnion<T extends readonly unknown[], THandle extends "drop" | "proxy"> = TupleToUnion<{
|
|
3
|
+
[K in keyof T]: T[K] extends string ? T[K] : T[K] extends number ? `${T[K]}` : T[K] extends boolean ? `${T[K]}` : THandle extends "drop" ? never : T[K];
|
|
4
|
+
}>;
|
|
5
|
+
/**
|
|
6
|
+
* **AsStringUnion**`<T, [THandle]>`
|
|
7
|
+
*
|
|
8
|
+
* A type conversion utility which ensures unions (and a few literals) are
|
|
9
|
+
* converted to string literal variants:
|
|
10
|
+
*
|
|
11
|
+
* - if `T` is a union type, all _numeric_ or _boolean_ elements in the union
|
|
12
|
+
* will be converted to a string literal equivalent and others will be dropped
|
|
13
|
+
* - if you would prefer non-convertible types are left as part of the union
|
|
14
|
+
* you can set the `THandle` to "proxy" (instead of the default "drop")
|
|
15
|
+
*
|
|
16
|
+
* For non-union types, the goal is to address a similar outcome which is:
|
|
17
|
+
*
|
|
18
|
+
* - if `T` is of type `number` or `boolean` then this is converted to a
|
|
19
|
+
* string literal equivalent
|
|
20
|
+
* - all other types result in `never` or are just proxied through if
|
|
21
|
+
* `THandle` is set to "proxy"
|
|
22
|
+
*/
|
|
23
|
+
export type AsStringUnion<T, THandle extends "drop" | "proxy" = "drop"> = IsUnion<T> extends true ? ConvertUnion<UnionToTuple<T>, THandle> : T extends string ? T : T extends number ? `${T}` : T extends boolean ? `${T}` : THandle extends "drop" ? never : T;
|
|
24
|
+
export {};
|
|
25
|
+
//# sourceMappingURL=AsStringUnion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AsStringUnion.d.ts","sourceRoot":"","sources":["../../../src/types/type-conversion/AsStringUnion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,iBAAwB;AAEtE,KAAK,YAAY,CACf,CAAC,SAAS,SAAS,OAAO,EAAE,EAC5B,OAAO,SAAS,MAAM,GAAG,OAAO,IAC9B,YAAY,CAAC;KACd,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,MAAM,GAC/B,CAAC,CAAC,CAAC,CAAC,GACJ,CAAC,CAAC,CAAC,CAAC,SAAS,MAAM,GACnB,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,GACT,CAAC,CAAC,CAAC,CAAC,SAAS,OAAO,GACpB,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,GACT,OAAO,SAAS,MAAM,GACpB,KAAK,GACL,CAAC,CAAC,CAAC,CAAC;CACX,CAAC,CAAA;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,MAAM,aAAa,CACvB,CAAC,EACD,OAAO,SAAS,MAAM,GAAG,OAAO,GAAG,MAAM,IACvC,OAAO,CAAC,CAAC,CAAC,SAAS,IAAI,GACzB,YAAY,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,GACtC,CAAC,SAAS,MAAM,GACd,CAAC,GACD,CAAC,SAAS,MAAM,GACd,GAAG,CAAC,EAAE,GACR,CAAC,SAAS,OAAO,GACf,GAAG,CAAC,EAAE,GACN,OAAO,SAAS,MAAM,GACpB,KAAK,GACL,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Tuple } from "../base-types";
|
|
2
|
+
import { If, IsEqual } from "../boolean-logic";
|
|
3
|
+
import { NumberLike } from "../numeric-literals";
|
|
4
|
+
import { EnsureLeading, EnsureTrailing } from "../string-literals";
|
|
5
|
+
import { AsNumber } from "./AsNumber";
|
|
6
|
+
import { AsString } from "./AsString";
|
|
7
|
+
/**
|
|
8
|
+
* **JsonValue**`<T>`
|
|
9
|
+
*
|
|
10
|
+
* Converts a string value to the appropriate JSON type
|
|
11
|
+
*
|
|
12
|
+
* **Related:** `JsonValues`
|
|
13
|
+
*/
|
|
14
|
+
export type JsonValue<T> = T extends NumberLike ? AsNumber<T> : If<IsEqual<T, "true">, true, If<IsEqual<T, "false">, false, EnsureLeading<AsString<T>, "\""> extends string ? EnsureTrailing<EnsureLeading<AsString<T>, "\"">, "\""> : never>>;
|
|
15
|
+
/**
|
|
16
|
+
* **JsonValues**`<T>`
|
|
17
|
+
*
|
|
18
|
+
* Converts a tuple of values to the appropriate JSON type
|
|
19
|
+
*
|
|
20
|
+
* **Related:** `JsonValue`
|
|
21
|
+
*/
|
|
22
|
+
export type JsonValues<T extends Tuple> = {
|
|
23
|
+
[K in keyof T]: JsonValue<T[K]>;
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=JSON.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"JSON.d.ts","sourceRoot":"","sources":["../../../src/types/type-conversion/JSON.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAGtC;;;;;;GAMG;AACH,MAAM,MAAM,SAAS,CAAC,CAAC,IAAI,CAAC,SAAS,UAAU,GAC7C,QAAQ,CAAC,CAAC,CAAC,GACX,EAAE,CACA,OAAO,CAAC,CAAC,EAAE,MAAM,CAAC,EAClB,IAAI,EACJ,EAAE,CACA,OAAO,CAAC,CAAC,EAAE,OAAO,CAAC,EACnB,KAAK,EACL,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,SAAS,MAAM,GAC3C,cAAc,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,IAAI,CAAC,GACtD,KAAK,CACV,CACF,CAAA;AAEH;;;;;;GAMG;AACH,MAAM,MAAM,UAAU,CAAC,CAAC,SAAS,KAAK,IAAI;KACvC,CAAC,IAAI,MAAM,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAChC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { AfterFirst, First, IsNumericLiteral, IsStringLiteral } from "../index";
|
|
2
|
+
type LitString<TItems extends readonly unknown[], TLiteral extends string = ""> = [] extends TItems ? TLiteral : LitString<AfterFirst<TItems>, First<TItems> extends string ? IsStringLiteral<First<TItems>> extends true ? `${TLiteral}${First<TItems>}` : `${TLiteral}${string}` : First<TItems> extends number ? IsNumericLiteral<First<TItems>> extends true ? `${TLiteral}${First<TItems>}` : `${TLiteral}${number}` : TLiteral>;
|
|
3
|
+
/**
|
|
4
|
+
* **StringLiteralFromTuple**`<T>`
|
|
5
|
+
*
|
|
6
|
+
* Receives a tuple and creates a string literal type based
|
|
7
|
+
* on the sequence of elements in the tuple.
|
|
8
|
+
*
|
|
9
|
+
* ```ts
|
|
10
|
+
* // `${string}(${number})${string}`
|
|
11
|
+
* type Lit=StringLiteralFromTuple<[
|
|
12
|
+
* string, "(", number, ")", string
|
|
13
|
+
* ]>;
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
export type StringLiteralFromTuple<T extends readonly unknown[]> = LitString<T>;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=StringLiteralFromTuple.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StringLiteralFromTuple.d.ts","sourceRoot":"","sources":["../../../src/types/type-conversion/StringLiteralFromTuple.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,gBAAgB,EAAE,eAAe,EAAE,iBAAwB;AAEvF,KAAK,SAAS,CACZ,MAAM,SAAS,SAAS,OAAO,EAAE,EACjC,QAAQ,SAAS,MAAM,GAAG,EAAE,IAC1B,EAAE,SAAS,MAAM,GACnB,QAAQ,GACR,SAAS,CACP,UAAU,CAAC,MAAM,CAAC,EAClB,KAAK,CAAC,MAAM,CAAC,SAAS,MAAM,GACxB,eAAe,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,SAAS,IAAI,GACzC,GAAG,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAC,EAAE,GAC7B,GAAG,QAAQ,GAAG,MAAM,EAAE,GAC1B,KAAK,CAAC,MAAM,CAAC,SAAS,MAAM,GAC1B,gBAAgB,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,SAAS,IAAI,GAC1C,GAAG,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAC,EAAE,GAC7B,GAAG,QAAQ,GAAG,MAAM,EAAE,GACxB,QAAQ,CACb,CAAA;AAGH;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,sBAAsB,CAChC,CAAC,SAAS,SAAS,OAAO,EAAE,IAC1B,SAAS,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { IsWideType, Or, RemoveMarked, Chars,
|
|
3
|
-
type
|
|
4
|
-
[K in keyof TChars]: TChars[K] extends TStrip ?
|
|
5
|
-
}
|
|
1
|
+
import { Marked } from "../../constants/index";
|
|
2
|
+
import { IsWideType, Or, RemoveMarked, Chars, As, Concat } from "../index";
|
|
3
|
+
type Strip<TChars extends readonly string[], TStrip extends string> = {
|
|
4
|
+
[K in keyof TChars]: TChars[K] extends TStrip ? Marked : TChars[K];
|
|
5
|
+
};
|
|
6
|
+
type Process<TChars extends readonly string[], TStrip extends string> = As<RemoveMarked<Strip<TChars, TStrip>>, readonly string[]>;
|
|
6
7
|
/**
|
|
7
8
|
* **StripChars**`<TContent,TStrip>`
|
|
8
9
|
*
|
|
@@ -13,6 +14,6 @@ type Process<TChars extends readonly string[], TStrip extends string> = RemoveMa
|
|
|
13
14
|
* of single characters or this will throw
|
|
14
15
|
* `ErrorCondition<"invalid-strip-char">`
|
|
15
16
|
*/
|
|
16
|
-
export type StripChars<TContent extends string, TStrip extends string> = Or<[IsWideType<TContent>, IsWideType<TStrip>]> extends true ? string :
|
|
17
|
+
export type StripChars<TContent extends string, TStrip extends string> = Or<[IsWideType<TContent>, IsWideType<TStrip>]> extends true ? string : Concat<Process<Chars<TContent>, TStrip>>;
|
|
17
18
|
export {};
|
|
18
19
|
//# sourceMappingURL=StripChars.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StripChars.d.ts","sourceRoot":"","sources":["../../../src/types/type-conversion/StripChars.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"StripChars.d.ts","sourceRoot":"","sources":["../../../src/types/type-conversion/StripChars.ts"],"names":[],"mappings":"AAAA,OAAO,EAAG,MAAM,EAAE,8BAA4B;AAC9C,OAAO,EACL,UAAU,EACV,EAAE,EACF,YAAY,EACZ,KAAK,EACL,EAAE,EACF,MAAM,EACP,iBAAwB;AAEzB,KAAK,KAAK,CACR,MAAM,SAAS,SAAS,MAAM,EAAE,EAChC,MAAM,SAAS,MAAM,IACnB;KACD,CAAC,IAAI,MAAM,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,SAAS,MAAM,GACzC,MAAM,GACN,MAAM,CAAC,CAAC,CAAC;CACd,CAAC;AAGF,KAAK,OAAO,CACV,MAAM,SAAS,SAAS,MAAM,EAAE,EAChC,MAAM,SAAS,MAAM,IACnB,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,MAAM,EAAC,MAAM,CAAC,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC,CAAC;AAG9D;;;;;;;;;GASG;AACH,MAAM,MAAM,UAAU,CACpB,QAAQ,SAAS,MAAM,EACvB,MAAM,SAAS,MAAM,IACnB,EAAE,CAAC,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,IAAI,GAC3D,MAAM,GAEN,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { As, Join, Tuple } from "../index";
|
|
2
|
+
type AsJsonArray<T extends Tuple> = Join<[
|
|
3
|
+
"[ ",
|
|
4
|
+
...T,
|
|
5
|
+
" ]"
|
|
6
|
+
]>;
|
|
7
|
+
export type ToJsonValue<T> = T extends string ? `"${T}"` : T extends number ? `${T}` : T extends boolean ? `${T}` : T extends undefined ? "undefined" : T extends null ? "null" : T extends Tuple ? AsJsonArray<As<{
|
|
8
|
+
[K in keyof T]: ToJsonValue<T[K]>;
|
|
9
|
+
}, Tuple>> : never;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=ToJsonValue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToJsonValue.d.ts","sourceRoot":"","sources":["../../../src/types/type-conversion/ToJsonValue.ts"],"names":[],"mappings":"AACA,OAAO,EACL,EAAE,EACF,IAAI,EACJ,KAAK,EACL,iBAAwB;AAG1B,KAAK,WAAW,CAAC,CAAC,SAAS,KAAK,IAAI,IAAI,CACtC;IACE,IAAI;IACJ,GAAG,CAAC;IACJ,IAAI;CACL,CACF,CAAC;AA6CF,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI,CAAC,SAAS,MAAM,GAC3C,IAAI,CAAC,GAAG,GACR,CAAC,SAAS,MAAM,GAChB,GAAG,CAAC,EAAE,GACN,CAAC,SAAS,OAAO,GACjB,GAAG,CAAC,EAAE,GACN,CAAC,SAAS,SAAS,GACnB,WAAW,GACX,CAAC,SAAS,IAAI,GACd,MAAM,GACN,CAAC,SAAS,KAAK,GACf,WAAW,CACT,EAAE,CAAC;KAAE,CAAC,IAAI,MAAM,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAC,EAAE,KAAK,CAAC,CAC/C,GACD,KAAK,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { Tuple } from "../
|
|
2
|
-
import { ToString } from "./ToString";
|
|
1
|
+
import { ToString, Tuple } from "../index";
|
|
3
2
|
/**
|
|
4
3
|
* **ToStringArray**`<T>`
|
|
5
4
|
*
|
|
@@ -8,5 +7,7 @@ import { ToString } from "./ToString";
|
|
|
8
7
|
*/
|
|
9
8
|
export type ToStringArray<T extends Tuple> = {
|
|
10
9
|
[K in keyof T]: ToString<T[K]>;
|
|
11
|
-
}
|
|
10
|
+
} extends readonly string[] ? {
|
|
11
|
+
[K in keyof T]: ToString<T[K]>;
|
|
12
|
+
} : never;
|
|
12
13
|
//# sourceMappingURL=ToStringArray.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToStringArray.d.ts","sourceRoot":"","sources":["../../../src/types/type-conversion/ToStringArray.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ToStringArray.d.ts","sourceRoot":"","sources":["../../../src/types/type-conversion/ToStringArray.ts"],"names":[],"mappings":"AAAA,OAAO,EAAG,QAAQ,EAAE,KAAK,EAAE,iBAAwB;AAInD;;;;;GAKG;AACH,MAAM,MAAM,aAAa,CAAC,CAAC,SAAS,KAAK,IAAI;KAC1C,CAAC,IAAI,MAAM,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAC/B,SAAS,SAAS,MAAM,EAAE,GACzB;KACC,CAAC,IAAI,MAAM,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAC/B,GACC,KAAK,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Keys } from "../index";
|
|
2
2
|
/**
|
|
3
3
|
* Converts a Tuple type into a _union_ of the tuple elements
|
|
4
4
|
*
|
|
@@ -10,5 +10,5 @@ import { IfLength, Keys } from "../index";
|
|
|
10
10
|
*
|
|
11
11
|
* **Note:** an empty array will be converted to a `string` type.
|
|
12
12
|
*/
|
|
13
|
-
export type TupleToUnion<T> = T extends readonly unknown[] ?
|
|
13
|
+
export type TupleToUnion<T> = T extends readonly unknown[] ? Keys<T>["length"] extends 0 ? never : T[number] : never;
|
|
14
14
|
//# sourceMappingURL=TupleToUnion.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TupleToUnion.d.ts","sourceRoot":"","sources":["../../../src/types/type-conversion/TupleToUnion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"TupleToUnion.d.ts","sourceRoot":"","sources":["../../../src/types/type-conversion/TupleToUnion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,iBAAwB;AAEvC;;;;;;;;;;GAUG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,OAAO,EAAE,GACtD,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,GACzB,KAAK,GACL,CAAC,CAAC,MAAM,CAAC,GACX,KAAK,CAAC"}
|
|
@@ -11,6 +11,7 @@ export * from "./AsFunction";
|
|
|
11
11
|
export * from "./AsRecord";
|
|
12
12
|
export * from "./AsObjectKeys";
|
|
13
13
|
export * from "./AsPropertyKey";
|
|
14
|
+
export * from "./AsStringUnion";
|
|
14
15
|
export * from "./TupleToUnion";
|
|
15
16
|
export * from "./UnionToIntersection";
|
|
16
17
|
export * from "./ToString";
|
|
@@ -42,6 +43,7 @@ export * from "./RemoveIndex";
|
|
|
42
43
|
export * from "./IntersectWithAll";
|
|
43
44
|
export * from "./UnionWithAll";
|
|
44
45
|
export * from "./ToContainer";
|
|
46
|
+
export * from "./ToJsonValue";
|
|
45
47
|
export * from "./ToStringArray";
|
|
46
48
|
export * from "./ValueOrReturnValue";
|
|
47
49
|
export * from "./ReturnValues";
|
|
@@ -50,4 +52,6 @@ export * from "./AsContainer";
|
|
|
50
52
|
export * from "./StripChars";
|
|
51
53
|
export * from "./RetainChars";
|
|
52
54
|
export * from "./ReduceValues";
|
|
55
|
+
export * from "./JSON";
|
|
56
|
+
export * from "./StringLiteralFromTuple";
|
|
53
57
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -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;AAC9B,cAAc,gBAAgB,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,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,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;AAC/B,cAAc,QAAQ,CAAC;AACvB,cAAc,0BAA0B,CAAA"}
|
|
@@ -16,6 +16,7 @@ export * from "./AsFunction.js";
|
|
|
16
16
|
export * from "./AsRecord.js";
|
|
17
17
|
export * from "./AsObjectKeys.js";
|
|
18
18
|
export * from "./AsPropertyKey.js";
|
|
19
|
+
export * from "./AsStringUnion.js";
|
|
19
20
|
export * from "./TupleToUnion.js";
|
|
20
21
|
export * from "./UnionToIntersection.js";
|
|
21
22
|
export * from "./ToString.js";
|
|
@@ -47,6 +48,7 @@ export * from "./RemoveIndex.js";
|
|
|
47
48
|
export * from "./IntersectWithAll.js";
|
|
48
49
|
export * from "./UnionWithAll.js";
|
|
49
50
|
export * from "./ToContainer.js";
|
|
51
|
+
export * from "./ToJsonValue.js";
|
|
50
52
|
export * from "./ToStringArray.js";
|
|
51
53
|
export * from "./ValueOrReturnValue.js";
|
|
52
54
|
export * from "./ReturnValues.js";
|
|
@@ -55,6 +57,8 @@ export * from "./AsContainer.js";
|
|
|
55
57
|
export * from "./StripChars.js";
|
|
56
58
|
export * from "./RetainChars.js";
|
|
57
59
|
export * from "./ReduceValues.js";
|
|
60
|
+
export * from "./JSON.js";
|
|
61
|
+
export * from "./StringLiteralFromTuple.js";
|
|
58
62
|
// #endregion auto-indexed files
|
|
59
63
|
// see https://github.com/inocan-group/do-devops/docs/autoindex.md
|
|
60
64
|
// for more info
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "inferred-types",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.47.1",
|
|
4
4
|
"description": "Functions which provide useful type inference on TS projects",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Ken Snyder<ken@ken.net>",
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
"typings": "./dist/inferred-types/index.d.ts",
|
|
11
11
|
"exports": {
|
|
12
12
|
".": {
|
|
13
|
+
"types": "./dist/inferred-types/index.d.ts",
|
|
13
14
|
"import": "./dist/inferred-types/index.js",
|
|
14
|
-
"require": "./dist/inferred-types/index.cjs"
|
|
15
|
-
"types": "./dist/inferred-types/index.d.ts"
|
|
15
|
+
"require": "./dist/inferred-types/index.cjs"
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
18
|
"files": [
|
|
@@ -25,9 +25,13 @@
|
|
|
25
25
|
"scripts": {
|
|
26
26
|
"prepare": "ts-patch install -s",
|
|
27
27
|
"build": "run-s build:esm build:cjs",
|
|
28
|
-
"build:esm": "tsc -b --verbose src/inferred-types",
|
|
29
|
-
"
|
|
30
|
-
"
|
|
28
|
+
"build:esm": "tsc -b --verbose src/inferred-types ",
|
|
29
|
+
"bun:runtime": "bun build src/runtime/index.ts --format=esm --outfile=dist/runtime/index.mjs",
|
|
30
|
+
"build:cjs": "tsup src/inferred-types/index.ts --format=cjs -d dist/inferred-types",
|
|
31
|
+
"diag": "tsc -b -f --extendedDiagnostics src/inferred-types",
|
|
32
|
+
"diag:constants": "tsc -b -f --extendedDiagnostics src/constants",
|
|
33
|
+
"diag:types": "tsc -b -f --extendedDiagnostics src/types",
|
|
34
|
+
"diag:runtime": "tsc -b -f --extendedDiagnostics src/runtime",
|
|
31
35
|
"clean": "rimraf dist/**/*",
|
|
32
36
|
"lint": "eslint src",
|
|
33
37
|
"trace": "npx tsc --noEmit --diagnostics && npx analyze-trace trace",
|
|
@@ -35,61 +39,58 @@
|
|
|
35
39
|
"test:ui": "vitest --ui",
|
|
36
40
|
"bench": "cd benches && tsx ./index.ts",
|
|
37
41
|
"test:ci": "vitest run",
|
|
38
|
-
"test:types": "
|
|
42
|
+
"test:types": "typed test -w 6133 -w 6307",
|
|
39
43
|
"audit:fix": "pnpm audit --fix",
|
|
40
|
-
"audit:types": "
|
|
41
|
-
"audit:runtime": "
|
|
44
|
+
"audit:types": "typed -c src/types/tsconfig.json -w 6133 -w 6307",
|
|
45
|
+
"audit:runtime": "typed -c src/runtime/tsconfig.json -w 2304 -w 6133 -w 6307",
|
|
42
46
|
"audit:constants": "ts-type-tester src/constants src/constants/tsconfig.json --warn 6133",
|
|
43
47
|
"release": "run-s lint release:latest test:ci audit:fix release:bump",
|
|
44
48
|
"release:latest": "pnpm install",
|
|
45
49
|
"release:bump": "bumpp",
|
|
46
50
|
"prepublishOnly": "npm run build",
|
|
47
51
|
"watch": "run-p watch:*",
|
|
48
|
-
"watch:types": "ts-type-tester tests tests/tsconfig.json --
|
|
52
|
+
"watch:types": "ts-type-tester tests tests/tsconfig.json --ignore 6133 -w",
|
|
49
53
|
"watch:lint": "esw (src|tests)/**/*.ts -w --clear",
|
|
50
54
|
"watch:bundle": "tsup src/index.ts --format=esm --dts"
|
|
51
55
|
},
|
|
52
56
|
"devDependencies": {
|
|
53
|
-
"@
|
|
54
|
-
"@eslint/js": "^9.6.0",
|
|
57
|
+
"@eslint/js": "^9.9.1",
|
|
55
58
|
"@type-challenges/utils": "~0.1.1",
|
|
56
|
-
"@types/node": "^20.
|
|
57
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
58
|
-
"@typescript-eslint/parser": "^
|
|
59
|
+
"@types/node": "^20.16.1",
|
|
60
|
+
"@typescript-eslint/eslint-plugin": "^8.2.0",
|
|
61
|
+
"@typescript-eslint/parser": "^8.2.0",
|
|
59
62
|
"@typescript/analyze-trace": "^0.10.1",
|
|
60
|
-
"@vitest/ui": "^
|
|
61
|
-
"bumpp": "^9.
|
|
63
|
+
"@vitest/ui": "^2.0.5",
|
|
64
|
+
"bumpp": "^9.5.2",
|
|
62
65
|
"chalk": "^5.3.0",
|
|
63
66
|
"cross-env": "^7.0.3",
|
|
64
|
-
"eslint": "^9.
|
|
67
|
+
"eslint": "^9.9.1",
|
|
65
68
|
"eslint-config-prettier": "^9.1.0",
|
|
66
|
-
"eslint-
|
|
67
|
-
"eslint-plugin-
|
|
68
|
-
"
|
|
69
|
-
"eslint-plugin-promise": "^6.4.0",
|
|
70
|
-
"eslint-watch": "^8.0.0",
|
|
71
|
-
"glob": "^10.4.2",
|
|
69
|
+
"eslint-plugin-prettier": "^5.2.1",
|
|
70
|
+
"eslint-plugin-promise": "^7.1.0",
|
|
71
|
+
"glob": "^11.0.0",
|
|
72
72
|
"npm-run-all": "~4.1.5",
|
|
73
73
|
"pathe": "^1.1.2",
|
|
74
|
-
"prettier": "^3.3.
|
|
75
|
-
"rimraf": "^
|
|
74
|
+
"prettier": "^3.3.3",
|
|
75
|
+
"rimraf": "^6.0.1",
|
|
76
76
|
"ts-patch": "^3.2.1",
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"typescript": "
|
|
81
|
-
"typescript-eslint": "^
|
|
82
|
-
"typescript-transform-paths": "^3.
|
|
77
|
+
"tsup": "^8.2.4",
|
|
78
|
+
"tsx": "^4.17.0",
|
|
79
|
+
"typed-tester": "^0.6.2",
|
|
80
|
+
"typescript": "5.5.4",
|
|
81
|
+
"typescript-eslint": "^8.2.0",
|
|
82
|
+
"typescript-transform-paths": "^3.5.0",
|
|
83
83
|
"typescript-transformer-esm": "^1.1.0",
|
|
84
|
-
"vite": "^5.
|
|
85
|
-
"vite-node": "^
|
|
86
|
-
"vitest": "^
|
|
87
|
-
"vue": "^3.4.
|
|
84
|
+
"vite": "^5.4.2",
|
|
85
|
+
"vite-node": "^2.0.5",
|
|
86
|
+
"vitest": "^2.0.5",
|
|
87
|
+
"vue": "^3.4.38"
|
|
88
88
|
},
|
|
89
89
|
"pnpm": {
|
|
90
90
|
"overrides": {
|
|
91
91
|
"tar@<6.2.1": ">=6.2.1",
|
|
92
|
-
"braces@<3.0.3": ">=3.0.3"
|
|
92
|
+
"braces@<3.0.3": ">=3.0.3",
|
|
93
|
+
"micromatch@<4.0.8": ">=4.0.8"
|
|
93
94
|
}
|
|
94
95
|
}
|
|
95
96
|
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Narrowable, Slice, Tuple, Last, IfNever } from "../../types/index";
|
|
2
|
-
export type PopResult<V, L extends Tuple> = [
|
|
3
|
-
value: IfNever<V, undefined>,
|
|
4
|
-
list: L
|
|
5
|
-
];
|
|
6
|
-
/**
|
|
7
|
-
* **pop**(list)
|
|
8
|
-
*
|
|
9
|
-
* Takes a list of elements and then returns a `PopResult` unless
|
|
10
|
-
* there were no more elements in which case the value _undefined_ is returned.
|
|
11
|
-
* ```ts
|
|
12
|
-
* // [3, [1,2]]
|
|
13
|
-
* const [val, list] = pop([1,2,3]);
|
|
14
|
-
* ```
|
|
15
|
-
*/
|
|
16
|
-
export declare const pop: <N extends Narrowable, K extends PropertyKey, T extends readonly (Narrowable | Record<K, N>)[]>(list: T) => PopResult<Last<T>, Slice<T, 0, -1>>;
|
|
17
|
-
//# sourceMappingURL=pop.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pop.d.ts","sourceRoot":"","sources":["../../../src/runtime/lists/pop.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,0BAAwB;AAI1E,MAAM,MAAM,SAAS,CAAC,CAAC,EAAE,CAAC,SAAS,KAAK,IAAI;IAC1C,KAAK,EAAE,OAAO,CAAC,CAAC,EAAE,SAAS,CAAC;IAC5B,IAAI,EAAE,CAAC;CACR,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,GAAG,wGAIR,CAAC,wCAMR,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { last, slice } from "../index.js";
|
|
2
|
-
/**
|
|
3
|
-
* **pop**(list)
|
|
4
|
-
*
|
|
5
|
-
* Takes a list of elements and then returns a `PopResult` unless
|
|
6
|
-
* there were no more elements in which case the value _undefined_ is returned.
|
|
7
|
-
* ```ts
|
|
8
|
-
* // [3, [1,2]]
|
|
9
|
-
* const [val, list] = pop([1,2,3]);
|
|
10
|
-
* ```
|
|
11
|
-
*/
|
|
12
|
-
export const pop = (list) => {
|
|
13
|
-
return (list.length > 0
|
|
14
|
-
? [last(list), slice(list, 0, -1)]
|
|
15
|
-
: undefined);
|
|
16
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { RemovePhoneCountryCode, GetPhoneCountryCode, PhoneNumber, ToPhoneFormat } from "../../types/index";
|
|
2
|
-
export declare const getPhoneCountryCode: <T extends string>(phone: T) => GetPhoneCountryCode<T>;
|
|
3
|
-
export declare const removePhoneCountryCode: <T extends string>(phone: T) => RemovePhoneCountryCode<T>;
|
|
4
|
-
/**
|
|
5
|
-
* **asPhoneNumber**`(phone, format)`
|
|
6
|
-
*
|
|
7
|
-
* Receives a phone number and returns it as a well formatted version.
|
|
8
|
-
*/
|
|
9
|
-
export declare const asPhoneNumber: <T extends string, F extends "Dashed (e.g., 456-555-1212)" | "Dotted (e.g., 456.555.1212)" | "ParaSpaced (e.g., (456) 555 1212)" | "ParaDashed (e.g., (456) 555-1212)">(phone: T & PhoneNumber<T>, format?: F) => ToPhoneFormat<T, F>;
|
|
10
|
-
//# sourceMappingURL=asPhoneNumber.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"asPhoneNumber.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/asPhoneNumber.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAe,WAAW,EAAE,aAAa,EAAE,0BAAwB;AAKvH,eAAO,MAAM,mBAAmB,4BACvB,CAAC,2BAUT,CAAA;AAED,eAAO,MAAM,sBAAsB,4BAE1B,CAAC,8BAUT,CAAA;AA2BD;;;;GAIG;AACH,eAAO,MAAM,aAAa,iLAIjB,CAAC,GAAG,YAAY,CAAC,CAAC,WACjB,CAAC,wBAyBV,CAAA"}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { asChars, isPhoneNumber, retainWhile, stripChars, stripLeading } from "../index.js";
|
|
2
|
-
import { NUMERIC_CHAR } from "../../constants/NumericChar.js";
|
|
3
|
-
export const getPhoneCountryCode = (phone) => {
|
|
4
|
-
return (phone.trim().startsWith("+") || phone.trim().startsWith("00")
|
|
5
|
-
? retainWhile(stripLeading(stripLeading(phone.trim(), "+"), "00"), ...NUMERIC_CHAR)
|
|
6
|
-
: "");
|
|
7
|
-
};
|
|
8
|
-
export const removePhoneCountryCode = (phone) => {
|
|
9
|
-
const countryCode = getPhoneCountryCode(phone);
|
|
10
|
-
return (countryCode !== ""
|
|
11
|
-
? stripLeading(stripLeading(phone.trim(), "+", "00"), countryCode).trim()
|
|
12
|
-
: phone.trim());
|
|
13
|
-
};
|
|
14
|
-
const convert = (countryCode, phone, delimiter, para) => {
|
|
15
|
-
const parts = stripChars(phone, "(", ")").trim().split(/[-. ]/);
|
|
16
|
-
const isRegional = parts.length === 2 ? true : false;
|
|
17
|
-
const isCountry = parts.length === 3 ? true : false;
|
|
18
|
-
const isShortCode = parts.length === 1 && asChars(phone).length < 7 ? true : false;
|
|
19
|
-
const replacement = isShortCode
|
|
20
|
-
? phone
|
|
21
|
-
: isRegional
|
|
22
|
-
? parts.join(delimiter)
|
|
23
|
-
: isCountry && para
|
|
24
|
-
? `(${parts[0]}) ${parts.slice(1).join(delimiter)}`
|
|
25
|
-
: isCountry
|
|
26
|
-
? parts.join(delimiter)
|
|
27
|
-
: undefined;
|
|
28
|
-
if (!replacement) {
|
|
29
|
-
throw new Error(`invalid phone number: ${phone}. Unable to parse!`);
|
|
30
|
-
}
|
|
31
|
-
return countryCode === ""
|
|
32
|
-
? replacement
|
|
33
|
-
: `+${countryCode} ${replacement}`;
|
|
34
|
-
};
|
|
35
|
-
/**
|
|
36
|
-
* **asPhoneNumber**`(phone, format)`
|
|
37
|
-
*
|
|
38
|
-
* Receives a phone number and returns it as a well formatted version.
|
|
39
|
-
*/
|
|
40
|
-
export const asPhoneNumber = (phone, format = "Dotted (e.g., 456.555.1212)") => {
|
|
41
|
-
if (!isPhoneNumber(phone)) {
|
|
42
|
-
throw new Error(`Invalid phone number presented to asPhoneNumber(phone,format)!`);
|
|
43
|
-
}
|
|
44
|
-
const countryCode = getPhoneCountryCode(phone);
|
|
45
|
-
const remaining = removePhoneCountryCode(phone);
|
|
46
|
-
let result;
|
|
47
|
-
switch (format) {
|
|
48
|
-
case "Dashed (e.g., 456-555-1212)":
|
|
49
|
-
result = convert(countryCode, remaining, "-", false);
|
|
50
|
-
break;
|
|
51
|
-
case "Dotted (e.g., 456.555.1212)":
|
|
52
|
-
result = convert(countryCode, remaining, ".", false);
|
|
53
|
-
break;
|
|
54
|
-
case "ParaDashed (e.g., (456) 555-1212)":
|
|
55
|
-
result = convert(countryCode, remaining, "-", true);
|
|
56
|
-
break;
|
|
57
|
-
case "ParaSpaced (e.g., (456) 555 1212)":
|
|
58
|
-
result = convert(countryCode, remaining, " ", true);
|
|
59
|
-
break;
|
|
60
|
-
}
|
|
61
|
-
return result;
|
|
62
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { AsString, CreateDictShape, Dict, Keys, NarrowDictProps, Narrowable, OptDictProps, Values } from "../../types/index";
|
|
2
|
-
/**
|
|
3
|
-
* **dict**`(obj, ...props)`
|
|
4
|
-
*
|
|
5
|
-
* Defines a `Dict` type which mimics the behavior of a normal JS
|
|
6
|
-
* object but plays nicer with `let` declarations by not allowing
|
|
7
|
-
* re-declarations.
|
|
8
|
-
*/
|
|
9
|
-
export declare const dict: <N extends Narrowable, TObj extends Record<string, N>, TProps extends readonly ((string & keyof TObj) | `opt:${AsString<keyof TObj>}`)[] = []>(obj: TObj, ...props: TProps) => Dict<CreateDictShape<TObj, Keys<TObj> extends readonly (string & keyof TObj)[] ? readonly (string & keyof TObj)[] & Keys<TObj> : never, NarrowDictProps<TProps> extends infer T ? T extends NarrowDictProps<TProps> ? T extends readonly string[] ? T : [] : never : never, OptDictProps<TProps> extends infer T_1 ? T_1 extends OptDictProps<TProps> ? T_1 extends readonly string[] ? T_1 : [] : never : never, {}>, `${Values<TObj>["length"]}${(NarrowDictProps<TProps> extends infer T ? T extends NarrowDictProps<TProps> ? T extends readonly string[] ? T : [] : never : never)["length"]}${(OptDictProps<TProps> extends infer T_1 ? T_1 extends OptDictProps<TProps> ? T_1 extends readonly string[] ? T_1 : [] : never : never)["length"]}`>;
|
|
10
|
-
//# sourceMappingURL=dict.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dict.d.ts","sourceRoot":"","sources":["../../../src/runtime/runtime-types/dict.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAER,eAAe,EACf,IAAI,EACJ,IAAI,EACJ,eAAe,EACf,UAAU,EACV,YAAY,EAEZ,MAAM,EACP,0BAAwB;AA6BzB;;;;;;GAMG;AACH,eAAO,MAAM,IAAI,sJAIV,IAAI,YAAY,MAAM,4tBAY5B,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
const process = (obj, _narrow, _opt) => {
|
|
2
|
-
return Object.defineProperty(obj, "__id", { enumerable: false });
|
|
3
|
-
};
|
|
4
|
-
/**
|
|
5
|
-
* **dict**`(obj, ...props)`
|
|
6
|
-
*
|
|
7
|
-
* Defines a `Dict` type which mimics the behavior of a normal JS
|
|
8
|
-
* object but plays nicer with `let` declarations by not allowing
|
|
9
|
-
* re-declarations.
|
|
10
|
-
*/
|
|
11
|
-
export const dict = (obj, ...props) => process(obj, (props || []).filter(i => !i.startsWith("opt:")), (props || []).filter(i => i.startsWith("opt:")));
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Shape } from "../../types/index";
|
|
2
|
-
export type ParsedToken<TType> = {
|
|
3
|
-
isToken: true;
|
|
4
|
-
type: TType;
|
|
5
|
-
token: Shape;
|
|
6
|
-
tokenName: string;
|
|
7
|
-
tokenData: readonly string[];
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* **parse**`(value)`
|
|
11
|
-
*
|
|
12
|
-
* Detects if the value passed in is a type token
|
|
13
|
-
* from the `ShapeApi`.
|
|
14
|
-
*/
|
|
15
|
-
export declare const parse: <T>(value: T) => unknown;
|
|
16
|
-
//# sourceMappingURL=parse.d.ts.map
|