inferred-types 0.45.0 → 0.45.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/constants/Characters.d.ts +2 -0
- package/dist/constants/Characters.d.ts.map +1 -0
- package/dist/constants/Characters.js +5 -0
- package/dist/constants/NetworkConstants.d.ts.map +1 -1
- package/dist/constants/Phone.d.ts +8 -0
- package/dist/constants/Phone.d.ts.map +1 -0
- package/dist/constants/Phone.js +262 -0
- package/dist/constants/ProxmoxConstants.d.ts +2 -0
- package/dist/constants/ProxmoxConstants.d.ts.map +1 -0
- package/dist/constants/ProxmoxConstants.js +3 -0
- package/dist/constants/index.d.ts +3 -0
- package/dist/constants/index.d.ts.map +1 -1
- package/dist/constants/index.js +3 -0
- package/dist/constants/tsconfig.tsbuildinfo +1 -1
- package/dist/inferred-types/index.cjs +1091 -733
- package/dist/inferred-types/tsconfig.tsbuildinfo +1 -1
- package/dist/runtime/api/defineApi.d.ts +56 -0
- package/dist/runtime/api/defineApi.d.ts.map +1 -0
- package/dist/runtime/api/defineApi.js +97 -0
- package/dist/runtime/api/handleDoneFn.d.ts.map +1 -0
- package/dist/runtime/api/index.d.ts +3 -0
- package/dist/runtime/api/index.d.ts.map +1 -0
- package/dist/runtime/api/index.js +2 -0
- package/dist/runtime/boolean-logic/ifArrayPartial.d.ts +1 -1
- package/dist/runtime/boolean-logic/ifArrayPartial.d.ts.map +1 -1
- package/dist/runtime/boolean-logic/ifArrayPartial.js +1 -1
- package/dist/runtime/boolean-logic/ifLength.d.ts.map +1 -1
- package/dist/runtime/boolean-logic/ifScalar.d.ts.map +1 -1
- package/dist/runtime/boolean-logic/ifScalar.js +1 -1
- package/dist/runtime/boolean-logic/index.d.ts +0 -1
- package/dist/runtime/boolean-logic/index.d.ts.map +1 -1
- package/dist/runtime/boolean-logic/index.js +0 -1
- package/dist/runtime/dictionary/defineOptions.d.ts +26 -0
- package/dist/runtime/dictionary/defineOptions.d.ts.map +1 -0
- package/dist/runtime/dictionary/defineOptions.js +30 -0
- package/dist/runtime/dictionary/keysOf.d.ts +1 -1
- package/dist/runtime/dictionary/keysOf.d.ts.map +1 -1
- package/dist/runtime/errors/KindError.d.ts +2 -2
- package/dist/runtime/errors/KindError.d.ts.map +1 -1
- package/dist/runtime/functions/index.d.ts +1 -0
- package/dist/runtime/functions/index.d.ts.map +1 -1
- package/dist/runtime/functions/index.js +1 -0
- package/dist/runtime/functions/wrapFn.d.ts +2 -0
- package/dist/runtime/functions/wrapFn.d.ts.map +1 -0
- package/dist/runtime/functions/wrapFn.js +24 -0
- package/dist/runtime/index.d.ts +1 -1
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/index.js +1 -10
- package/dist/runtime/lists/find.d.ts +1 -1
- package/dist/runtime/lists/find.d.ts.map +1 -1
- package/dist/runtime/lists/intersection.d.ts.map +1 -1
- package/dist/runtime/lists/intersection.js +2 -1
- package/dist/runtime/literals/asPhoneNumber.d.ts +10 -0
- package/dist/runtime/literals/asPhoneNumber.d.ts.map +1 -0
- package/dist/runtime/literals/asPhoneNumber.js +62 -0
- package/dist/runtime/literals/index.d.ts +4 -0
- package/dist/runtime/literals/index.d.ts.map +1 -1
- package/dist/runtime/literals/index.js +4 -0
- package/dist/runtime/literals/retainAfter.d.ts +1 -1
- package/dist/runtime/literals/retainAfter.js +1 -1
- package/dist/runtime/literals/retainChars.d.ts +16 -0
- package/dist/runtime/literals/retainChars.d.ts.map +1 -0
- package/dist/runtime/literals/retainChars.js +17 -0
- package/dist/runtime/literals/retainWhile.d.ts +10 -0
- package/dist/runtime/literals/retainWhile.d.ts.map +1 -0
- package/dist/runtime/literals/retainWhile.js +13 -0
- package/dist/runtime/literals/stripChars.d.ts +10 -0
- package/dist/runtime/literals/stripChars.d.ts.map +1 -0
- package/dist/runtime/literals/stripChars.js +11 -0
- package/dist/runtime/literals/stripLeading.d.ts +3 -3
- package/dist/runtime/literals/stripLeading.d.ts.map +1 -1
- package/dist/runtime/literals/stripLeading.js +5 -5
- package/dist/runtime/literals/stripUntil.d.ts +9 -0
- package/dist/runtime/literals/stripUntil.d.ts.map +1 -0
- package/dist/runtime/literals/stripUntil.js +12 -0
- package/dist/runtime/literals/unset.d.ts +8 -0
- package/dist/runtime/literals/unset.d.ts.map +1 -0
- package/dist/runtime/literals/unset.js +14 -0
- package/dist/runtime/meta/youtube-meta.d.ts +8 -1
- package/dist/runtime/meta/youtube-meta.d.ts.map +1 -1
- package/dist/runtime/meta/youtube-meta.js +50 -2
- package/dist/runtime/runtime-types/dict.d.ts +2 -2
- package/dist/runtime/runtime-types/dict.d.ts.map +1 -1
- package/dist/runtime/runtime-types/ip6Prefix.d.ts +1 -1
- package/dist/runtime/runtime-types/parse.d.ts +1 -1
- package/dist/runtime/runtime-types/shape-helpers/getTokenData.d.ts +1 -1
- package/dist/runtime/runtime-types/shape-helpers/getTokenName.d.ts +1 -1
- package/dist/runtime/runtime-types/shape.d.ts +1 -1
- package/dist/runtime/runtime-types/shape.js +1 -1
- package/dist/runtime/tsconfig.tsbuildinfo +1 -1
- package/dist/runtime/type-guards/api-tg.d.ts +33 -0
- package/dist/runtime/type-guards/api-tg.d.ts.map +1 -0
- package/dist/runtime/type-guards/api-tg.js +38 -0
- package/dist/runtime/type-guards/hasWhitespace.d.ts +7 -0
- package/dist/runtime/type-guards/hasWhitespace.d.ts.map +1 -0
- package/dist/runtime/type-guards/hasWhitespace.js +11 -0
- package/dist/runtime/type-guards/index.d.ts +7 -0
- package/dist/runtime/type-guards/index.d.ts.map +1 -1
- package/dist/runtime/type-guards/index.js +7 -0
- package/dist/runtime/type-guards/isConstant.d.ts +6 -0
- package/dist/runtime/type-guards/isConstant.d.ts.map +1 -1
- package/dist/runtime/type-guards/isConstant.js +12 -2
- package/dist/runtime/type-guards/isEmail.d.ts +7 -0
- package/dist/runtime/type-guards/isEmail.d.ts.map +1 -0
- package/dist/runtime/type-guards/isEmail.js +11 -0
- package/dist/runtime/type-guards/isPhoneNumber.d.ts +14 -0
- package/dist/runtime/type-guards/isPhoneNumber.d.ts.map +1 -0
- package/dist/runtime/type-guards/isPhoneNumber.js +26 -0
- package/dist/runtime/type-guards/isSpecificConstant.js +2 -3
- package/dist/runtime/type-guards/isTrimmable.d.ts +7 -0
- package/dist/runtime/type-guards/isTrimmable.d.ts.map +1 -0
- package/dist/runtime/type-guards/isTrimmable.js +9 -0
- package/dist/runtime/type-guards/isUnset.d.ts +18 -0
- package/dist/runtime/type-guards/isUnset.d.ts.map +1 -0
- package/dist/runtime/type-guards/isUnset.js +23 -0
- package/dist/runtime/type-guards/isUrl.d.ts +1 -1
- package/dist/runtime/type-guards/network-tg.d.ts +9 -3
- package/dist/runtime/type-guards/network-tg.d.ts.map +1 -1
- package/dist/runtime/type-guards/network-tg.js +10 -1
- package/dist/runtime/type-guards/repos.d.ts +2 -2
- package/dist/runtime/type-guards/youtube.d.ts +4 -2
- package/dist/runtime/type-guards/youtube.d.ts.map +1 -1
- package/dist/runtime/type-guards/youtube.js +13 -3
- package/dist/types/api/api.d.ts +96 -37
- package/dist/types/api/api.d.ts.map +1 -1
- package/dist/types/base-types/fns/EscapeFunction.d.ts +22 -0
- package/dist/types/base-types/fns/EscapeFunction.d.ts.map +1 -0
- package/dist/types/base-types/fns/OptionalParamFn.d.ts +30 -0
- package/dist/types/base-types/fns/OptionalParamFn.d.ts.map +1 -0
- package/dist/types/base-types/fns/index.d.ts +2 -0
- package/dist/types/base-types/fns/index.d.ts.map +1 -1
- package/dist/types/base-types/fns/index.js +2 -0
- package/dist/types/boolean-logic/branching/If.d.ts +2 -3
- package/dist/types/boolean-logic/branching/If.d.ts.map +1 -1
- package/dist/types/boolean-logic/branching/IfUnset.d.ts +12 -0
- package/dist/types/boolean-logic/branching/IfUnset.d.ts.map +1 -0
- package/dist/types/boolean-logic/branching/OnPass.d.ts +4 -3
- package/dist/types/boolean-logic/branching/OnPass.d.ts.map +1 -1
- package/dist/types/boolean-logic/branching/WhenNever.d.ts +11 -0
- package/dist/types/boolean-logic/branching/WhenNever.d.ts.map +1 -0
- package/dist/types/boolean-logic/branching/WhenNever.js +1 -0
- package/dist/types/boolean-logic/branching/index.d.ts +2 -0
- package/dist/types/boolean-logic/branching/index.d.ts.map +1 -1
- package/dist/types/boolean-logic/branching/index.js +2 -0
- package/dist/types/boolean-logic/combinators/Compare.d.ts +3 -3
- package/dist/types/boolean-logic/combinators/Compare.d.ts.map +1 -1
- package/dist/types/boolean-logic/combinators/Some.d.ts +8 -0
- package/dist/types/boolean-logic/combinators/Some.d.ts.map +1 -0
- package/dist/types/boolean-logic/combinators/Some.js +1 -0
- package/dist/types/boolean-logic/combinators/index.d.ts +1 -0
- package/dist/types/boolean-logic/combinators/index.d.ts.map +1 -1
- package/dist/types/boolean-logic/combinators/index.js +1 -0
- package/dist/types/boolean-logic/narrowing/AsDoneFn.d.ts +2 -2
- package/dist/types/boolean-logic/narrowing/AsDoneFn.d.ts.map +1 -1
- package/dist/types/boolean-logic/operators/ApiOperators.d.ts +11 -0
- package/dist/types/boolean-logic/operators/ApiOperators.d.ts.map +1 -0
- package/dist/types/boolean-logic/operators/ApiOperators.js +1 -0
- package/dist/types/boolean-logic/operators/HasSameValues.d.ts +4 -3
- package/dist/types/boolean-logic/operators/HasSameValues.d.ts.map +1 -1
- package/dist/types/boolean-logic/operators/IsGreaterThan.d.ts +2 -2
- package/dist/types/boolean-logic/operators/IsGreaterThan.d.ts.map +1 -1
- package/dist/types/boolean-logic/operators/IsUnset.d.ts +9 -0
- package/dist/types/boolean-logic/operators/IsUnset.d.ts.map +1 -0
- package/dist/types/boolean-logic/operators/IsUnset.js +1 -0
- package/dist/types/boolean-logic/operators/PhoneOperators.d.ts +33 -0
- package/dist/types/boolean-logic/operators/PhoneOperators.d.ts.map +1 -0
- package/dist/types/boolean-logic/operators/PhoneOperators.js +1 -0
- package/dist/types/boolean-logic/operators/index.d.ts +3 -0
- package/dist/types/boolean-logic/operators/index.d.ts.map +1 -1
- package/dist/types/boolean-logic/operators/index.js +3 -0
- package/dist/types/dictionary/Keys.d.ts +58 -4
- package/dist/types/dictionary/Keys.d.ts.map +1 -1
- package/dist/types/dictionary/KvFn.d.ts +2 -2
- package/dist/types/dictionary/KvFn.d.ts.map +1 -1
- package/dist/types/dictionary/MakeKeysOptional.d.ts +12 -3
- package/dist/types/dictionary/MakeKeysOptional.d.ts.map +1 -1
- package/dist/types/dictionary/MakeKeysRequired.d.ts +14 -0
- package/dist/types/dictionary/MakeKeysRequired.d.ts.map +1 -0
- package/dist/types/dictionary/MakeKeysRequired.js +1 -0
- package/dist/types/dictionary/OptionalKeys.d.ts +19 -4
- package/dist/types/dictionary/OptionalKeys.d.ts.map +1 -1
- package/dist/types/dictionary/OptionalKeys.js +1 -0
- package/dist/types/dictionary/RequiredKeys.d.ts +14 -6
- package/dist/types/dictionary/RequiredKeys.d.ts.map +1 -1
- package/dist/types/dictionary/Values.d.ts +2 -2
- package/dist/types/dictionary/Values.d.ts.map +1 -1
- package/dist/types/dictionary/index.d.ts +1 -2
- package/dist/types/dictionary/index.d.ts.map +1 -1
- package/dist/types/dictionary/index.js +1 -2
- package/dist/types/errors/KindError.d.ts +1 -1
- package/dist/types/errors/KindError.d.ts.map +1 -1
- package/dist/types/functions/FnFrom.d.ts +5 -0
- package/dist/types/functions/FnFrom.d.ts.map +1 -1
- package/dist/types/functions/{Fn.d.ts → FnWithDescription.d.ts} +2 -2
- package/dist/types/functions/FnWithDescription.d.ts.map +1 -0
- package/dist/types/functions/FnWithDescription.js +1 -0
- package/dist/types/functions/WrapperFn.d.ts +23 -0
- package/dist/types/functions/WrapperFn.d.ts.map +1 -0
- package/dist/types/functions/WrapperFn.js +1 -0
- package/dist/types/functions/index.d.ts +2 -1
- package/dist/types/functions/index.d.ts.map +1 -1
- package/dist/types/functions/index.js +2 -1
- package/dist/types/lists/ConvertSet.d.ts +2 -2
- package/dist/types/lists/ConvertSet.d.ts.map +1 -1
- package/dist/types/lists/Find.d.ts +7 -18
- package/dist/types/lists/Find.d.ts.map +1 -1
- package/dist/types/literals/DoneFnTuple.d.ts +3 -3
- package/dist/types/literals/DoneFnTuple.d.ts.map +1 -1
- package/dist/types/literals/Unset.d.ts +13 -0
- package/dist/types/literals/Unset.d.ts.map +1 -0
- package/dist/types/literals/Unset.js +1 -0
- package/dist/types/literals/index.d.ts +1 -0
- package/dist/types/literals/index.d.ts.map +1 -1
- package/dist/types/literals/index.js +1 -0
- package/dist/types/numeric-literals/NumberLike.d.ts +1 -1
- package/dist/types/numeric-literals/NumberLike.d.ts.map +1 -1
- package/dist/types/string-literals/Proxmox.d.ts +7 -0
- package/dist/types/string-literals/Proxmox.d.ts.map +1 -0
- package/dist/types/string-literals/Proxmox.js +1 -0
- package/dist/types/string-literals/StripLeading.d.ts +2 -2
- package/dist/types/string-literals/StripLeading.d.ts.map +1 -1
- package/dist/types/string-literals/StripUntil.d.ts +12 -0
- package/dist/types/string-literals/StripUntil.d.ts.map +1 -1
- package/dist/types/string-literals/character-sets/Whitespace.d.ts +3 -1
- package/dist/types/string-literals/character-sets/Whitespace.d.ts.map +1 -1
- package/dist/types/string-literals/character-sets/index.d.ts +1 -0
- package/dist/types/string-literals/character-sets/index.d.ts.map +1 -1
- package/dist/types/string-literals/character-sets/index.js +1 -0
- package/dist/types/string-literals/character-sets/phone.d.ts +192 -0
- package/dist/types/string-literals/character-sets/phone.d.ts.map +1 -0
- package/dist/types/string-literals/character-sets/phone.js +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/dist/types/type-conversion/ReduceValues.d.ts +19 -0
- package/dist/types/type-conversion/ReduceValues.d.ts.map +1 -0
- package/dist/types/type-conversion/ReduceValues.js +1 -0
- package/dist/types/type-conversion/ReturnValues.d.ts +10 -6
- package/dist/types/type-conversion/ReturnValues.d.ts.map +1 -1
- package/dist/types/type-conversion/Trim.d.ts +3 -1
- package/dist/types/type-conversion/Trim.d.ts.map +1 -1
- package/dist/types/type-conversion/UnionFilter.d.ts +2 -2
- package/dist/types/type-conversion/UnionFilter.d.ts.map +1 -1
- package/dist/types/type-conversion/form-fields.d.ts +5 -1
- package/dist/types/type-conversion/form-fields.d.ts.map +1 -1
- package/dist/types/type-conversion/index.d.ts +1 -0
- package/dist/types/type-conversion/index.d.ts.map +1 -1
- package/dist/types/type-conversion/index.js +1 -0
- package/package.json +17 -11
- package/dist/runtime/boolean-logic/handleDoneFn.d.ts.map +0 -1
- package/dist/types/dictionary/PrivateKeys.d.ts +0 -17
- package/dist/types/dictionary/PrivateKeys.d.ts.map +0 -1
- package/dist/types/dictionary/PublicKeys.d.ts +0 -10
- package/dist/types/dictionary/PublicKeys.d.ts.map +0 -1
- package/dist/types/functions/Fn.d.ts.map +0 -1
- /package/dist/runtime/{boolean-logic → api}/handleDoneFn.d.ts +0 -0
- /package/dist/runtime/{boolean-logic → api}/handleDoneFn.js +0 -0
- /package/dist/types/{dictionary/PrivateKeys.js → base-types/fns/EscapeFunction.js} +0 -0
- /package/dist/types/{dictionary/PublicKeys.js → base-types/fns/OptionalParamFn.js} +0 -0
- /package/dist/types/{functions/Fn.js → boolean-logic/branching/IfUnset.js} +0 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { asChars } from "../type-conversion/index.js";
|
|
2
|
+
/**
|
|
3
|
+
* **retainWhile**`(content, ...retain)`
|
|
4
|
+
*
|
|
5
|
+
* Retains the characters at the start of the string
|
|
6
|
+
* so long as they are part of the character values
|
|
7
|
+
* passed in for `retain[]`
|
|
8
|
+
*/
|
|
9
|
+
export const retainWhile = (content, ...retain) => {
|
|
10
|
+
const stopIdx = asChars(content)
|
|
11
|
+
.findIndex(c => !retain.includes(c));
|
|
12
|
+
return content.slice(0, stopIdx);
|
|
13
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { StripChars, TupleToUnion } from "../../types/type-conversion";
|
|
2
|
+
/**
|
|
3
|
+
* **stripChars**`(content, ...strip)`
|
|
4
|
+
*
|
|
5
|
+
* Strips out characters found in `content`.
|
|
6
|
+
*
|
|
7
|
+
* **Related:** `retainChars()`
|
|
8
|
+
*/
|
|
9
|
+
export declare const stripChars: <TContent extends string, TRetain extends readonly string[]>(content: TContent, ...strip: TRetain) => StripChars<TContent, TupleToUnion<TRetain>>;
|
|
10
|
+
//# sourceMappingURL=stripChars.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stripChars.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/stripChars.ts"],"names":[],"mappings":"AAAA,OAAO,EAAG,UAAU,EAAE,YAAY,EAAE,oCAAkC;AAGtE;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,wEAIZ,QAAQ,YACP,OAAO,KAChB,WAAW,QAAQ,EAAE,aAAa,OAAO,CAAC,CAE5C,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { asChars } from "../type-conversion/asChars.js";
|
|
2
|
+
/**
|
|
3
|
+
* **stripChars**`(content, ...strip)`
|
|
4
|
+
*
|
|
5
|
+
* Strips out characters found in `content`.
|
|
6
|
+
*
|
|
7
|
+
* **Related:** `retainChars()`
|
|
8
|
+
*/
|
|
9
|
+
export const stripChars = (content, ...strip) => {
|
|
10
|
+
return asChars(content).filter(c => !strip.includes(c)).join("");
|
|
11
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { StripLeading } from "../../types/index";
|
|
1
|
+
import { StripLeading, TupleToUnion } from "../../types/index";
|
|
2
2
|
/**
|
|
3
|
-
* **stripLeading**(content, strip)
|
|
3
|
+
* **stripLeading**(content, ...strip)
|
|
4
4
|
*
|
|
5
5
|
* Runtime utility which strips of a leading substring from the
|
|
6
6
|
* primary content if it exists and leaves content unchanged otherwise.
|
|
7
7
|
*/
|
|
8
|
-
export declare function stripLeading<T extends string, U extends string>(content: T, strip: U): StripLeading<T, U
|
|
8
|
+
export declare function stripLeading<T extends string, U extends string[]>(content: T, ...strip: U): StripLeading<T, TupleToUnion<U>>;
|
|
9
9
|
//# sourceMappingURL=stripLeading.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stripLeading.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/stripLeading.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,0BAAwB;
|
|
1
|
+
{"version":3,"file":"stripLeading.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/stripLeading.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,0BAAwB;AAE7D;;;;;GAKG;AACH,wBAAgB,YAAY,CAC1B,CAAC,SAAS,MAAM,EAChB,CAAC,SAAS,MAAM,EAAE,EAElB,OAAO,EAAE,CAAC,EACV,GAAG,KAAK,EAAE,CAAC,GACV,YAAY,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,CASlC"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* **stripLeading**(content, strip)
|
|
2
|
+
* **stripLeading**(content, ...strip)
|
|
3
3
|
*
|
|
4
4
|
* Runtime utility which strips of a leading substring from the
|
|
5
5
|
* primary content if it exists and leaves content unchanged otherwise.
|
|
6
6
|
*/
|
|
7
|
-
export function stripLeading(content, strip) {
|
|
8
|
-
const
|
|
9
|
-
return (
|
|
7
|
+
export function stripLeading(content, ...strip) {
|
|
8
|
+
const stripper = strip.find(i => content.startsWith(i));
|
|
9
|
+
return (stripper
|
|
10
10
|
? // starts with
|
|
11
|
-
content.
|
|
11
|
+
content.slice(stripper.length)
|
|
12
12
|
: // does not
|
|
13
13
|
content);
|
|
14
14
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TupleToUnion, StripUntil } from "../../types/index";
|
|
2
|
+
/**
|
|
3
|
+
* **stripUntil**`(content, ...until)`
|
|
4
|
+
*
|
|
5
|
+
* Strips the characters at the start of the string
|
|
6
|
+
* until a character specified in `until` is found.
|
|
7
|
+
*/
|
|
8
|
+
export declare const stripUntil: <TContent extends string, TUntil extends readonly string[]>(content: TContent, ...until: TUntil) => StripUntil<TContent, TupleToUnion<TUntil>>;
|
|
9
|
+
//# sourceMappingURL=stripUntil.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stripUntil.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/stripUntil.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAC,UAAU,EAAE,0BAAwB;AAE1D;;;;;GAKG;AACH,eAAO,MAAM,UAAU,uEAGZ,QAAQ,YAAY,MAAM,+CAKpC,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { asChars } from "../type-conversion/index.js";
|
|
2
|
+
/**
|
|
3
|
+
* **stripUntil**`(content, ...until)`
|
|
4
|
+
*
|
|
5
|
+
* Strips the characters at the start of the string
|
|
6
|
+
* until a character specified in `until` is found.
|
|
7
|
+
*/
|
|
8
|
+
export const stripUntil = (content, ...until) => {
|
|
9
|
+
const stopIdx = asChars(content)
|
|
10
|
+
.findIndex(c => until.includes(c));
|
|
11
|
+
return content.slice(stopIdx);
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unset.d.ts","sourceRoot":"","sources":["../../../src/runtime/literals/unset.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,KAAK,mBAA6B,CAAC;AAEhD;;;;;GAKG"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// import { Unset, ShapeCallback } from "src/types/index";
|
|
2
|
+
// import { ShapeApiImplementation, handleEscapeApi, isFunction } from "src/runtime/index";
|
|
3
|
+
export const unset = "NOT IMPLEMENTED";
|
|
4
|
+
/**
|
|
5
|
+
* **unset**`([type])`
|
|
6
|
+
*
|
|
7
|
+
* Allows you to easily create the `Unset` type while providing a tokenized runtime
|
|
8
|
+
* value for the `type` property.
|
|
9
|
+
*/
|
|
10
|
+
// export const unset = <T extends ShapeCallback | Unset = Unset>(type?: T) => {
|
|
11
|
+
// if(isFunction(type)) {
|
|
12
|
+
// const _userResponse = handleEscapeApi(ShapeApiImplementation);
|
|
13
|
+
// }
|
|
14
|
+
// }
|
|
@@ -21,11 +21,18 @@ export type YouTubeMeta<T extends string> = {
|
|
|
21
21
|
isShareUrl: T extends YouTubeShareUrl ? true : false;
|
|
22
22
|
pageType: As<GetYouTubePageType<T>, YouTubePageType>;
|
|
23
23
|
};
|
|
24
|
+
/**
|
|
25
|
+
* **getYouTubePageType**`(url)`
|
|
26
|
+
*
|
|
27
|
+
* Returns a `YouTubePageType` description based on the url passed in (assuming
|
|
28
|
+
* that URL is for YouTube). Returns _never_ if not a YouTube URL.
|
|
29
|
+
*/
|
|
30
|
+
export declare const getYouTubePageType: <T extends string>(url: T) => GetYouTubePageType<T>;
|
|
24
31
|
/**
|
|
25
32
|
* **youtube**`(url)`
|
|
26
33
|
*
|
|
27
34
|
* Takes a YouTube URL and converts it to a meta-data object
|
|
28
35
|
* that helps describe the intent of the URL.
|
|
29
36
|
*/
|
|
30
|
-
export declare const
|
|
37
|
+
export declare const youtubeMeta: <T extends string>(url: T) => YouTubeMeta<T>;
|
|
31
38
|
//# sourceMappingURL=youtube-meta.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"youtube-meta.d.ts","sourceRoot":"","sources":["../../../src/runtime/meta/youtube-meta.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,EAAE,EACF,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,UAAU,EACX,0BAAwB;
|
|
1
|
+
{"version":3,"file":"youtube-meta.d.ts","sourceRoot":"","sources":["../../../src/runtime/meta/youtube-meta.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,EAAE,EACF,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,UAAU,EACX,0BAAwB;AAezB;;;;GAIG;AACH,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,MAAM,IAAI;IAC1C;;OAEG;IACH,GAAG,EAAE,CAAC,CAAC;IACP;;;OAGG;IACH,YAAY,EAAE,CAAC,SAAS,UAAU,GAAG,IAAI,GAAG,KAAK,CAAC;IAElD;;;SAGK;IACL,UAAU,EAAE,CAAC,SAAS,eAAe,GAAG,IAAI,GAAG,KAAK,CAAC;IAErD,QAAQ,EAAE,EAAE,CACV,kBAAkB,CAAC,CAAC,CAAC,EACrB,eAAe,CAChB,CAAA;CACF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,0BAA2B,CAAC,0BAyC1D,CAAA;AAGD;;;;;GAKG;AACH,eAAO,MAAM,WAAW,0BAA2B,CAAC,KAAG,YAAY,CAAC,CAcnE,CAAA"}
|
|
@@ -1,16 +1,64 @@
|
|
|
1
|
-
import { isYouTubeShareUrl, isYouTubeUrl } from "../index.js";
|
|
1
|
+
import { getUrlPath, hasUrlQueryParameter, isYouTubeCreatorUrl, isYouTubeFeedUrl, isYouTubeShareUrl, isYouTubeUrl, isYouTubeVideoUrl, isYouTubeVideosInPlaylist, last } from "../index.js";
|
|
2
|
+
import { Never } from "../../constants/Never.js";
|
|
3
|
+
/**
|
|
4
|
+
* **getYouTubePageType**`(url)`
|
|
5
|
+
*
|
|
6
|
+
* Returns a `YouTubePageType` description based on the url passed in (assuming
|
|
7
|
+
* that URL is for YouTube). Returns _never_ if not a YouTube URL.
|
|
8
|
+
*/
|
|
9
|
+
export const getYouTubePageType = (url) => {
|
|
10
|
+
return (isYouTubeUrl(url)
|
|
11
|
+
? isYouTubeVideoUrl(url) && (hasUrlQueryParameter(url, "v") || isYouTubeShareUrl(url))
|
|
12
|
+
? hasUrlQueryParameter(url, "list")
|
|
13
|
+
? isYouTubeShareUrl(url)
|
|
14
|
+
? hasUrlQueryParameter(url, "t")
|
|
15
|
+
? `play::video::in-list::share-link::with-timestamp`
|
|
16
|
+
: `play::video::in-list::share-link`
|
|
17
|
+
: `play::video::in-list`
|
|
18
|
+
: isYouTubeShareUrl(url)
|
|
19
|
+
? hasUrlQueryParameter(url, "t")
|
|
20
|
+
? `play::video::solo::share-link::with-timestamp`
|
|
21
|
+
: `play::video::solo::share-link`
|
|
22
|
+
: `play::video::solo`
|
|
23
|
+
: isYouTubeCreatorUrl(url)
|
|
24
|
+
? getUrlPath(url).includes("/videos")
|
|
25
|
+
? "creator::videos"
|
|
26
|
+
: getUrlPath(url).includes("/playlists")
|
|
27
|
+
? "creator::playlists"
|
|
28
|
+
: last(getUrlPath(url).split("/")).startsWith("@") ||
|
|
29
|
+
getUrlPath(url).includes("/featured")
|
|
30
|
+
? "creator::featured"
|
|
31
|
+
: "creator::other"
|
|
32
|
+
: isYouTubeFeedUrl(url)
|
|
33
|
+
? isYouTubeFeedUrl(url, "history")
|
|
34
|
+
? "feed::history"
|
|
35
|
+
: isYouTubeFeedUrl(url, "playlists")
|
|
36
|
+
? "feed::playlists"
|
|
37
|
+
: isYouTubeFeedUrl(url, "liked")
|
|
38
|
+
? "feed::liked"
|
|
39
|
+
: isYouTubeFeedUrl(url, "subscriptions")
|
|
40
|
+
? "feed::subscriptions"
|
|
41
|
+
: isYouTubeFeedUrl(url, "trending")
|
|
42
|
+
? "feed::trending"
|
|
43
|
+
: "feed::other"
|
|
44
|
+
: isYouTubeVideosInPlaylist(url)
|
|
45
|
+
? "playlist::show"
|
|
46
|
+
: "other"
|
|
47
|
+
: Never);
|
|
48
|
+
};
|
|
2
49
|
/**
|
|
3
50
|
* **youtube**`(url)`
|
|
4
51
|
*
|
|
5
52
|
* Takes a YouTube URL and converts it to a meta-data object
|
|
6
53
|
* that helps describe the intent of the URL.
|
|
7
54
|
*/
|
|
8
|
-
export const
|
|
55
|
+
export const youtubeMeta = (url) => {
|
|
9
56
|
return (isYouTubeUrl(url)
|
|
10
57
|
? {
|
|
11
58
|
url,
|
|
12
59
|
isYouTubeUrl: true,
|
|
13
60
|
isShareUrl: isYouTubeShareUrl(url),
|
|
61
|
+
pageType: getYouTubePageType(url),
|
|
14
62
|
}
|
|
15
63
|
: {
|
|
16
64
|
url,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AsString, CreateDictShape, Dict, NarrowDictProps, Narrowable, OptDictProps, Values } from "../../types/index";
|
|
1
|
+
import { AsString, CreateDictShape, Dict, Keys, NarrowDictProps, Narrowable, OptDictProps, Values } from "../../types/index";
|
|
2
2
|
/**
|
|
3
3
|
* **dict**`(obj, ...props)`
|
|
4
4
|
*
|
|
@@ -6,5 +6,5 @@ import { AsString, CreateDictShape, Dict, NarrowDictProps, Narrowable, OptDictPr
|
|
|
6
6
|
* object but plays nicer with `let` declarations by not allowing
|
|
7
7
|
* re-declarations.
|
|
8
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, (TObj extends readonly unknown[] ? import("../../types/index").IsTuple<TObj> extends true ? import("../../types/index").NumericKeys<TObj> extends readonly number[] ? import("../../types/index").NumericKeys<TObj> : never : number[] : TObj extends object ? [import("../../types/index").IsObjectLiteral<import("../../types/index").RemoveIndexKeys<TObj>>] extends [true] ? (import("../../types/index").IsVueRef<import("../../types/index").RemoveIndexKeys<TObj>> extends true ? ["value"] : import("../../types/index").UnionToTuple<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>, import("../../types/index").LastInUnion<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>>> extends [symbol] ? import("../../types/index").ObjectKey[] : import("../../types/index").UnionToTuple<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>, import("../../types/index").LastInUnion<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>>> extends [] ? import("../../types/index").UnionToTuple<keyof import("../../types/index").RemoveIndexKeys<TObj>, import("../../types/index").LastInUnion<keyof import("../../types/index").RemoveIndexKeys<TObj>>> extends [import("../../types/index").ObjectKey] ? (keyof import("../../types/index").RemoveIndexKeys<TObj>)[] : import("../../types/index").ObjectKey[] : import("../../types/index").UnionToTuple<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>, import("../../types/index").LastInUnion<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>>>) extends readonly (keyof TObj)[] ? readonly (keyof TObj)[] & (import("../../types/index").IsVueRef<import("../../types/index").RemoveIndexKeys<TObj>> extends true ? ["value"] : import("../../types/index").UnionToTuple<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>, import("../../types/index").LastInUnion<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>>> extends [symbol] ? import("../../types/index").ObjectKey[] : import("../../types/index").UnionToTuple<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>, import("../../types/index").LastInUnion<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>>> extends [] ? import("../../types/index").UnionToTuple<keyof import("../../types/index").RemoveIndexKeys<TObj>, import("../../types/index").LastInUnion<keyof import("../../types/index").RemoveIndexKeys<TObj>>> extends [import("../../types/index").ObjectKey] ? (keyof import("../../types/index").RemoveIndexKeys<TObj>)[] : import("../../types/index").ObjectKey[] : import("../../types/index").UnionToTuple<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>, import("../../types/index").LastInUnion<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>>>) : import("../../types/index").IsVueRef<import("../../types/index").RemoveIndexKeys<TObj>> extends true ? ["value"] : import("../../types/index").UnionToTuple<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>, import("../../types/index").LastInUnion<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>>> extends [symbol] ? import("../../types/index").ObjectKey[] : import("../../types/index").UnionToTuple<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>, import("../../types/index").LastInUnion<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>>> extends [] ? import("../../types/index").UnionToTuple<keyof import("../../types/index").RemoveIndexKeys<TObj>, import("../../types/index").LastInUnion<keyof import("../../types/index").RemoveIndexKeys<TObj>>> extends [import("../../types/index").ObjectKey] ? (keyof import("../../types/index").RemoveIndexKeys<TObj>)[] : import("../../types/index").ObjectKey[] : import("../../types/index").UnionToTuple<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>, import("../../types/index").LastInUnion<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>>> : import("../../types/index").ObjectKey[] : never[]) extends readonly (string & keyof TObj)[] ? readonly (string & keyof TObj)[] & (TObj extends readonly unknown[] ? import("../../types/index").IsTuple<TObj> extends true ? import("../../types/index").NumericKeys<TObj> extends readonly number[] ? import("../../types/index").NumericKeys<TObj> : never : number[] : TObj extends object ? [import("../../types/index").IsObjectLiteral<import("../../types/index").RemoveIndexKeys<TObj>>] extends [true] ? (import("../../types/index").IsVueRef<import("../../types/index").RemoveIndexKeys<TObj>> extends true ? ["value"] : import("../../types/index").UnionToTuple<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>, import("../../types/index").LastInUnion<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>>> extends [symbol] ? import("../../types/index").ObjectKey[] : import("../../types/index").UnionToTuple<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>, import("../../types/index").LastInUnion<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>>> extends [] ? import("../../types/index").UnionToTuple<keyof import("../../types/index").RemoveIndexKeys<TObj>, import("../../types/index").LastInUnion<keyof import("../../types/index").RemoveIndexKeys<TObj>>> extends [import("../../types/index").ObjectKey] ? (keyof import("../../types/index").RemoveIndexKeys<TObj>)[] : import("../../types/index").ObjectKey[] : import("../../types/index").UnionToTuple<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>, import("../../types/index").LastInUnion<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>>>) extends readonly (keyof TObj)[] ? readonly (keyof TObj)[] & (import("../../types/index").IsVueRef<import("../../types/index").RemoveIndexKeys<TObj>> extends true ? ["value"] : import("../../types/index").UnionToTuple<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>, import("../../types/index").LastInUnion<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>>> extends [symbol] ? import("../../types/index").ObjectKey[] : import("../../types/index").UnionToTuple<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>, import("../../types/index").LastInUnion<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>>> extends [] ? import("../../types/index").UnionToTuple<keyof import("../../types/index").RemoveIndexKeys<TObj>, import("../../types/index").LastInUnion<keyof import("../../types/index").RemoveIndexKeys<TObj>>> extends [import("../../types/index").ObjectKey] ? (keyof import("../../types/index").RemoveIndexKeys<TObj>)[] : import("../../types/index").ObjectKey[] : import("../../types/index").UnionToTuple<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>, import("../../types/index").LastInUnion<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>>>) : import("../../types/index").IsVueRef<import("../../types/index").RemoveIndexKeys<TObj>> extends true ? ["value"] : import("../../types/index").UnionToTuple<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>, import("../../types/index").LastInUnion<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>>> extends [symbol] ? import("../../types/index").ObjectKey[] : import("../../types/index").UnionToTuple<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>, import("../../types/index").LastInUnion<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>>> extends [] ? import("../../types/index").UnionToTuple<keyof import("../../types/index").RemoveIndexKeys<TObj>, import("../../types/index").LastInUnion<keyof import("../../types/index").RemoveIndexKeys<TObj>>> extends [import("../../types/index").ObjectKey] ? (keyof import("../../types/index").RemoveIndexKeys<TObj>)[] : import("../../types/index").ObjectKey[] : import("../../types/index").UnionToTuple<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>, import("../../types/index").LastInUnion<keyof import("../../types/index").RemoveIndexKeys<import("../../types/index").RemoveIndexKeys<TObj>>>> : import("../../types/index").ObjectKey[] : never[]) : 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_2 ? T_2 extends NarrowDictProps<TProps> ? T_2 extends readonly string[] ? T_2 : [] : never : never)["length"]}${(OptDictProps<TProps> extends infer T_3 ? T_3 extends OptDictProps<TProps> ? T_3 extends readonly string[] ? T_3 : [] : never : never)["length"]}`>;
|
|
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
10
|
//# sourceMappingURL=dict.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,3 +1,3 @@
|
|
|
1
1
|
import { AsIp6Prefix } from "../../types/string-literals";
|
|
2
|
-
export declare const ip6Prefix: <T extends readonly (`9${string}` | `0${string}` | `1${string}` | `2${string}` | `3${string}` | `4${string}` | `5${string}` | `6${string}` | `7${string}` | `8${string}` | `
|
|
2
|
+
export declare const ip6Prefix: <T extends readonly (`9${string}` | `0${string}` | `1${string}` | `2${string}` | `3${string}` | `4${string}` | `5${string}` | `6${string}` | `7${string}` | `8${string}` | `A${string}` | `B${string}` | `C${string}` | `D${string}` | `E${string}` | `F${string}` | `a${string}` | `b${string}` | `c${string}` | `d${string}` | `e${string}` | `f${string}`)[]>(...groups: T) => AsIp6Prefix<T>;
|
|
3
3
|
//# sourceMappingURL=ip6Prefix.d.ts.map
|
|
@@ -15,7 +15,7 @@ export type ParsedToken<TType> = {
|
|
|
15
15
|
export declare const parse: <T>(value: T) => {
|
|
16
16
|
isToken: boolean;
|
|
17
17
|
type: T;
|
|
18
|
-
token: (T & `<<string${string}>>`) | (T & `<<number${string}>>`) | (T & `<<boolean${string}>>`) | (T & `<<undefined${string}>>`) | (T & `<<
|
|
18
|
+
token: (T & `<<string${string}>>`) | (T & `<<number${string}>>`) | (T & `<<boolean${string}>>`) | (T & `<<undefined${string}>>`) | (T & `<<false${string}>>`) | (T & `<<map${string}>>`) | (T & `<<set${string}>>`) | (T & `<<true${string}>>`) | (T & `<<null${string}>>`) | (T & `<<fn${string}>>`) | (T & `<<tuple${string}>>`) | (T & `<<rec${string}>>`) | (T & `<<arr${string}>>`) | (T & `<<union${string}>>`) | (T & `<<obj${string}>>`) | (T & `<<gen${string}>>`) | (T & `<<string-set${string}>>`) | (T & `<<numeric-set${string}>>`) | (T & `<<union-set${string}>>`);
|
|
19
19
|
tokenName: string;
|
|
20
20
|
tokenData: string[];
|
|
21
21
|
} | {
|
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
* Given a `Shape` token, this function will extract the
|
|
5
5
|
* data parameters from the token.
|
|
6
6
|
*/
|
|
7
|
-
export declare const getTokenData: <T extends `<<string${string}>>` | `<<number${string}>>` | `<<boolean${string}>>` | `<<undefined${string}>>` | `<<
|
|
7
|
+
export declare const getTokenData: <T extends `<<string${string}>>` | `<<number${string}>>` | `<<boolean${string}>>` | `<<undefined${string}>>` | `<<false${string}>>` | `<<map${string}>>` | `<<set${string}>>` | `<<true${string}>>` | `<<null${string}>>` | `<<fn${string}>>` | `<<tuple${string}>>` | `<<rec${string}>>` | `<<arr${string}>>` | `<<union${string}>>` | `<<obj${string}>>` | `<<gen${string}>>` | `<<string-set${string}>>` | `<<numeric-set${string}>>` | `<<union-set${string}>>`>(token: T) => string[];
|
|
8
8
|
//# sourceMappingURL=getTokenData.d.ts.map
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Given a `Shape` token, this function will extract the
|
|
5
5
|
*/
|
|
6
|
-
export declare const getTokenName: <T extends `<<string${string}>>` | `<<number${string}>>` | `<<boolean${string}>>` | `<<undefined${string}>>` | `<<
|
|
6
|
+
export declare const getTokenName: <T extends `<<string${string}>>` | `<<number${string}>>` | `<<boolean${string}>>` | `<<undefined${string}>>` | `<<false${string}>>` | `<<map${string}>>` | `<<set${string}>>` | `<<true${string}>>` | `<<null${string}>>` | `<<fn${string}>>` | `<<tuple${string}>>` | `<<rec${string}>>` | `<<arr${string}>>` | `<<union${string}>>` | `<<obj${string}>>` | `<<gen${string}>>` | `<<string-set${string}>>` | `<<numeric-set${string}>>` | `<<union-set${string}>>`>(token: T) => string;
|
|
7
7
|
//# sourceMappingURL=getTokenName.d.ts.map
|
|
@@ -14,5 +14,5 @@ export declare const shape: <T extends ShapeCallback>(cb: T) => HandleDoneFn<Ret
|
|
|
14
14
|
*
|
|
15
15
|
* Type guard which tests whether a value is a _type_ defined by a `Shape`.
|
|
16
16
|
*/
|
|
17
|
-
export declare const isShape: (v: unknown) => v is `<<string${string}>>` | `<<number${string}>>` | `<<boolean${string}>>` | `<<undefined${string}>>` | `<<
|
|
17
|
+
export declare const isShape: (v: unknown) => v is `<<string${string}>>` | `<<number${string}>>` | `<<boolean${string}>>` | `<<undefined${string}>>` | `<<false${string}>>` | `<<map${string}>>` | `<<set${string}>>` | `<<true${string}>>` | `<<null${string}>>` | `<<fn${string}>>` | `<<tuple${string}>>` | `<<rec${string}>>` | `<<arr${string}>>` | `<<union${string}>>` | `<<obj${string}>>` | `<<gen${string}>>` | `<<string-set${string}>>` | `<<numeric-set${string}>>` | `<<union-set${string}>>`;
|
|
18
18
|
//# sourceMappingURL=shape.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SHAPE_PREFIXES } from "../../constants/Shape.js";
|
|
2
|
-
import { isString, hasKeys, isObject, handleDoneFn } from "../index.js";
|
|
2
|
+
import { isString, hasKeys, isObject, handleDoneFn, } from "../index.js";
|
|
3
3
|
import { boolean, nullType, undefinedType, unknown } from "./shape-helpers/atomics.js";
|
|
4
4
|
import { number, string } from "./shape-helpers/singletons.js";
|
|
5
5
|
import { fn } from "./shape-helpers/functions.js";
|