inferred-types 0.55.3 → 0.55.4

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.
@@ -13678,17 +13678,18 @@ declare function optionalOrNull<T extends Narrowable>(value: T): T | null | unde
13678
13678
  declare function stripParenthesis<T extends string>(val: T): Trim<StripSurround<Trim<T>, "(" | ")">>;
13679
13679
 
13680
13680
  type PushTop<TNatural extends readonly string[], TTop extends readonly string[]> = [
13681
- ...Reverse<TTop>,
13681
+ ...TTop,
13682
13682
  ...Filter<TNatural, TTop[number]>
13683
13683
  ];
13684
13684
  type PushBottom<TNatural extends readonly string[], TBot extends readonly string[]> = [
13685
13685
  ...Filter<TNatural, TBot[number]>,
13686
13686
  ...TBot
13687
13687
  ];
13688
+ type Always<O> = O extends readonly string[] ? readonly (O[number] & string)[] : readonly string[];
13688
13689
  interface SortApi<O extends readonly string[]> {
13689
13690
  order: O;
13690
- toTop: <TTop extends readonly (O[number] & string)[]>(...keys: TTop) => SortApi<PushTop<O, TTop>>;
13691
- toBottom: <TBot extends readonly (O[number] & string)[]>(...keys: TBot) => SortApi<PushBottom<O, TBot>>;
13691
+ toTop: <TTop extends Always<O>>(...keys: TTop) => SortApi<PushTop<O, TTop>>;
13692
+ toBottom: <TBot extends Always<O>>(...keys: TBot) => SortApi<PushBottom<O, TBot>>;
13692
13693
  done: () => O;
13693
13694
  }
13694
13695
  type ToKeyValueSort<O extends readonly string[]> = <TCb extends SortApi<O>>(cb: TCb) => unknown;
@@ -15333,4 +15334,4 @@ declare function isVueRef(val: unknown): val is VueRef;
15333
15334
  */
15334
15335
  declare function asVueRef<T extends Narrowable>(value: T): VueRef<T>;
15335
15336
 
15336
- export { type AsClassSelector, type AsList, type BoxValue, type BoxedFnParams, type ConfigRestApi, type CssKeyframeCallback, type CssSelectorOptions, type CsvFormat, type DictionaryWithValueFilter, type DictionaryWithoutValueFilter, type DoesExtendTypeguard, type EndingWithTypeGuard, type EndpointGenerator, type EqualTo, type Finder, type FnParam, type FnParams, type GenParam, type GenParams, type GetEachOptions, type GetInference, type GetInferenceProps, type GetOptions, type Joiner, type KeyframeApi, type Mapper, type Rtn, ShapeApiImplementation, type SingletonClosure, type SortApi, type StartingWithTypeGuard, type StripSurroundConfigured, type SurroundWith, type ToKeyValueSort, type TokenContainerClosure, type TokenFunctionClosure, type TokenSetClosure, type TypeOfTypeGuard, type Unbox, type UndefinedArrayIsUnknown, type UnionClosure, type UrlMeta, type YouTubeMeta, addFnToProps, addPropsToFn, and, asApi, asArray, asChars, asDate, asEscapeFunction, asIsoDate, asOptionalParamFunction, asPhoneFormat, asRecord, asString, asStringLiteral, asType, asTypeToken, asVueRef, box, boxDictionaryValues, capitalize, choices, createConverter, createCssKeyframe, createCssSelector, createErrorCondition, createFifoQueue, createFixedLengthArray, createFnWithProps, createFnWithPropsExplicit, createLifoQueue, createMapper, createObjectMap, createTypeToken, cssColor, csv, defineCss, defineObj, defineObject, defineObjectApi, defineTuple, doesExtend, endsWith, ensureLeading, ensureSurround, ensureTrailing, entries, errCondition, filter, find, fnMeta, fromDefineObject, fromKeyValue, get, getDaysBetween, getEach, getPhoneCountryCode, getTailwindModifiers, getToday, getTokenKind, getTomorrow, getTypeSubtype, getUrlBase, getUrlDefaultPort, getUrlDynamics, getUrlPath, getUrlPort, getUrlProtocol, getUrlQueryParams, getUrlSource, getWeekNumber, getYesterday, getYouTubePageType, handleDoneFn, hasDefaultValue, hasIndexOf, hasKeys, hasOverlappingKeys, hasProtocol, hasProtocolPrefix, hasUrlPort, hasUrlQueryParameter, hasWhiteSpace, idLiteral, idTypeGuard, identity, ifArray, ifArrayPartial, ifBoolean, ifChar, ifContainer, ifDefined, ifFalse, ifFunction, ifHasKey, ifLength, ifLowercaseChar, ifNotNull, ifNull, ifNumber, ifObject, ifSameType, ifScalar, ifString, ifTrue, ifUndefined, ifUppercaseChar, indexOf, infer, intersect, intersection, ip6GroupExpansion, ip6Prefix, isAccelerationMetric, isAccelerationUom, isAlpha, isAmazonUrl, isApi, isApiSurface, isAppleUrl, isAreaMetric, isAreaUom, isArray, isArrayToken, isAtomicKind, isAtomicToken, isAustralianNewsUrl, isBelgiumNewsUrl, isBestBuyUrl, isBitbucketUrl, isBoolean, isBooleanLike, isBox, isCanadianNewsUrl, isChineseNewsUrl, isCodeCommitUrl, isConstant, isContainer, isContainerToken, isCostCoUrl, isCountryAbbrev, isCountryCode2, isCountryCode3, isCountryName, isCssAspectRatio, isCsv, isCurrentMetric, isCurrentUom, isCvsUrl, isDanishNewsUrl, isDate, isDefineObject, isDefined, isDellUrl, isDistanceMetric, isDistanceUom, isDomainName, isDoneFn, isDutchNewsUrl, isEbayUrl, isEmail, isEmpty, isEnergyMetric, isEnergyUom, isEqual, isErrorCondition, isEscapeFunction, isEtsyUrl, isFalse, isFalsy, isFnBasedKind, isFnBasedToken, isFnWithParams, isFrenchNewsUrl, isFrequencyMetric, isFrequencyUom, isFunction, isGermanNewsUrl, isGithubIssueUrl, isGithubIssuesListUrl, isGithubOrgUrl, isGithubProjectUrl, isGithubProjectsListUrl, isGithubReleaseTagUrl, isGithubReleasesListUrl, isGithubRepoReleaseTagUrl, isGithubRepoReleasesUrl, isGithubRepoUrl, isGithubUrl, isHexadecimal, isHmUrl, isHomeDepotUrl, isHtmlElement, isIkeaUrl, isIndexable, isIndianNewsUrl, isInlineSvg, isIp4Address, isIp6Address, isIpAddress, isIso3166Alpha2, isIso3166Alpha3, isIso3166CountryCode, isIso3166CountryName, isIsoDate, isIsoDateTime, isIsoExplicitDate, isIsoExplicitTime, isIsoImplicitDate, isIsoImplicitTime, isIsoTime, isIsoYear, isItalianNewsUrl, isJapaneseNewsUrl, isKrogersUrl, isLeapYear, isLength, isLikeRegExp, isLowesUrl, isLuminosityMetric, isLuminosityUom, isLuxonDateTime, isMacysUrl, isMap, isMapToken, isMassMetric, isMassUom, isMetric, isMexicanNewsUrl, isMoment, isNarrowableObject, isNever, isNewsUrl, isNikeUrl, isNorwegianNewsUrl, isNotNull, isNothing, isNull, isNumber, isNumberLike, isNumericArray, isNumericString, isObject, isObjectToken, isOptionalParamFunction, isPhoneNumber, isPowerMetric, isPowerUom, isPressureMetric, isPressureUom, isProtocol, isProtocolPrefix, isReadonlyArray, isRecordToken, isRef, isRegExp, isRepoSource, isRepoUrl, isResistance, isResistanceUom, isRetailUrl, isSameTypeOf, isScalar, isSemanticVersion, isSet, isSetBasedKind, isSetBasedToken, isSetContainer, isSetToken, isShape, isShapeCallback, isSimpleContainerToken, isSimpleContainerTokenTuple, isSimpleScalarToken, isSimpleScalarTokenTuple, isSimpleToken, isSimpleTokenTuple, isSingletonKind, isSingletonToken, isSocialMediaProfileUrl, isSocialMediaUrl, isSouthKoreanNewsUrl, isSpanishNewsUrl, isSpecificConstant, isSpeedMetric, isSpeedUom, isString, isStringArray, isSwissNewsUrl, isSymbol, isTailwindColor, isTailwindColorClass, isTailwindColorName, isTailwindColorTarget, isTailwindColorWithLuminosity, isTailwindColorWithLuminosityAndOpacity, isTailwindModifier, isTargetUrl, isTemperatureMetric, isTemperatureUom, isThenable, isThisMonth, isThisWeek, isThisYear, isTimeMetric, isTimeUom, isToday, isTomorrow, isTrimable, isTrue, isTruthy, isTuple, isTupleToken, isTurkishNewsUrl, isTypeOf, isTypeSubtype, isTypeToken, isTypeTokenKind, isTypeTuple, isUkNewsUrl, isUndefined, isUnset, isUom, isUri, isUrl, isUrlPath, isUrlSource, isUsNewsUrl, isUsStateAbbreviation, isUsStateName, isVariable, isVoltageMetric, isVoltageUom, isVolumeMetric, isVolumeUom, isVueRef, isWalgreensUrl, isWalmartUrl, isWayfairUrl, isWholeFoodsUrl, isYesterday, isYouTubeCreatorUrl, isYouTubeFeedHistoryUrl, isYouTubeFeedUrl, isYouTubePlaylistUrl, isYouTubePlaylistsUrl, isYouTubeShareUrl, isYouTubeSubscriptionsUrl, isYouTubeTrendingUrl, isYouTubeUrl, isYouTubeVideoUrl, isYouTubeVideosInPlaylist, isZaraUrl, isZipCode, isZipCode5, isZipPlus4, joinWith, jsonValue, jsonValues, keysOf, kindLiteral, last, list, literal, logicalReturns, lookupCountryAlpha2, lookupCountryAlpha3, lookupCountryCode, lookupCountryName, lowercase, mergeObjects, mergeScalars, mergeTuples, nameLiteral, narrow, narrowObjectTo, narrowObjectToType, never, objectToApi, objectValues, omit, optional, optionalOrNull, or, orNull, pathJoin, pluralize, removePhoneCountryCode, removeTailwindModifiers, removeUrlProtocol, result, retain, retainAfter, retainAfterInclusive, retainChars, retainUntil, retainUntilInclusive, retainWhile, reverse, rightWhitespace, shape, sharedKeys, shift, simpleContainerToken, simpleContainerTokenToTypeToken, simpleContainerType, simpleScalarToken, simpleScalarTokenToTypeToken, simpleScalarType, simpleToken, simpleType, simpleUnionTokenToTypeToken, slice, split, startsWith, stripAfter, stripBefore, stripChars, stripLeading, stripParenthesis, stripSurround, stripTrailing, stripUntil, stripWhile, surround, takeNumericCharacters, takeProp, toCamelCase, toKebabCase, toKeyValue, toNumber, toNumericArray, toPascalCase, toSnakeCase, toString, toUppercase, trim, trimEnd, trimLeft, trimRight, trimStart, truncate, tuple, twColor, unbox, uncapitalize, union, unionize, unique, uniqueKeys, unset, uppercase, urlMeta, valuesOf, widen, withDefaults, withKeys, withValue, withoutKeys, withoutValue, wrapFn, youtubeEmbed, youtubeMeta };
15337
+ export { type AsClassSelector, type AsList, type BoxValue, type BoxedFnParams, type ConfigRestApi, type CssKeyframeCallback, type CssSelectorOptions, type CsvFormat, type DictionaryWithValueFilter, type DictionaryWithoutValueFilter, type DoesExtendTypeguard, type EndingWithTypeGuard, type EndpointGenerator, type EqualTo, type Finder, type FnParam, type FnParams, type GenParam, type GenParams, type GetEachOptions, type GetInference, type GetInferenceProps, type GetOptions, type Joiner, type KeyframeApi, type Mapper, type Rtn, ShapeApiImplementation, type SingletonClosure, type StartingWithTypeGuard, type StripSurroundConfigured, type SurroundWith, type ToKeyValueSort, type TokenContainerClosure, type TokenFunctionClosure, type TokenSetClosure, type TypeOfTypeGuard, type Unbox, type UndefinedArrayIsUnknown, type UnionClosure, type UrlMeta, type YouTubeMeta, addFnToProps, addPropsToFn, and, asApi, asArray, asChars, asDate, asEscapeFunction, asIsoDate, asOptionalParamFunction, asPhoneFormat, asRecord, asString, asStringLiteral, asType, asTypeToken, asVueRef, box, boxDictionaryValues, capitalize, choices, createConverter, createCssKeyframe, createCssSelector, createErrorCondition, createFifoQueue, createFixedLengthArray, createFnWithProps, createFnWithPropsExplicit, createLifoQueue, createMapper, createObjectMap, createTypeToken, cssColor, csv, defineCss, defineObj, defineObject, defineObjectApi, defineTuple, doesExtend, endsWith, ensureLeading, ensureSurround, ensureTrailing, entries, errCondition, filter, find, fnMeta, fromDefineObject, fromKeyValue, get, getDaysBetween, getEach, getPhoneCountryCode, getTailwindModifiers, getToday, getTokenKind, getTomorrow, getTypeSubtype, getUrlBase, getUrlDefaultPort, getUrlDynamics, getUrlPath, getUrlPort, getUrlProtocol, getUrlQueryParams, getUrlSource, getWeekNumber, getYesterday, getYouTubePageType, handleDoneFn, hasDefaultValue, hasIndexOf, hasKeys, hasOverlappingKeys, hasProtocol, hasProtocolPrefix, hasUrlPort, hasUrlQueryParameter, hasWhiteSpace, idLiteral, idTypeGuard, identity, ifArray, ifArrayPartial, ifBoolean, ifChar, ifContainer, ifDefined, ifFalse, ifFunction, ifHasKey, ifLength, ifLowercaseChar, ifNotNull, ifNull, ifNumber, ifObject, ifSameType, ifScalar, ifString, ifTrue, ifUndefined, ifUppercaseChar, indexOf, infer, intersect, intersection, ip6GroupExpansion, ip6Prefix, isAccelerationMetric, isAccelerationUom, isAlpha, isAmazonUrl, isApi, isApiSurface, isAppleUrl, isAreaMetric, isAreaUom, isArray, isArrayToken, isAtomicKind, isAtomicToken, isAustralianNewsUrl, isBelgiumNewsUrl, isBestBuyUrl, isBitbucketUrl, isBoolean, isBooleanLike, isBox, isCanadianNewsUrl, isChineseNewsUrl, isCodeCommitUrl, isConstant, isContainer, isContainerToken, isCostCoUrl, isCountryAbbrev, isCountryCode2, isCountryCode3, isCountryName, isCssAspectRatio, isCsv, isCurrentMetric, isCurrentUom, isCvsUrl, isDanishNewsUrl, isDate, isDefineObject, isDefined, isDellUrl, isDistanceMetric, isDistanceUom, isDomainName, isDoneFn, isDutchNewsUrl, isEbayUrl, isEmail, isEmpty, isEnergyMetric, isEnergyUom, isEqual, isErrorCondition, isEscapeFunction, isEtsyUrl, isFalse, isFalsy, isFnBasedKind, isFnBasedToken, isFnWithParams, isFrenchNewsUrl, isFrequencyMetric, isFrequencyUom, isFunction, isGermanNewsUrl, isGithubIssueUrl, isGithubIssuesListUrl, isGithubOrgUrl, isGithubProjectUrl, isGithubProjectsListUrl, isGithubReleaseTagUrl, isGithubReleasesListUrl, isGithubRepoReleaseTagUrl, isGithubRepoReleasesUrl, isGithubRepoUrl, isGithubUrl, isHexadecimal, isHmUrl, isHomeDepotUrl, isHtmlElement, isIkeaUrl, isIndexable, isIndianNewsUrl, isInlineSvg, isIp4Address, isIp6Address, isIpAddress, isIso3166Alpha2, isIso3166Alpha3, isIso3166CountryCode, isIso3166CountryName, isIsoDate, isIsoDateTime, isIsoExplicitDate, isIsoExplicitTime, isIsoImplicitDate, isIsoImplicitTime, isIsoTime, isIsoYear, isItalianNewsUrl, isJapaneseNewsUrl, isKrogersUrl, isLeapYear, isLength, isLikeRegExp, isLowesUrl, isLuminosityMetric, isLuminosityUom, isLuxonDateTime, isMacysUrl, isMap, isMapToken, isMassMetric, isMassUom, isMetric, isMexicanNewsUrl, isMoment, isNarrowableObject, isNever, isNewsUrl, isNikeUrl, isNorwegianNewsUrl, isNotNull, isNothing, isNull, isNumber, isNumberLike, isNumericArray, isNumericString, isObject, isObjectToken, isOptionalParamFunction, isPhoneNumber, isPowerMetric, isPowerUom, isPressureMetric, isPressureUom, isProtocol, isProtocolPrefix, isReadonlyArray, isRecordToken, isRef, isRegExp, isRepoSource, isRepoUrl, isResistance, isResistanceUom, isRetailUrl, isSameTypeOf, isScalar, isSemanticVersion, isSet, isSetBasedKind, isSetBasedToken, isSetContainer, isSetToken, isShape, isShapeCallback, isSimpleContainerToken, isSimpleContainerTokenTuple, isSimpleScalarToken, isSimpleScalarTokenTuple, isSimpleToken, isSimpleTokenTuple, isSingletonKind, isSingletonToken, isSocialMediaProfileUrl, isSocialMediaUrl, isSouthKoreanNewsUrl, isSpanishNewsUrl, isSpecificConstant, isSpeedMetric, isSpeedUom, isString, isStringArray, isSwissNewsUrl, isSymbol, isTailwindColor, isTailwindColorClass, isTailwindColorName, isTailwindColorTarget, isTailwindColorWithLuminosity, isTailwindColorWithLuminosityAndOpacity, isTailwindModifier, isTargetUrl, isTemperatureMetric, isTemperatureUom, isThenable, isThisMonth, isThisWeek, isThisYear, isTimeMetric, isTimeUom, isToday, isTomorrow, isTrimable, isTrue, isTruthy, isTuple, isTupleToken, isTurkishNewsUrl, isTypeOf, isTypeSubtype, isTypeToken, isTypeTokenKind, isTypeTuple, isUkNewsUrl, isUndefined, isUnset, isUom, isUri, isUrl, isUrlPath, isUrlSource, isUsNewsUrl, isUsStateAbbreviation, isUsStateName, isVariable, isVoltageMetric, isVoltageUom, isVolumeMetric, isVolumeUom, isVueRef, isWalgreensUrl, isWalmartUrl, isWayfairUrl, isWholeFoodsUrl, isYesterday, isYouTubeCreatorUrl, isYouTubeFeedHistoryUrl, isYouTubeFeedUrl, isYouTubePlaylistUrl, isYouTubePlaylistsUrl, isYouTubeShareUrl, isYouTubeSubscriptionsUrl, isYouTubeTrendingUrl, isYouTubeUrl, isYouTubeVideoUrl, isYouTubeVideosInPlaylist, isZaraUrl, isZipCode, isZipCode5, isZipPlus4, joinWith, jsonValue, jsonValues, keysOf, kindLiteral, last, list, literal, logicalReturns, lookupCountryAlpha2, lookupCountryAlpha3, lookupCountryCode, lookupCountryName, lowercase, mergeObjects, mergeScalars, mergeTuples, nameLiteral, narrow, narrowObjectTo, narrowObjectToType, never, objectToApi, objectValues, omit, optional, optionalOrNull, or, orNull, pathJoin, pluralize, removePhoneCountryCode, removeTailwindModifiers, removeUrlProtocol, result, retain, retainAfter, retainAfterInclusive, retainChars, retainUntil, retainUntilInclusive, retainWhile, reverse, rightWhitespace, shape, sharedKeys, shift, simpleContainerToken, simpleContainerTokenToTypeToken, simpleContainerType, simpleScalarToken, simpleScalarTokenToTypeToken, simpleScalarType, simpleToken, simpleType, simpleUnionTokenToTypeToken, slice, split, startsWith, stripAfter, stripBefore, stripChars, stripLeading, stripParenthesis, stripSurround, stripTrailing, stripUntil, stripWhile, surround, takeNumericCharacters, takeProp, toCamelCase, toKebabCase, toKeyValue, toNumber, toNumericArray, toPascalCase, toSnakeCase, toString, toUppercase, trim, trimEnd, trimLeft, trimRight, trimStart, truncate, tuple, twColor, unbox, uncapitalize, union, unionize, unique, uniqueKeys, unset, uppercase, urlMeta, valuesOf, widen, withDefaults, withKeys, withValue, withoutKeys, withoutValue, wrapFn, youtubeEmbed, youtubeMeta };
@@ -5209,7 +5209,7 @@ function sortKeyApi(order) {
5209
5209
  order,
5210
5210
  toTop: (...keys) => sortKeyApi(
5211
5211
  [
5212
- ...keys.toReversed(),
5212
+ ...keys,
5213
5213
  ...order.filter((i) => !keys.includes(i))
5214
5214
  ]
5215
5215
  ),