inferred-types 0.53.2 → 0.53.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.
- package/modules/constants/dist/index.cjs +395 -187
- package/modules/constants/dist/index.cjs.map +1 -1
- package/modules/constants/dist/index.js +186 -3
- package/modules/constants/dist/index.js.map +1 -1
- package/modules/inferred-types/dist/index.cjs +1550 -656
- package/modules/inferred-types/dist/index.cjs.map +1 -1
- package/modules/inferred-types/dist/index.d.ts +16 -22
- package/modules/inferred-types/dist/index.js +900 -32
- package/modules/inferred-types/dist/index.js.map +1 -1
- package/modules/runtime/dist/index.cjs +1152 -455
- package/modules/runtime/dist/index.cjs.map +1 -1
- package/modules/runtime/dist/index.d.ts +14 -20
- package/modules/runtime/dist/index.js +701 -30
- package/modules/runtime/dist/index.js.map +1 -1
- package/modules/types/dist/index.cjs +57 -18
- package/modules/types/dist/index.cjs.map +1 -1
- package/modules/types/dist/index.d.ts +2 -2
- package/modules/types/dist/index.js +17 -3
- package/modules/types/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/modules/constants/dist/index.d.mts +0 -4084
- package/modules/inferred-types/dist/index.d.mts +0 -36191
- package/modules/runtime/dist/index.d.mts +0 -14397
- package/modules/types/dist/index.d.mts +0 -17712
|
@@ -6649,8 +6649,8 @@ type CssPseudoClass = CssDisplayStatePseudoClasses | CssFunctionalPseudoClass |
|
|
|
6649
6649
|
*/
|
|
6650
6650
|
type CssPseudoClassDefn<T extends CssPseudoClass = CssPseudoClass> = `${T}(${string})`;
|
|
6651
6651
|
|
|
6652
|
-
type CssIdSelector = `#${
|
|
6653
|
-
type CssClassSelector = `.${
|
|
6652
|
+
type CssIdSelector = `#${AlphaChar}${string}`;
|
|
6653
|
+
type CssClassSelector = `.${AlphaChar}${string}`;
|
|
6654
6654
|
/**
|
|
6655
6655
|
* A CSS Tag Selector.
|
|
6656
6656
|
*
|
|
@@ -9220,21 +9220,6 @@ type AsNarrowingFn<TParams extends Tuple | TypedFunction, TReturn = unknown, TPr
|
|
|
9220
9220
|
*/
|
|
9221
9221
|
type RemoveFnProps<T extends AnyFunction> = (...args: AsFnMeta<T>["args"]) => AsFnMeta<T>["returns"];
|
|
9222
9222
|
|
|
9223
|
-
/**
|
|
9224
|
-
* **ToFn**`<T>`
|
|
9225
|
-
*
|
|
9226
|
-
* Ensures that resultant type is a function, where the mapping is:
|
|
9227
|
-
*
|
|
9228
|
-
* - `AnyFunction` - function signature maintained
|
|
9229
|
-
* - `FnMeta` - is converted to a precise function type
|
|
9230
|
-
* - `never` _or_ `ErrorCondition` - returned "as is"
|
|
9231
|
-
*
|
|
9232
|
-
* All other values will return a function of the form `() => T`
|
|
9233
|
-
*
|
|
9234
|
-
* **Related:** `AsFn`
|
|
9235
|
-
*/
|
|
9236
|
-
type ToFn<T> = T extends AnyFunction ? T : T extends FnMeta<infer _Args, infer _Returns, infer Props, infer Fn> ? IsNever<Props> extends true ? Fn : Fn & Props : () => T;
|
|
9237
|
-
|
|
9238
9223
|
/**
|
|
9239
9224
|
* **TypeGuard**
|
|
9240
9225
|
*
|
|
@@ -11300,6 +11285,10 @@ declare function createCssKeyframe<TName extends string, TKeyframes extends CssK
|
|
|
11300
11285
|
css: `@keyframes ${TName} ${FrameToCSS<HandleDoneFn<ReturnType<TKeyframes>>, {}>}`;
|
|
11301
11286
|
};
|
|
11302
11287
|
|
|
11288
|
+
declare function defineCss<T extends CssDefinition>(defn: T): {
|
|
11289
|
+
defn: T;
|
|
11290
|
+
} & (<S extends string>(selector?: S) => string);
|
|
11291
|
+
|
|
11303
11292
|
/**
|
|
11304
11293
|
* **asDate**`(input)`
|
|
11305
11294
|
*
|
|
@@ -13388,9 +13377,14 @@ declare function isFalsy<V extends Narrowable>(val: V): val is V & FalsyValue;
|
|
|
13388
13377
|
* **isFnWithDict**(input)
|
|
13389
13378
|
*
|
|
13390
13379
|
* Type guard which checks whether a give variable is a function
|
|
13391
|
-
* which
|
|
13380
|
+
* which contains at least one parameter.
|
|
13381
|
+
*
|
|
13382
|
+
* - if you set the parameter types, it will check that precisely the
|
|
13383
|
+
* correct amount are set
|
|
13392
13384
|
*/
|
|
13393
|
-
declare function isFnWithParams<T>(input: T): input is
|
|
13385
|
+
declare function isFnWithParams<T, P extends readonly SimpleToken[]>(input: T, ...params: P): input is T & AsNarrowingFn<P["length"] extends 0 ? [any, ...any[]] : {
|
|
13386
|
+
[K in keyof P]: SimpleType<P[K]>;
|
|
13387
|
+
}, T extends TypedFunction ? ReturnType<T> : unknown>;
|
|
13394
13388
|
|
|
13395
13389
|
/**
|
|
13396
13390
|
* **isFunction**(value)
|
|
@@ -14394,4 +14388,4 @@ declare function isYouTubeVideosInPlaylist<T>(val: T): val is T & YouTubeVideosI
|
|
|
14394
14388
|
*/
|
|
14395
14389
|
declare function asVueRef<T extends Narrowable>(value: T): VueRef<T>;
|
|
14396
14390
|
|
|
14397
|
-
export { type AsClassSelector, type AsList, type BoxValue, type BoxedFnParams, type CssKeyframeCallback, type CssSelectorOptions, type CsvFormat, type EndingWithTypeGuard, type EqualTo, type Finder, type GetEachOptions, type GetOptions, type Joiner, type KeyframeApi, ShapeApiImplementation, type SingletonClosure, type StartingWithTypeGuard, type StripSurroundConfigured, type SurroundWith, 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, createFnWithProps, createLifoQueue, createTypeToken, cssColor, csv, defineObj, defineTuple, endsWith, ensureLeading, ensureSurround, ensureTrailing, entries, errCondition, filter, find, fnMeta, get, getDaysBetween, getEach, getPhoneCountryCode, getTailwindModifiers, getToday, getTomorrow, getUrlPath, getUrlPort, getUrlProtocol, getUrlQueryParams, getUrlSource, getWeekNumber, getYesterday, getYouTubePageType, handleDoneFn, hasDefaultValue, hasIndexOf, hasKeys, 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, intersect, intersection, ip6GroupExpansion, ip6Prefix, isAccelerationMetric, isAccelerationUom, isAlpha, isAmazonUrl, isApi, isApiSurface, isAppleUrl, isAreaMetric, isAreaUom, isArray, isArrayToken, isAtomicToken, isAustralianNewsUrl, isBelgiumNewsUrl, isBestBuyUrl, isBitbucketUrl, isBoolean, isBooleanLike, isBox, isCanadianNewsUrl, isChineseNewsUrl, isCodeCommitUrl, isConstant, isContainer, isContainerToken, isCostCoUrl, isCountryAbbrev, isCountryCode2, isCountryCode3, isCountryName, isCssAspectRatio, isCurrentMetric, isCurrentUom, isCvsUrl, isDanishNewsUrl, isDate, isDefineObject, isDefined, isDellUrl, isDistanceMetric, isDistanceUom, isDomainName, isDoneFn, isDutchNewsUrl, isEbayUrl, isEmail, isEnergyMetric, isEnergyUom, isEqual, isErrorCondition, isEscapeFunction, isEtsyUrl, isFalse, isFalsy, isFnToken, isFnWithParams, isFrenchNewsUrl, isFrequencyMetric, isFrequencyUom, isFunction, isGeneratorToken, 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, isMapToken, isMassMetric, isMassUom, isMetric, isMexicanNewsUrl, isMoment, isNever, isNewsUrl, isNikeUrl, isNorwegianNewsUrl, isNotNull, isNothing, isNull, isNumber, isNumberLike, isNumericArray, isNumericString, isObject, isObjectToken, isOptionalParamFunction, isPhoneNumber, isPowerMetric, isPowerUom, isPressureMetric, isPressureUom, isReadonlyArray, isRecordToken, isRef, isRegExp, isRepoSource, isRepoUrl, isResistance, isResistanceUom, isRetailUrl, isSameTypeOf, isScalar, isSemanticVersion, isSet, isSetToken, isShape, isShapeCallback, isSimpleContainerToken, isSimpleContainerTokenTuple, isSimpleScalarToken, isSimpleScalarTokenTuple, isSimpleToken, isSimpleTokenTuple, 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, isTypeToken, isTypeTuple, isUkNewsUrl, isUndefined, isUnionSetToken, isUnionToken, isUnset, isUom, isUri, isUrl, isUrlPath, isUrlSource, isUsNewsUrl, isUsStateAbbreviation, isUsStateName, isVoltageMetric, isVoltageUom, isVolumeMetric, isVolumeUom, isWalgreensUrl, isWalmartUrl, isWayfairUrl, isWeakMapToken, 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, never, 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, toNumber, toNumericArray, toPascalCase, toSnakeCase, toString, toUppercase, trim, trimEnd, trimLeft, trimRight, trimStart, truncate, tuple, twColor, unbox, uncapitalize, union, unionize, unique, uniqueKeys, uppercase, urlMeta, valuesOf, widen, withDefaults, withKeys, withoutKeys, withoutValue, wrapFn, youtubeEmbed, youtubeMeta };
|
|
14391
|
+
export { type AsClassSelector, type AsList, type BoxValue, type BoxedFnParams, type CssKeyframeCallback, type CssSelectorOptions, type CsvFormat, type EndingWithTypeGuard, type EqualTo, type Finder, type GetEachOptions, type GetOptions, type Joiner, type KeyframeApi, ShapeApiImplementation, type SingletonClosure, type StartingWithTypeGuard, type StripSurroundConfigured, type SurroundWith, 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, createFnWithProps, createLifoQueue, createTypeToken, cssColor, csv, defineCss, defineObj, defineTuple, endsWith, ensureLeading, ensureSurround, ensureTrailing, entries, errCondition, filter, find, fnMeta, get, getDaysBetween, getEach, getPhoneCountryCode, getTailwindModifiers, getToday, getTomorrow, getUrlPath, getUrlPort, getUrlProtocol, getUrlQueryParams, getUrlSource, getWeekNumber, getYesterday, getYouTubePageType, handleDoneFn, hasDefaultValue, hasIndexOf, hasKeys, 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, intersect, intersection, ip6GroupExpansion, ip6Prefix, isAccelerationMetric, isAccelerationUom, isAlpha, isAmazonUrl, isApi, isApiSurface, isAppleUrl, isAreaMetric, isAreaUom, isArray, isArrayToken, isAtomicToken, isAustralianNewsUrl, isBelgiumNewsUrl, isBestBuyUrl, isBitbucketUrl, isBoolean, isBooleanLike, isBox, isCanadianNewsUrl, isChineseNewsUrl, isCodeCommitUrl, isConstant, isContainer, isContainerToken, isCostCoUrl, isCountryAbbrev, isCountryCode2, isCountryCode3, isCountryName, isCssAspectRatio, isCurrentMetric, isCurrentUom, isCvsUrl, isDanishNewsUrl, isDate, isDefineObject, isDefined, isDellUrl, isDistanceMetric, isDistanceUom, isDomainName, isDoneFn, isDutchNewsUrl, isEbayUrl, isEmail, isEnergyMetric, isEnergyUom, isEqual, isErrorCondition, isEscapeFunction, isEtsyUrl, isFalse, isFalsy, isFnToken, isFnWithParams, isFrenchNewsUrl, isFrequencyMetric, isFrequencyUom, isFunction, isGeneratorToken, 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, isMapToken, isMassMetric, isMassUom, isMetric, isMexicanNewsUrl, isMoment, isNever, isNewsUrl, isNikeUrl, isNorwegianNewsUrl, isNotNull, isNothing, isNull, isNumber, isNumberLike, isNumericArray, isNumericString, isObject, isObjectToken, isOptionalParamFunction, isPhoneNumber, isPowerMetric, isPowerUom, isPressureMetric, isPressureUom, isReadonlyArray, isRecordToken, isRef, isRegExp, isRepoSource, isRepoUrl, isResistance, isResistanceUom, isRetailUrl, isSameTypeOf, isScalar, isSemanticVersion, isSet, isSetToken, isShape, isShapeCallback, isSimpleContainerToken, isSimpleContainerTokenTuple, isSimpleScalarToken, isSimpleScalarTokenTuple, isSimpleToken, isSimpleTokenTuple, 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, isTypeToken, isTypeTuple, isUkNewsUrl, isUndefined, isUnionSetToken, isUnionToken, isUnset, isUom, isUri, isUrl, isUrlPath, isUrlSource, isUsNewsUrl, isUsStateAbbreviation, isUsStateName, isVoltageMetric, isVoltageUom, isVolumeMetric, isVolumeUom, isWalgreensUrl, isWalmartUrl, isWayfairUrl, isWeakMapToken, 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, never, 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, toNumber, toNumericArray, toPascalCase, toSnakeCase, toString, toUppercase, trim, trimEnd, trimLeft, trimRight, trimStart, truncate, tuple, twColor, unbox, uncapitalize, union, unionize, unique, uniqueKeys, uppercase, urlMeta, valuesOf, widen, withDefaults, withKeys, withoutKeys, withoutValue, wrapFn, youtubeEmbed, youtubeMeta };
|