inferred-types 1.0.0 → 1.0.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/modules/constants/dist/index.d.cts.map +1 -1
- package/modules/constants/dist/index.d.ts.map +1 -1
- package/modules/runtime/dist/index.cjs +43 -40
- package/modules/runtime/dist/index.cjs.map +1 -1
- package/modules/runtime/dist/index.d.cts +7 -28
- package/modules/runtime/dist/index.d.cts.map +1 -1
- package/modules/runtime/dist/index.d.ts +7 -28
- package/modules/runtime/dist/index.d.ts.map +1 -1
- package/modules/runtime/dist/index.js +44 -40
- package/modules/runtime/dist/index.js.map +1 -1
- package/modules/types/dist/{index.mjs → index.cjs} +17 -2
- package/modules/types/dist/{index.mjs.map → index.cjs.map} +1 -1
- package/modules/types/dist/{index.d.mts → index.d.cts} +5 -3
- package/modules/types/dist/index.d.cts.map +1 -0
- package/modules/types/dist/index.d.ts +4 -2
- package/modules/types/dist/index.d.ts.map +1 -1
- package/modules/types/dist/index.js +1 -16
- package/modules/types/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/modules/types/dist/index.d.mts.map +0 -1
|
@@ -1471,6 +1471,8 @@ type SetParsed<T extends ParsedDate$1> = As$1<{
|
|
|
1471
1471
|
*
|
|
1472
1472
|
* Tests to see if `T` can be parsed into a `DateMeta` type.
|
|
1473
1473
|
*
|
|
1474
|
+
* - a valid ISO string _or_ a `ParsedData` array should be
|
|
1475
|
+
* able to be parsed.
|
|
1474
1476
|
* - if it can then `DateMeta` is returned
|
|
1475
1477
|
* - if not then an `Error` will be returned
|
|
1476
1478
|
*
|
|
@@ -1478,7 +1480,7 @@ type SetParsed<T extends ParsedDate$1> = As$1<{
|
|
|
1478
1480
|
* then this utility will never return an error as the validation
|
|
1479
1481
|
* has already been done.
|
|
1480
1482
|
*/
|
|
1481
|
-
type AsDateMeta$2<T> = T extends ParsedDate$1 ? SetParsed<T> : ParseDate$1<T> extends Error ? As$1<ParseDate$1<T>, Error> : ParseDate$1<T> extends ParsedDate$1 ? SetParsed<ParseDate$1<T>> : never
|
|
1483
|
+
type AsDateMeta$2<T> = As$1<T extends ParsedDate$1 ? SetParsed<T> : ParseDate$1<T> extends Error ? As$1<ParseDate$1<T>, Error> : ParseDate$1<T> extends ParsedDate$1 ? SetParsed<ParseDate$1<T>> : never, DateMeta$1 | Error>;
|
|
1482
1484
|
//#endregion
|
|
1483
1485
|
//#region ../types/src/datetime/AsFourDigitYear.d.ts
|
|
1484
1486
|
type Convert$5<T, B extends boolean = false> = T extends string ? IsBranded<T> extends true ? Convert$5<Unbrand<T>, B> : IsFourDigitYear<T> extends true ? IsTrue<B> extends true ? FourDigitYear<As<T, `${number}`>> : T : T extends `${number}` ? IsFourDigitYear<PadStart<T, "0", 4>> extends true ? IsTrue<B> extends true ? FourDigitYear<As<PadStart<T, "0", 4>, `${number}`>> : PadStart<T, "0", 4> : Err<"year-invalid/type"> : Err<"year-invalid/type"> : T extends number ? number extends T ? IsTrue<B> extends true ? FourDigitYear<"branded"> | Error : FourDigitYear | Error : IsInteger<T> extends false ? Err<`year-invalid/float`, `The generic passed into AsFourDigitYear<T> was a number but not an integer!`, {
|
|
@@ -2925,15 +2927,6 @@ type Err$2<TType extends string = string, TMsg extends string = string, TCtx ext
|
|
|
2925
2927
|
* Adds "context" to an existing `Error`.
|
|
2926
2928
|
*/
|
|
2927
2929
|
//#endregion
|
|
2928
|
-
//#region ../types/src/functions/AsFnMeta.d.ts
|
|
2929
|
-
/**
|
|
2930
|
-
* **AsFnMeta**`<TFn>`
|
|
2931
|
-
*
|
|
2932
|
-
* Converts any function into `FnMeta` format.
|
|
2933
|
-
*/
|
|
2934
|
-
type AsFnMeta<TFn extends AnyFunction> = TFn extends TypedFunction ? [IsNonEmptyObject<FnKeyValue<TFn>>] extends [true] ? FnMeta<TFn, Parameters<TFn>, ReturnType<TFn>, ExpandDictionary<FnKeyValue<TFn>>> : FnMeta<TFn, Parameters<TFn>, ReturnType<TFn>, EmptyObject> : FnMeta<TypedFunction, any[], any, EmptyObject>;
|
|
2935
|
-
//# sourceMappingURL=AsFnMeta.d.ts.map
|
|
2936
|
-
//#endregion
|
|
2937
2930
|
//#region ../types/src/functions/FnKeyValue.d.ts
|
|
2938
2931
|
/**
|
|
2939
2932
|
* Built-in function property keys which should NOT be treated as user props.
|
|
@@ -9293,7 +9286,7 @@ declare function parseDate<T extends DateLike$2>(d: T): Returns$10<T>;
|
|
|
9293
9286
|
* Parses an object-based Date container into a `ParsedDate` tuple.
|
|
9294
9287
|
* Always uses the original ISO string (with offset/timezone) if available.
|
|
9295
9288
|
*/
|
|
9296
|
-
declare function parseDateObject<T extends DateLike$2
|
|
9289
|
+
declare function parseDateObject<T extends DateLike$2>(d: T): AsDateMeta$2<T>;
|
|
9297
9290
|
//# sourceMappingURL=parseDateObject.d.ts.map
|
|
9298
9291
|
//#endregion
|
|
9299
9292
|
//#region src/datetime/parseIsoDate.d.ts
|
|
@@ -9808,21 +9801,7 @@ declare function keysWithError<const T extends Dictionary$1<string>>(obj: T): Ke
|
|
|
9808
9801
|
//#region src/functional/result.d.ts
|
|
9809
9802
|
declare const result$1 = "NOT READY";
|
|
9810
9803
|
//# sourceMappingURL=result.d.ts.map
|
|
9811
|
-
|
|
9812
|
-
//#region src/functions/fnMeta.d.ts
|
|
9813
|
-
type _Props<TFn extends AnyFunction$1> = AsFnMeta<TFn>["props"];
|
|
9814
|
-
/**
|
|
9815
|
-
* **fnMeta**(func)
|
|
9816
|
-
*
|
|
9817
|
-
* Runtime utility which provides a `fn` and `props` property which are
|
|
9818
|
-
* decomposed from the input function.
|
|
9819
|
-
*
|
|
9820
|
-
* - the `fn` is a clone of the underlying function
|
|
9821
|
-
*/
|
|
9822
|
-
declare function fnMeta<TFn extends AnyFunction$1>(func: TFn): {
|
|
9823
|
-
fn: <A extends AsFnMeta<TFn>["params"]>(...args: A) => any;
|
|
9824
|
-
props: _Props<TFn>;
|
|
9825
|
-
};
|
|
9804
|
+
|
|
9826
9805
|
//#endregion
|
|
9827
9806
|
//#region src/functions/fnProps.d.ts
|
|
9828
9807
|
/**
|
|
@@ -10101,7 +10080,7 @@ declare function getEach<const TList extends readonly unknown[], const TDotPath
|
|
|
10101
10080
|
* - If an array is passed in, you are allowed to use negative values to dereference
|
|
10102
10081
|
* off the back of the array.
|
|
10103
10082
|
*/
|
|
10104
|
-
declare function indexOf<TContainer extends
|
|
10083
|
+
declare function indexOf<const TContainer extends N | NarrowObject<N> | readonly N[], const N extends Narrowable$1, const TIdx extends PropertyKey | null>(val: TContainer, index: TIdx): TContainer extends Container$1 ? IndexOf<TContainer, TIdx> : Err$2<"invalid-index">;
|
|
10105
10084
|
//# sourceMappingURL=indexOf.d.ts.map
|
|
10106
10085
|
//#endregion
|
|
10107
10086
|
//#region src/lists/intersection.d.ts
|
|
@@ -14588,5 +14567,5 @@ declare function asVueRef<T extends Narrowable$1>(value: T): VueRef<T>;
|
|
|
14588
14567
|
//# sourceMappingURL=asVueRef.d.ts.map
|
|
14589
14568
|
|
|
14590
14569
|
//#endregion
|
|
14591
|
-
export { AsClassSelector, AsUnionOptions, BetweenScope, CssFromDefnOption, CssKeyframeCallback, CssSelectorOptions, CsvFormat, DoesExtendTypeguard, EqualsSome__Partial, GetEachOptions, GetInference, GetInferenceProps, GetOptions, GrammarEncoder, Joiner, KeyframeApi, MetricTypeGuard, NO_MATCH, NestingApi, SafeStringDecoder, SafeStringEncoder, ShapeApiImplementation, StartingWithTypeGuard, StaticTakeFunction__CallBack, StaticTakeFunction__Rtn, StripSurroundConfigured, SurroundWith, TakeFunction__Options, TypeOfTypeGuard, UomTypeGuard, UrlMeta, YouTubeMeta, abs, add, addFnToProps, addPropsToFn, addToken, afterFirst, and, append, array, asArray, asChars, asDate, asDateTime, asEpochTimestamp, asFourDigitYear, asFromTo, asInputToken, asIsoDate, asIsoDateTime, asNumber, asOutputFunction, asPhoneFormat, asRecord, asString, asTakeState, asTemplate, asTwoDigitMonth, asType, asTypeSubtype, asTypedError, asUnion, asVueRef, between, boolean, brand, capitalize, cardType, choices, compare, contains, createConstant, createConverter, createCssKeyframe, createCssSelector, createErrorCondition, createFifoQueue, createFixedLengthArray, createFnWithProps, createGrammar, createLifoQueue, createNestingConfig, createStaticTakeFunction, createTakeFunction, createTakeStartEndFunction, createTakeWhileFunction, createTemplateRegExp, createToken, createTokenSyntax, cssColor, cssFromDefinition, csv, dateObjectToIso, daysInMonth, decrement, defineCss, defineObj, defineObject, defineObjectWith, defineTuple, doesExtend, dropFirstStackFrame, eachAsString, endsWith, endsWithTypeguard, ensureLeading, ensureSurround, ensureTrailing, entries, equalsSome, err, errCondition, every, filter, filterEmpty, filterUndefined, find, firstChar, fn,
|
|
14570
|
+
export { AsClassSelector, AsUnionOptions, BetweenScope, CssFromDefnOption, CssKeyframeCallback, CssSelectorOptions, CsvFormat, DoesExtendTypeguard, EqualsSome__Partial, GetEachOptions, GetInference, GetInferenceProps, GetOptions, GrammarEncoder, Joiner, KeyframeApi, MetricTypeGuard, NO_MATCH, NestingApi, SafeStringDecoder, SafeStringEncoder, ShapeApiImplementation, StartingWithTypeGuard, StaticTakeFunction__CallBack, StaticTakeFunction__Rtn, StripSurroundConfigured, SurroundWith, TakeFunction__Options, TypeOfTypeGuard, UomTypeGuard, UrlMeta, YouTubeMeta, abs, add, addFnToProps, addPropsToFn, addToken, afterFirst, and, append, array, asArray, asChars, asDate, asDateTime, asEpochTimestamp, asFourDigitYear, asFromTo, asInputToken, asIsoDate, asIsoDateTime, asNumber, asOutputFunction, asPhoneFormat, asRecord, asString, asTakeState, asTemplate, asTwoDigitMonth, asType, asTypeSubtype, asTypedError, asUnion, asVueRef, between, boolean, brand, capitalize, cardType, choices, compare, contains, createConstant, createConverter, createCssKeyframe, createCssSelector, createErrorCondition, createFifoQueue, createFixedLengthArray, createFnWithProps, createGrammar, createLifoQueue, createNestingConfig, createStaticTakeFunction, createTakeFunction, createTakeStartEndFunction, createTakeWhileFunction, createTemplateRegExp, createToken, createTokenSyntax, cssColor, cssFromDefinition, csv, dateObjectToIso, daysInMonth, decrement, defineCss, defineObj, defineObject, defineObjectWith, defineTuple, doesExtend, dropFirstStackFrame, eachAsString, endsWith, endsWithTypeguard, ensureLeading, ensureSurround, ensureTrailing, entries, equalsSome, err, errCondition, every, filter, filterEmpty, filterUndefined, find, firstChar, fn, fnProps, fourDigitYear, freeze, fromDefineObject, fromDefineTuple, fromInputToken, fromKeyValue, get, getDaysBetween, getEach, getMonthAbbrev, getMonthName, getMonthNumber, getPhoneCountryCode, getSeason, getTailwindModifiers, getToday, getTokenData, getTokenKind, getTomorrow, getTypeSubtype, getUrlBase, getUrlDefaultPort, getUrlDynamics, getUrlPath, getUrlPort, getUrlProtocol, getUrlQueryParams, getUrlSource, getWeekNumber, getYear, getYesterday, getYouTubePageType, handleDoneFn, hasCountryCode, hasDefaultValue, hasHtml, hasIndexOf, hasKeys, hasNonStringKeys, hasOnlyStringKeys, hasOnlyStringValues, hasOnlySymbolKeys, hasOverlappingKeys, hasProtocol, hasProtocolPrefix, hasSymbolKeys, hasUrlPort, hasUrlQueryParameter, hasValidHtml, hasWhiteSpace, idLiteral, idTypeGuard, identity, ifArray, ifArrayPartial, ifBoolean, ifChar, ifContainer, ifDefined, ifEmpty, ifEqual, ifError, ifFalse, ifFunction, ifHasKey, ifLength, ifLowercaseChar, ifNotNull, ifNull, ifNumber, ifObject, ifSameType, ifScalar, ifString, ifTrue, ifUndefined, ifUppercaseChar, increment, indexOf, infer, integer, intersect, intersection, ip6GroupExpansion, isAccelerationMetric, isAccelerationUom, isAfter, isAlpha, isAmazonUrl, isAmericanExpress, isApi, isApiSurface, isAppleUrl, isAreaMetric, isAreaUom, isArray, isAustralianNewsUrl, isBefore, isBelgiumNewsUrl, isBestBuyUrl, isBitbucketUrl, isBoolean, isBooleanArray, isBooleanLike, isCanadianNewsUrl, isChineseNewsUrl, isCodeCommitUrl, isComparisonOperation, isConstant, isContainer, isCostCoUrl, isCountryAbbrev, isCountryCode2, isCountryCode3, isCountryName, isCreditCard, isCssAspectRatio, isCsv, isCurrentMetric, isCurrentUom, isCvsUrl, isDanishNewsUrl, isDate, isDateLike, isDateMeta, isDayJs, isDefineObject, isDefineTuple, isDefined, isDellUrl, isDeltaReturn, isDictionary, isDistanceMetric, isDistanceUom, isDomainName, isDoneFn, isDoubleLeap, isDutchNewsUrl, isEbayUrl, isEmail, isEmpty, isEnergyMetric, isEnergyUom, isEpochInMilliseconds, isEpochInSeconds, isEqual, isErr, isError, isEscapeFunction, isEtsyUrl, isEven, isFalse, isFalsy, isFnWithParams, isFourDigitYear, isFrenchNewsUrl, isFrequencyMetric, isFrequencyUom, isFunction, isGermanNewsUrl, isGithubIssueUrl, isGithubIssuesListUrl, isGithubOrgUrl, isGithubProjectUrl, isGithubProjectsListUrl, isGithubReleaseTagUrl, isGithubReleasesListUrl, isGithubRepoReleaseTagUrl, isGithubRepoReleasesUrl, isGithubRepoUrl, isGithubUrl, isGreaterThan, isGreaterThanOrEqual, isHexadecimal, isHmUrl, isHomeDepotUrl, isHtml, isHtmlComponentTag, isHtmlElement, isIanaTimezone, isIkeaUrl, isInUnion, isIndexable, isIndianNewsUrl, isInlineSvg, isInputToken, isInputToken__String, isInteger, isIp4Address, isIp6Address, isIp6Subnet, isIpAddress, isIso3166Alpha2, isIso3166Alpha3, isIso3166CountryCode, isIso3166CountryName, isIsoDate, isIsoDateTime, isIsoExplicitDate, isIsoExplicitTime, isIsoImplicitDate, isIsoImplicitTime, isIsoMonthDate, isIsoTime, isIsoYear, isIsoYearMonth, isItalianNewsUrl, isJapaneseNewsUrl, isKrogersUrl, isLeapYear, isLength, isLikeRegExp, isLowesUrl, isLuminosityMetric, isLuminosityUom, isLuxonDate, isMacysUrl, isMap, isMassMetric, isMassUom, isMastercard, isMetric, isMetricCategory, isMexicanNewsUrl, isMinimalDigitDate, isMoment, isMonthAbbrev, isMonthName, isNarrowable, isNarrowableArray, isNarrowableDictionary, isNegativeNumber, isNestingEnd, isNestingEndMatch, isNestingKeyValue, isNestingStart, isNestingTuple, isNever, isNewsUrl, isNikeUrl, isNorwegianNewsUrl, isNotEmpty, isNotError, isNotNull, isNotUnset, isNothing, isNull, isNumber, isNumberLike, isNumericArray, isNumericString, isObject, isObjectKey, isObjectKeyRequiringQuotes, isOdd, isOk, isOptionalParamFunction, isParsedDate, isPhoneNumber, isPowerMetric, isPowerUom, isPressureMetric, isPressureUom, isProtocol, isProtocolPrefix, isReadonlyArray, isRef, isRegExp, isRepoSource, isRepoUrl, isResistanceMetric, isResistanceUom, isRetailUrl, isSameDay, isSameMonth, isSameMonthYear, isSameTypeOf, isSameYear, isScalar, isSemanticVersion, isSet, isSetContainer, isShape, isShapeCallback, isSimpleContainerToken, isSimpleContainerTokenTuple, isSimpleScalarToken, isSimpleScalarTokenTuple, isSimpleToken, isSimpleTokenTuple, isSocialMediaProfileUrl, isSocialMediaUrl, isSouthKoreanNewsUrl, isSpanishNewsUrl, isSpecificConstant, isSpeedMetric, isSpeedUom, isStaticTemplate, isString, isStringArray, isStringLiteral, isStringOrNumericArray, isSwissNewsUrl, isSymbol, isTailwindColor, isTailwindColorClass, isTailwindColorName, isTailwindColorTarget, isTailwindColorWithLuminosity, isTailwindColorWithLuminosityAndOpacity, isTailwindModifier, isTakeState, isTargetUrl, isTemperatureMetric, isTemperatureUom, isTemporalDate, isThenable, isThisMonth, isThisWeek, isThisYear, isThreeDigitMillisecond, isTimeMetric, isTimeUom, isTimezoneOffset, isToday, isTomorrow, isTrimable, isTrue, isTruthy, isTuple, isTurkishNewsUrl, isTwoDigitDate, isTwoDigitHour, isTwoDigitMinute, isTwoDigitMonth, isTwoDigitSecond, isTypeOf, isTypeSubtype, isTypeTuple, isTypedError, isUkNewsUrl, isUndefined, isUnset, isUom, isUomCategory, isUri, isUrl, isUrlPath, isUrlSource, isUsNewsUrl, isUsPhoneNumber, isUsStateAbbreviation, isUsStateName, isValidAtomicTag, isValidBlockTag, isValidComparisonParams, isValidHtml, isValidHtmlTag, isVariable, isVisa, isVisaMastercard, isVoltageMetric, isVoltageUom, isVolumeMetric, isVolumeUom, isWalgreensUrl, isWalmartUrl, isWayfairUrl, isWeakMap, isWholeFoodsUrl, isYesterday, isYouTubeCreatorUrl, isYouTubeFeedHistoryUrl, isYouTubeFeedUrl, isYouTubePlaylistUrl, isYouTubePlaylistsUrl, isYouTubeShareUrl, isYouTubeSubscriptionsUrl, isYouTubeTrendingUrl, isYouTubeUrl, isYouTubeVideoUrl, isYouTubeVideosInPlaylist, isZaraUrl, isZipCode, isZipCode5, isZipPlus4, joinWith, keysOf, keysWithError, kindLiteral, last, lastChar, lessThan, lessThanOrEqual, literal, logicalReturns, lookupCountryAlpha2, lookupCountryAlpha3, lookupCountryCode, lookupCountryName, lowercase, map, maybePhoneNumber, mergeObjects, mergeScalars, mergeTuples, mutable, nameLiteral, narrow, nbsp, nestedSplit, nesting, not, nullType, objectValues, omitKeys, optional, optionalOrNull, or, orNull, parseDate, parseDateObject, parseIsoDate, parseNumericDate, pathJoin, pluralize, pop, record, regexToken, removePhoneCountryCode, removeTailwindModifiers, removeUrlProtocol, replace, replaceAll, replaceAllFromTo, result$1 as result, retainAfter, retainAfterInclusive, retainChars, retainKeys, retainUntil, retainUntilInclusive, retainUntil__Nested, retainWhile, reverse, reverseLookup, rightWhitespace, setupSafeStringEncoding, shape, sharedKeys, shift, simpleContainerToken, simpleContainerType, simpleScalarToken, simpleScalarType, simpleToken, simpleType, slice, sortByKey, split, startsWith, startsWithTypeguard, stripAfter, stripAfterLast, stripBefore, stripChars, stripLeading, stripParenthesis, stripSurround, stripTrailing, stripUntil, stripWhile, surround, take, takeNumericCharacters, takeStart, takeStringToken, threeDigitMillisecond, toAllCaps, toCamelCase, toInteger, toIsoDateString, toJSON, toKebabCase, toKeyValue, toLowercase, toNumber, toNumericArray, toPascalCase, toSnakeCase, toString, toStringLiteral, toStringLiteral__Tuple, toStringToken, trim, trimEnd, trimStart, truncate, tuple, twColor, twoDigitHour, twoDigitMinute, twoDigitSecond, typedError, unbrand, uncapitalize, undefinedType, unionize, unique, uniqueKeys, unknown, unset, urlMeta, usingLookup, validHtmlAttributes, valuesOf, weakMap, widen, withDefaults, withKeys, withValue, withoutKeys, withoutValue, youtubeEmbed, youtubeMeta };
|
|
14592
14571
|
//# sourceMappingURL=index.d.cts.map
|