@openclaw/whatsapp 2026.8.1-beta.3 → 2026.8.2
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/{accounts-BX2fZUyR.js → accounts-CeKQbu_s.js} +9 -26
- package/dist/{action-runtime-pM-ExU0l.js → action-runtime-Bw0loEdy.js} +2 -2
- package/dist/action-runtime-api.js +1 -1
- package/dist/action-runtime.runtime.js +1 -1
- package/dist/{call-tool-api.js → agent-tools-api.js} +13 -6
- package/dist/{agent-tools-login-BjRpD-JQ.js → agent-tools-login-B-2qZPzc.js} +12 -3
- package/dist/api.js +10 -10
- package/dist/{approval-handler.runtime-CkMMvUjk.js → approval-handler.runtime-DeyPb57-.js} +3 -3
- package/dist/{approval-reactions-Jyr1JaAK.js → approval-reactions-DGDA6hQ7.js} +7 -5
- package/dist/{auth-store-CtpBqH5S.js → auth-store-DTj1H9pv.js} +5 -3
- package/dist/{channel-DRMYRfZ8.js → channel-DxMmDjqK.js} +26 -24
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel-react-action-CstrR0CT.js → channel-react-action-BUp7Wbfr.js} +3 -3
- package/dist/{channel.runtime-X3JC2gaq.js → channel.runtime-BwSnyXRX.js} +4 -4
- package/dist/{channel.setup-DhBBhbQv.js → channel.setup-aOFLSQyw.js} +1 -1
- package/dist/{config-schema-BQP5YCeK.js → config-schema-BYA6e_Ii.js} +6 -4
- package/dist/{connection-controller-CIYuBJrs.js → connection-controller-BvkxsbWi.js} +2 -2
- package/dist/{constants-HU41RHGI.js → constants-C7m81BNe.js} +1 -1
- package/dist/{directory-config-P7_3U73Z.js → directory-config-LgxYJLWY.js} +3 -3
- package/dist/directory-contract-api.js +1 -1
- package/dist/{group-session-key-DmFc_Cqi.js → group-session-key-KUguLmSZ.js} +4 -4
- package/dist/index.js +4 -4
- package/dist/light-runtime-api.js +2 -2
- package/dist/{login-BkpKpndm.js → login-Bk_jiXKD.js} +6 -5
- package/dist/{login-qr-1dpv6jjT.js → login-qr-B3m61NqA.js} +43 -20
- package/dist/login-qr-runtime.js +1 -1
- package/dist/{monitor-IzwQKizW.js → monitor-CTsyo-HE.js} +185 -162
- package/dist/{question-reactions-D3eAeB0i.js → question-reactions-B9D6MHXZ.js} +1 -1
- package/dist/runtime-api.js +9 -9
- package/dist/{send-CwvTU4RI.js → send-DiPjiygK.js} +54 -29
- package/dist/{send-api-obOSm2cC.js → send-api-kFcuhSiY.js} +43 -41
- package/dist/{setup-finalize-n4K2I2gJ.js → setup-finalize-CqH5wTK5.js} +7 -6
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{setup-surface-Cwn3zyxK.js → setup-surface-Dm3T6S8t.js} +3 -3
- package/dist/{shared-wg42NKFB.js → shared-DDjonGys.js} +7 -6
- package/dist/{socket-close-2T0_jZTN.js → socket-close-CpkkJZCU.js} +9 -6
- package/dist/{targets-runtime-TMk0lGuy.js → targets-runtime-RBjx3pg_.js} +1 -2
- package/dist/{text-runtime-CaKLhowd.js → text-runtime-DyfmcATV.js} +1 -1
- package/node_modules/baileys/lib/Defaults/index.js +1 -1
- package/node_modules/baileys/lib/Socket/business.d.ts.map +1 -1
- package/node_modules/baileys/lib/Socket/chats.d.ts +1 -0
- package/node_modules/baileys/lib/Socket/chats.d.ts.map +1 -1
- package/node_modules/baileys/lib/Socket/chats.js +10 -5
- package/node_modules/baileys/lib/Socket/chats.js.map +1 -1
- package/node_modules/baileys/lib/Socket/communities.d.ts.map +1 -1
- package/node_modules/baileys/lib/Socket/groups.d.ts.map +1 -1
- package/node_modules/baileys/lib/Socket/index.d.ts.map +1 -1
- package/node_modules/baileys/lib/Socket/messages-recv.d.ts.map +1 -1
- package/node_modules/baileys/lib/Socket/messages-send.d.ts.map +1 -1
- package/node_modules/baileys/lib/Socket/newsletter.d.ts.map +1 -1
- package/node_modules/baileys/lib/Socket/socket.d.ts.map +1 -1
- package/node_modules/baileys/lib/Socket/socket.js +3 -0
- package/node_modules/baileys/lib/Socket/socket.js.map +1 -1
- package/node_modules/baileys/lib/Types/index.d.ts +1 -0
- package/node_modules/baileys/lib/Types/index.d.ts.map +1 -1
- package/node_modules/baileys/lib/Types/index.js.map +1 -1
- package/node_modules/baileys/lib/Utils/browser-utils.d.ts.map +1 -1
- package/node_modules/baileys/lib/Utils/browser-utils.js +1 -0
- package/node_modules/baileys/lib/Utils/browser-utils.js.map +1 -1
- package/node_modules/baileys/lib/Utils/generics.d.ts +1 -0
- package/node_modules/baileys/lib/Utils/generics.d.ts.map +1 -1
- package/node_modules/baileys/lib/Utils/generics.js +1 -1
- package/node_modules/baileys/lib/Utils/generics.js.map +1 -1
- package/node_modules/baileys/lib/Utils/tc-token-utils.d.ts.map +1 -1
- package/node_modules/baileys/lib/Utils/tc-token-utils.js +3 -2
- package/node_modules/baileys/lib/Utils/tc-token-utils.js.map +1 -1
- package/node_modules/baileys/lib/Utils/validate-connection.d.ts.map +1 -1
- package/node_modules/baileys/lib/Utils/validate-connection.js +9 -2
- package/node_modules/baileys/lib/Utils/validate-connection.js.map +1 -1
- package/node_modules/baileys/node_modules/content-type/README.md +2 -0
- package/node_modules/baileys/node_modules/content-type/dist/index.d.ts +20 -0
- package/node_modules/baileys/node_modules/content-type/dist/index.js +20 -14
- package/node_modules/baileys/node_modules/content-type/dist/index.js.map +1 -1
- package/node_modules/baileys/node_modules/content-type/package.json +1 -1
- package/node_modules/baileys/node_modules/file-type/package.json +1 -1
- package/node_modules/baileys/node_modules/file-type/readme.md +3 -0
- package/node_modules/baileys/node_modules/file-type/source/detectors/zip.js +6 -1
- package/node_modules/baileys/node_modules/file-type/source/index.d.ts +3 -0
- package/node_modules/baileys/node_modules/file-type/source/index.js +25 -13
- package/node_modules/baileys/node_modules/music-metadata/LICENSE.txt +9 -9
- package/node_modules/baileys/node_modules/music-metadata/README.md +878 -878
- package/node_modules/baileys/node_modules/music-metadata/lib/ParseError.d.ts +1 -1
- package/node_modules/baileys/node_modules/music-metadata/lib/ParseError.js +1 -1
- package/node_modules/baileys/node_modules/music-metadata/lib/asf/AsfObject.d.ts +1 -4
- package/node_modules/baileys/node_modules/music-metadata/lib/asf/AsfObject.js +66 -30
- package/node_modules/baileys/node_modules/music-metadata/lib/asf/AsfParser.d.ts +5 -1
- package/node_modules/baileys/node_modules/music-metadata/lib/asf/AsfParser.js +94 -25
- package/node_modules/baileys/node_modules/music-metadata/lib/dsf/DsfChunk.js +2 -2
- package/node_modules/baileys/node_modules/music-metadata/lib/dsf/DsfParser.js +38 -13
- package/node_modules/baileys/node_modules/music-metadata/lib/mp4/AtomToken.js +2 -1
- package/node_modules/baileys/node_modules/music-metadata/lib/mp4/MP4Parser.js +34 -7
- package/node_modules/baileys/node_modules/music-metadata/lib/ogg/speex/SpeexStream.d.ts +7 -0
- package/node_modules/baileys/node_modules/music-metadata/lib/ogg/speex/SpeexStream.js +13 -0
- package/node_modules/baileys/node_modules/music-metadata/lib/riff/RiffChunk.js +1 -1
- package/node_modules/baileys/node_modules/music-metadata/package.json +156 -156
- package/node_modules/baileys/node_modules/process-warning/.github/dependabot.yml +42 -2
- package/node_modules/baileys/node_modules/process-warning/.github/workflows/ci.yml +12 -1
- package/node_modules/baileys/node_modules/process-warning/.github/workflows/lock-threads.yml +19 -0
- package/node_modules/baileys/node_modules/process-warning/LICENSE +1 -1
- package/node_modules/baileys/node_modules/process-warning/README.md +41 -2
- package/node_modules/baileys/node_modules/process-warning/index.js +85 -17
- package/node_modules/baileys/node_modules/process-warning/package.json +6 -7
- package/node_modules/baileys/node_modules/process-warning/test/emit-once-only.test.js +3 -3
- package/node_modules/baileys/node_modules/process-warning/test/emit-reset.test.js +4 -4
- package/node_modules/baileys/node_modules/process-warning/test/emit-unlimited.test.js +2 -2
- package/node_modules/baileys/node_modules/process-warning/test/spy-warning.test.js +143 -0
- package/node_modules/baileys/node_modules/process-warning/types/index.d.ts +15 -1
- package/node_modules/baileys/node_modules/process-warning/types/index.tst.ts +48 -0
- package/node_modules/baileys/node_modules/protobufjs/README.md +61 -84
- package/node_modules/baileys/node_modules/protobufjs/dist/light/protobuf.js +66 -45
- package/node_modules/baileys/node_modules/protobufjs/dist/light/protobuf.js.map +1 -1
- package/node_modules/baileys/node_modules/protobufjs/dist/light/protobuf.min.js +3 -3
- package/node_modules/baileys/node_modules/protobufjs/dist/light/protobuf.min.js.map +1 -1
- package/node_modules/baileys/node_modules/protobufjs/dist/minimal/protobuf.js +47 -40
- package/node_modules/baileys/node_modules/protobufjs/dist/minimal/protobuf.js.map +1 -1
- package/node_modules/baileys/node_modules/protobufjs/dist/minimal/protobuf.min.js +3 -3
- package/node_modules/baileys/node_modules/protobufjs/dist/minimal/protobuf.min.js.map +1 -1
- package/node_modules/baileys/node_modules/protobufjs/dist/protobuf.js +92 -68
- package/node_modules/baileys/node_modules/protobufjs/dist/protobuf.js.map +1 -1
- package/node_modules/baileys/node_modules/protobufjs/dist/protobuf.min.js +3 -3
- package/node_modules/baileys/node_modules/protobufjs/dist/protobuf.min.js.map +1 -1
- package/node_modules/baileys/node_modules/protobufjs/ext/descriptor.js +26 -10
- package/node_modules/baileys/node_modules/protobufjs/index.d.ts +3 -0
- package/node_modules/baileys/node_modules/protobufjs/package.json +1 -1
- package/node_modules/baileys/node_modules/protobufjs/src/converter.js +5 -1
- package/node_modules/baileys/node_modules/protobufjs/src/enum.js +5 -2
- package/node_modules/baileys/node_modules/protobufjs/src/field.js +6 -1
- package/node_modules/baileys/node_modules/protobufjs/src/parse.js +26 -23
- package/node_modules/baileys/node_modules/protobufjs/src/reader.js +36 -9
- package/node_modules/baileys/node_modules/protobufjs/src/util/codegen.js +3 -1
- package/node_modules/baileys/node_modules/protobufjs/src/util/utf8.js +2 -28
- package/node_modules/baileys/node_modules/protobufjs/src/writer.js +7 -1
- package/node_modules/baileys/node_modules/ws/lib/permessage-deflate.js +3 -1
- package/node_modules/baileys/node_modules/ws/package.json +1 -1
- package/node_modules/baileys/package.json +1 -1
- package/node_modules/typebox/build/format/date.d.mts +1 -1
- package/node_modules/typebox/build/format/date.mjs +1 -1
- package/node_modules/typebox/build/format/date_time.d.mts +2 -2
- package/node_modules/typebox/build/format/date_time.mjs +3 -3
- package/node_modules/typebox/build/format/email.d.mts +1 -1
- package/node_modules/typebox/build/format/email.mjs +2 -2
- package/node_modules/typebox/build/format/hostname.mjs +2 -10
- package/node_modules/typebox/build/format/idn_email.d.mts +1 -1
- package/node_modules/typebox/build/format/idn_email.mjs +3 -3
- package/node_modules/typebox/build/format/idn_hostname.d.mts +1 -0
- package/node_modules/typebox/build/format/idn_hostname.mjs +3 -11
- package/node_modules/typebox/build/format/idna/format/bidi.d.mts +3 -0
- package/node_modules/typebox/build/format/idna/format/bidi.mjs +98 -0
- package/node_modules/typebox/build/format/idna/format/puny.d.mts +3 -0
- package/node_modules/typebox/build/format/idna/format/puny.mjs +144 -0
- package/node_modules/typebox/build/format/idna/hostname.d.mts +1 -0
- package/node_modules/typebox/build/format/idna/hostname.mjs +16 -0
- package/node_modules/typebox/build/format/idna/idn-hostname.d.mts +1 -0
- package/node_modules/typebox/build/format/idna/idn-hostname.mjs +41 -0
- package/node_modules/typebox/build/format/idna/index.d.mts +2 -0
- package/node_modules/typebox/build/format/idna/index.mjs +2 -0
- package/node_modules/typebox/build/format/idna/label/ascii.d.mts +1 -0
- package/node_modules/typebox/build/format/idna/label/ascii.mjs +9 -0
- package/node_modules/typebox/build/format/idna/label/puny.d.mts +1 -0
- package/node_modules/typebox/build/format/idna/label/puny.mjs +28 -0
- package/node_modules/typebox/build/format/idna/label/unicode.d.mts +1 -0
- package/node_modules/typebox/build/format/idna/label/unicode.mjs +106 -0
- package/node_modules/typebox/build/format/idna/pattern/pattern.d.mts +30 -0
- package/node_modules/typebox/build/format/idna/pattern/pattern.mjs +70 -0
- package/node_modules/typebox/build/format/ipv4.d.mts +0 -1
- package/node_modules/typebox/build/format/ipv4.mjs +2 -32
- package/node_modules/typebox/build/format/ipv6.mjs +2 -61
- package/node_modules/typebox/build/format/iri.d.mts +2 -2
- package/node_modules/typebox/build/format/iri.mjs +26 -8
- package/node_modules/typebox/build/format/iri_reference.d.mts +2 -2
- package/node_modules/typebox/build/format/iri_reference.mjs +9 -55
- package/node_modules/typebox/build/format/regex.d.mts +1 -2
- package/node_modules/typebox/build/format/regex.mjs +2 -6
- package/node_modules/typebox/build/format/time.d.mts +2 -2
- package/node_modules/typebox/build/format/time.mjs +19 -14
- package/node_modules/typebox/build/format/uri.d.mts +1 -1
- package/node_modules/typebox/build/format/uri.mjs +3 -130
- package/node_modules/typebox/build/format/uri_reference.d.mts +1 -1
- package/node_modules/typebox/build/format/uri_reference.mjs +2 -3
- package/node_modules/typebox/build/format/uri_template.d.mts +2 -3
- package/node_modules/typebox/build/format/uri_template.mjs +4 -5
- package/node_modules/typebox/build/format/url.d.mts +3 -3
- package/node_modules/typebox/build/format/url.mjs +4 -5
- package/node_modules/typebox/build/guard/emit.d.mts +3 -1
- package/node_modules/typebox/build/guard/emit.mjs +12 -5
- package/node_modules/typebox/build/guard/guard.d.mts +8 -2
- package/node_modules/typebox/build/guard/guard.mjs +25 -4
- package/node_modules/typebox/build/guard/string.d.mts +2 -2
- package/node_modules/typebox/build/guard/string.mjs +7 -7
- package/node_modules/typebox/build/schema/engine/_context.mjs +3 -3
- package/node_modules/typebox/build/schema/engine/_functions.mjs +1 -2
- package/node_modules/typebox/build/schema/engine/_regexp.d.mts +2 -0
- package/node_modules/typebox/build/schema/engine/_regexp.mjs +4 -0
- package/node_modules/typebox/build/schema/engine/_stack.mjs +12 -13
- package/node_modules/typebox/build/schema/engine/additionalItems.mjs +17 -7
- package/node_modules/typebox/build/schema/engine/additionalProperties.mjs +4 -3
- package/node_modules/typebox/build/schema/engine/contains.mjs +18 -6
- package/node_modules/typebox/build/schema/engine/enum.mjs +1 -1
- package/node_modules/typebox/build/schema/engine/items.mjs +26 -6
- package/node_modules/typebox/build/schema/engine/maxContains.mjs +3 -3
- package/node_modules/typebox/build/schema/engine/minContains.mjs +14 -4
- package/node_modules/typebox/build/schema/engine/not.mjs +4 -2
- package/node_modules/typebox/build/schema/engine/oneOf.mjs +7 -6
- package/node_modules/typebox/build/schema/engine/pattern.mjs +3 -2
- package/node_modules/typebox/build/schema/engine/patternProperties.mjs +4 -3
- package/node_modules/typebox/build/schema/engine/ref.mjs +1 -7
- package/node_modules/typebox/build/schema/engine/schema.mjs +13 -4
- package/node_modules/typebox/build/schema/engine/type.mjs +1 -1
- package/node_modules/typebox/build/schema/resolve/resolve.d.mts +4 -1
- package/node_modules/typebox/build/schema/resolve/resolve.mjs +202 -1
- package/node_modules/typebox/build/schema/static/propertyNames.d.mts +5 -0
- package/node_modules/typebox/build/schema/static/propertyNames.mjs +3 -0
- package/node_modules/typebox/build/schema/static/schema.d.mts +3 -0
- package/node_modules/typebox/build/schema/types/index.d.mts +0 -2
- package/node_modules/typebox/build/schema/types/index.mjs +0 -2
- package/node_modules/typebox/build/system/memory/clone.mjs +14 -11
- package/node_modules/typebox/build/system/memory/discard.mjs +6 -5
- package/node_modules/typebox/build/system/settings/settings.d.mts +9 -0
- package/node_modules/typebox/build/system/settings/settings.mjs +2 -0
- package/node_modules/typebox/build/type/engine/call/distribute_arguments.d.mts +6 -1
- package/node_modules/typebox/build/type/engine/call/distribute_arguments.mjs +16 -3
- package/node_modules/typebox/build/type/engine/call/instantiate.mjs +34 -4
- package/node_modules/typebox/build/type/engine/evaluate/broaden.d.mts +5 -5
- package/node_modules/typebox/build/type/engine/evaluate/broaden.mjs +20 -26
- package/node_modules/typebox/build/type/engine/evaluate/compare.d.mts +6 -10
- package/node_modules/typebox/build/type/engine/evaluate/compare.mjs +9 -13
- package/node_modules/typebox/build/type/engine/evaluate/composite.d.mts +7 -4
- package/node_modules/typebox/build/type/engine/evaluate/composite.mjs +12 -19
- package/node_modules/typebox/build/type/engine/evaluate/distribute.d.mts +4 -20
- package/node_modules/typebox/build/type/engine/evaluate/distribute.mjs +8 -20
- package/node_modules/typebox/build/type/engine/evaluate/evaluate.d.mts +4 -4
- package/node_modules/typebox/build/type/engine/evaluate/evaluate.mjs +11 -8
- package/node_modules/typebox/build/type/engine/evaluate/flatten.d.mts +1 -1
- package/node_modules/typebox/build/type/engine/evaluate/flatten.mjs +3 -4
- package/node_modules/typebox/build/type/engine/evaluate/narrow.d.mts +17 -2
- package/node_modules/typebox/build/type/engine/evaluate/narrow.mjs +26 -6
- package/node_modules/typebox/build/type/engine/exclude/operation.mjs +3 -4
- package/node_modules/typebox/build/type/engine/extract/operation.d.mts +1 -1
- package/node_modules/typebox/build/type/engine/extract/operation.mjs +3 -4
- package/node_modules/typebox/build/type/engine/priority/priority.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/priority/priority.mjs +3 -4
- package/node_modules/typebox/build/type/script/mapping.d.mts +32 -29
- package/node_modules/typebox/build/type/script/mapping.mjs +18 -25
- package/node_modules/typebox/build/type/script/parser.d.mts +19 -25
- package/node_modules/typebox/build/type/script/parser.mjs +27 -23
- package/node_modules/typebox/build/value/errors/errors.d.mts +2 -2
- package/node_modules/typebox/build/value/errors/errors.mjs +1 -1
- package/node_modules/typebox/package.json +27 -27
- package/node_modules/typebox/readme.md +79 -82
- package/openclaw.plugin.json +2 -1
- package/package.json +6 -6
- package/node_modules/baileys/node_modules/process-warning/types/index.test-d.ts +0 -36
- package/node_modules/typebox/build/format/_idna.d.mts +0 -2
- package/node_modules/typebox/build/format/_idna.mjs +0 -246
- package/node_modules/typebox/build/format/_puny.d.mts +0 -1
- package/node_modules/typebox/build/format/_puny.mjs +0 -77
- package/node_modules/typebox/build/schema/resolve/ref.d.mts +0 -3
- package/node_modules/typebox/build/schema/resolve/ref.mjs +0 -146
- package/node_modules/typebox/build/schema/types/contentEncoding.d.mts +0 -9
- package/node_modules/typebox/build/schema/types/contentEncoding.mjs +0 -13
- package/node_modules/typebox/build/schema/types/contentMediaType.d.mts +0 -9
- package/node_modules/typebox/build/schema/types/contentMediaType.mjs +0 -13
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { type TUnreachable } from '../../../system/unreachable/index.mjs';
|
|
2
1
|
import { type TReadonly } from '../../types/_readonly.mjs';
|
|
3
2
|
import { type TOptional } from '../../types/_optional.mjs';
|
|
4
3
|
import { type TSchema } from '../../types/schema.mjs';
|
|
@@ -12,6 +11,10 @@ import { type TRemoveReadonly } from '../../action/_remove_readonly.mjs';
|
|
|
12
11
|
import { type TRemoveOptional } from '../../action/_remove_optional.mjs';
|
|
13
12
|
import { type TTupleElementsToProperties } from '../tuple/to_object.mjs';
|
|
14
13
|
import { type TEvaluateIntersect } from './evaluate.mjs';
|
|
14
|
+
/** Returns true if the type is a valid operand to Composite. */
|
|
15
|
+
export type TCanComposite<Type extends TSchema> = (Type extends TObject<infer _ extends TProperties> ? true : Type extends TTuple<infer _ extends TSchema[]> ? true : false);
|
|
16
|
+
/** Returns true if the type is a valid operand to Composite. */
|
|
17
|
+
export declare function CanComposite<Type extends TSchema>(type: Type): TCanComposite<Type>;
|
|
15
18
|
type TIsReadonlyProperty<Left extends TSchema, Right extends TSchema> = (Left extends TReadonly<Left> ? Right extends TReadonly<Right> ? true : false : false);
|
|
16
19
|
type TIsOptionalProperty<Left extends TSchema, Right extends TSchema> = (Left extends TOptional<Left> ? Right extends TOptional<Right> ? true : false : false);
|
|
17
20
|
type TCompositeProperty<Left extends TSchema, Right extends TSchema, IsReadonly extends boolean = TIsReadonlyProperty<Left, Right>, IsOptional extends boolean = TIsOptionalProperty<Left, Right>, Evaluated extends TSchema = TEvaluateIntersect<[Left, Right]>, Property extends TSchema = TRemoveReadonly<TRemoveOptional<Evaluated>>> = ([
|
|
@@ -25,10 +28,10 @@ type TCompositeProperty<Left extends TSchema, Right extends TSchema, IsReadonly
|
|
|
25
28
|
IsOptional
|
|
26
29
|
] extends [false, true] ? TAddOptional<Property> : Property);
|
|
27
30
|
type TCompositePropertyKey<Left extends TProperties, Right extends TProperties, Key extends PropertyKey, Result extends TSchema = (Key extends keyof Left ? Key extends keyof Right ? TCompositeProperty<Left[Key], Right[Key]> : Left[Key] : Key extends keyof Right ? Right[Key] : TNever)> = Result;
|
|
28
|
-
type TCompositeProperties<Left extends TProperties, Right extends TProperties, Result extends TProperties = {
|
|
29
|
-
[Key in
|
|
31
|
+
type TCompositeProperties<Left extends TProperties, Right extends TProperties, Keys extends PropertyKey = keyof (Left & Right), Result extends TProperties = {
|
|
32
|
+
[Key in Keys]: TCompositePropertyKey<Left, Right, Key>;
|
|
30
33
|
}> = Result;
|
|
31
|
-
type TGetProperties<Type extends TSchema, Result extends TProperties = (Type extends TObject<infer Properties extends TProperties> ? Properties : Type extends TTuple<infer Types extends TSchema[]> ? TTupleElementsToProperties<Types> :
|
|
34
|
+
type TGetProperties<Type extends TSchema, Result extends TProperties = (Type extends TObject<infer Properties extends TProperties> ? Properties : Type extends TTuple<infer Types extends TSchema[]> ? TTupleElementsToProperties<Types> : {})> = Result;
|
|
32
35
|
export type TComposite<Left extends TSchema, Right extends TSchema, LeftProperties extends TProperties = TGetProperties<Left>, RightProperties extends TProperties = TGetProperties<Right>, Properties extends TProperties = TCompositeProperties<LeftProperties, RightProperties>, Result extends TSchema = TObject<Properties>> = Result;
|
|
33
36
|
export declare function Composite<Left extends TSchema, Right extends TSchema>(left: Left, right: Right): TComposite<Left, Right>;
|
|
34
37
|
export {};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
// deno-fmt-ignore-file
|
|
2
2
|
// deno-lint-ignore-file
|
|
3
|
-
import { Unreachable } from '../../../system/unreachable/index.mjs';
|
|
4
3
|
import { Guard } from '../../../guard/index.mjs';
|
|
5
4
|
import { IsReadonly } from '../../types/_readonly.mjs';
|
|
6
5
|
import { IsOptional } from '../../types/_optional.mjs';
|
|
@@ -13,6 +12,10 @@ import { RemoveReadonly } from '../../action/_remove_readonly.mjs';
|
|
|
13
12
|
import { RemoveOptional } from '../../action/_remove_optional.mjs';
|
|
14
13
|
import { TupleElementsToProperties } from '../tuple/to_object.mjs';
|
|
15
14
|
import { EvaluateIntersect } from './evaluate.mjs';
|
|
15
|
+
/** Returns true if the type is a valid operand to Composite. */
|
|
16
|
+
export function CanComposite(type) {
|
|
17
|
+
return (IsObject(type) || IsTuple(type));
|
|
18
|
+
}
|
|
16
19
|
function IsReadonlyProperty(left, right) {
|
|
17
20
|
return (IsReadonly(left) ? IsReadonly(right) ? true : false : false);
|
|
18
21
|
}
|
|
@@ -32,36 +35,26 @@ function CompositeProperty(left, right) {
|
|
|
32
35
|
}
|
|
33
36
|
function CompositePropertyKey(left, right, key) {
|
|
34
37
|
return (key in left
|
|
35
|
-
? key in right
|
|
36
|
-
|
|
37
|
-
: left[key]
|
|
38
|
-
: key in right
|
|
39
|
-
? right[key]
|
|
40
|
-
: Never());
|
|
38
|
+
? key in right ? CompositeProperty(left[key], right[key]) : left[key]
|
|
39
|
+
: key in right ? right[key] : Never());
|
|
41
40
|
}
|
|
42
41
|
function CompositeProperties(left, right) {
|
|
43
|
-
const keys = new Set([...Guard.Keys(
|
|
44
|
-
|
|
42
|
+
const keys = new Set([...Guard.Keys(left), ...Guard.Keys(right)]);
|
|
43
|
+
const result = [...keys].reduce((result, key) => {
|
|
45
44
|
return { ...result, [key]: CompositePropertyKey(left, right, key) };
|
|
46
45
|
}, {});
|
|
46
|
+
return result;
|
|
47
47
|
}
|
|
48
|
-
// ------------------------------------------------------------------
|
|
49
|
-
// deno-coverage-ignore-start - symmetric unreachable | internal
|
|
50
|
-
//
|
|
51
|
-
// Composite is called by Distribute which provisions the type as
|
|
52
|
-
// either TObject ot TTuple. Fall-through unreachable.
|
|
53
|
-
//
|
|
54
|
-
// ------------------------------------------------------------------
|
|
55
48
|
function GetProperties(type) {
|
|
56
49
|
const result = (IsObject(type) ? type.properties :
|
|
57
50
|
IsTuple(type) ? TupleElementsToProperties(type.items) :
|
|
58
|
-
|
|
59
|
-
);
|
|
51
|
+
{});
|
|
60
52
|
return result;
|
|
61
53
|
}
|
|
62
54
|
export function Composite(left, right) {
|
|
63
55
|
const leftProperties = GetProperties(left);
|
|
64
56
|
const rightProperties = GetProperties(right);
|
|
65
57
|
const properties = CompositeProperties(leftProperties, rightProperties);
|
|
66
|
-
|
|
58
|
+
const result = Object(properties);
|
|
59
|
+
return result;
|
|
67
60
|
}
|
|
@@ -1,27 +1,11 @@
|
|
|
1
1
|
import { type TSchema } from '../../types/schema.mjs';
|
|
2
|
-
import { type TProperties } from '../../types/properties.mjs';
|
|
3
2
|
import { type TUnion } from '../../types/union.mjs';
|
|
4
|
-
import { type TObject } from '../../types/object.mjs';
|
|
5
|
-
import { type TTuple } from '../../types/tuple.mjs';
|
|
6
|
-
import { type TComposite } from './composite.mjs';
|
|
7
3
|
import { type TNarrow } from './narrow.mjs';
|
|
8
|
-
import { type TEvaluateType } from './evaluate.mjs';
|
|
9
4
|
import { type TEvaluateIntersect } from './evaluate.mjs';
|
|
10
|
-
|
|
11
|
-
type
|
|
12
|
-
type TDistributeOperation<Left extends TSchema, Right extends TSchema, EvaluatedLeft extends TSchema = TEvaluateType<Left>, EvaluatedRight extends TSchema = TEvaluateType<Right>,
|
|
13
|
-
|
|
14
|
-
] extends [true] ? TEvaluateIntersect<[EvaluatedLeft, EvaluatedRight]> : [
|
|
15
|
-
IsObjectLeft,
|
|
16
|
-
IsObjectRight
|
|
17
|
-
] extends [true, true] ? TComposite<EvaluatedLeft, EvaluatedRight> : [
|
|
18
|
-
IsObjectLeft,
|
|
19
|
-
IsObjectRight
|
|
20
|
-
] extends [true, false] ? EvaluatedLeft : [
|
|
21
|
-
IsObjectLeft,
|
|
22
|
-
IsObjectRight
|
|
23
|
-
] extends [false, true] ? EvaluatedRight : TNarrow<EvaluatedLeft, EvaluatedRight>)> = Result;
|
|
24
|
-
type TDistributeType<Type extends TSchema, Distribution extends TSchema[], Result extends TSchema[] = []> = (Distribution extends [infer Left extends TSchema, ...infer Right extends TSchema[]] ? TDistributeType<Type, Right, [...Result, TDistributeOperation<Type, Left>]> : Result extends [] ? [Type] : Result);
|
|
5
|
+
import { type TEvaluateType } from './evaluate.mjs';
|
|
6
|
+
type TShouldEvaluate<Left extends TSchema, Right extends TSchema, IsUnionLeft extends boolean = Left extends TUnion ? true : false, IsUnionRight extends boolean = Right extends TUnion ? true : false, Result extends boolean = IsUnionLeft extends true ? true : IsUnionRight extends true ? true : false> = Result;
|
|
7
|
+
type TDistributeOperation<Left extends TSchema, Right extends TSchema, EvaluatedLeft extends TSchema = TEvaluateType<Left>, EvaluatedRight extends TSchema = TEvaluateType<Right>, ShouldEvaluate extends boolean = TShouldEvaluate<EvaluatedLeft, EvaluatedRight>, Result extends TSchema = [ShouldEvaluate] extends [true] ? TEvaluateIntersect<[EvaluatedLeft, EvaluatedRight]> : TNarrow<EvaluatedLeft, EvaluatedRight>> = Result;
|
|
8
|
+
type TDistributeType<Type extends TSchema, Distribution extends TSchema[], Result extends TSchema[] = []> = (Distribution extends [infer Left extends TSchema, ...infer Right extends TSchema[]] ? TDistributeType<Type, Right, [...Result, TDistributeOperation<Left, Type>]> : Result extends [] ? [Type] : Result);
|
|
25
9
|
type TDistributeUnion<Types extends TSchema[], Distribution extends TSchema[], Result extends TSchema[] = []> = (Types extends [infer Left extends TSchema, ...infer Right extends TSchema[]] ? TDistributeUnion<Right, Distribution, [...Result, ...TDistribute<[Left], Distribution>]> : Result);
|
|
26
10
|
export type TDistribute<Types extends TSchema[], Result extends TSchema[] = []> = (Types extends [infer Left extends TSchema, ...infer Right extends TSchema[]] ? Left extends TUnion<infer UnionTypes extends TSchema[]> ? TDistribute<Right, TDistributeUnion<UnionTypes, Result>> : TDistribute<Right, TDistributeType<Left, Result>> : Result);
|
|
27
11
|
export declare function Distribute<Types extends TSchema[]>(types: [...Types], result?: TSchema[]): TDistribute<Types>;
|
|
@@ -2,36 +2,24 @@
|
|
|
2
2
|
// deno-fmt-ignore-file
|
|
3
3
|
import { Guard } from '../../../guard/index.mjs';
|
|
4
4
|
import { IsUnion } from '../../types/union.mjs';
|
|
5
|
-
import { IsObject } from '../../types/object.mjs';
|
|
6
|
-
import { IsTuple } from '../../types/tuple.mjs';
|
|
7
|
-
import { Composite } from './composite.mjs';
|
|
8
5
|
import { Narrow } from './narrow.mjs';
|
|
9
|
-
import { EvaluateType } from './evaluate.mjs';
|
|
10
6
|
import { EvaluateIntersect } from './evaluate.mjs';
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
function IsUnionOperand(left, right) {
|
|
15
|
-
const isUnionLeft = IsUnion(left);
|
|
16
|
-
const isUnionRight = IsUnion(right);
|
|
17
|
-
const result = isUnionLeft || isUnionRight;
|
|
7
|
+
import { EvaluateType } from './evaluate.mjs';
|
|
8
|
+
function ShouldEvaluate(left, right) {
|
|
9
|
+
const result = IsUnion(left) || IsUnion(right);
|
|
18
10
|
return result;
|
|
19
11
|
}
|
|
20
12
|
function DistributeOperation(left, right) {
|
|
21
13
|
const evaluatedLeft = EvaluateType(left);
|
|
22
14
|
const evaluatedRight = EvaluateType(right);
|
|
23
|
-
const
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
isObjectLeft && IsObjectRight ? Composite(evaluatedLeft, evaluatedRight) :
|
|
28
|
-
isObjectLeft && !IsObjectRight ? evaluatedLeft :
|
|
29
|
-
!isObjectLeft && IsObjectRight ? evaluatedRight :
|
|
30
|
-
Narrow(evaluatedLeft, evaluatedRight));
|
|
15
|
+
const shouldEvaluate = ShouldEvaluate(evaluatedLeft, evaluatedRight);
|
|
16
|
+
const result = shouldEvaluate
|
|
17
|
+
? EvaluateIntersect([evaluatedLeft, evaluatedRight])
|
|
18
|
+
: Narrow(evaluatedLeft, evaluatedRight);
|
|
31
19
|
return result;
|
|
32
20
|
}
|
|
33
21
|
function DistributeType(type, types, result = []) {
|
|
34
|
-
return Guard.ShiftLeft(types, (left, right) => DistributeType(type, right, [...result, DistributeOperation(
|
|
22
|
+
return Guard.ShiftLeft(types, (left, right) => DistributeType(type, right, [...result, DistributeOperation(left, type)]), () => Guard.IsEqual(result.length, 0)
|
|
35
23
|
? [type]
|
|
36
24
|
: result);
|
|
37
25
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type TSchema } from '../../types/schema.mjs';
|
|
2
2
|
import { type TDependent } from '../../types/dependent.mjs';
|
|
3
3
|
import { type TEnum, type TEnumValue } from '../../types/enum.mjs';
|
|
4
|
-
import { type TLiteral } from '../../types/literal.mjs';
|
|
5
4
|
import { type TIntersect } from '../../types/intersect.mjs';
|
|
5
|
+
import { type TLiteral } from '../../types/literal.mjs';
|
|
6
6
|
import { type TNever } from '../../types/never.mjs';
|
|
7
7
|
import { type TTemplateLiteral } from '../../types/template_literal.mjs';
|
|
8
8
|
import { type TUnion } from '../../types/union.mjs';
|
|
@@ -10,11 +10,11 @@ import { type TDistribute } from './distribute.mjs';
|
|
|
10
10
|
import { type TBroaden } from './broaden.mjs';
|
|
11
11
|
import { type TExcludeOperation } from '../exclude/operation.mjs';
|
|
12
12
|
import { type TTemplateLiteralDecode } from '../template_literal/decode.mjs';
|
|
13
|
-
export type TEvaluateDependent<If extends TSchema, Then extends TSchema, Else extends TSchema,
|
|
13
|
+
export type TEvaluateDependent<If extends TSchema, Then extends TSchema, Else extends TSchema, Intersected extends TSchema = TEvaluateIntersect<[If, Then]>, Excluded extends TSchema = TExcludeOperation<Else, If>, Result extends TSchema = TEvaluateUnion<[Intersected, Excluded]>> = Result;
|
|
14
14
|
export declare function EvaluateDependent<If extends TSchema, Then extends TSchema, Else extends TSchema>(if_: If, then_: Then, else_: Else): TEvaluateDependent<If, Then, Else>;
|
|
15
15
|
export type TEvaluateEnum<Values extends TEnumValue[], Result extends TSchema[] = []> = (Values extends [infer Left extends TEnumValue, ...infer Right extends TEnumValue[]] ? TEvaluateEnum<Right, [...Result, TLiteral<Left>]> : TEvaluateUnion<Result>);
|
|
16
|
-
export declare function EvaluateEnum<Values extends TEnumValue[]>(values: [...Values]): TEvaluateEnum<Values>;
|
|
17
|
-
export type TEvaluateIntersect<Types extends TSchema[], Distribution extends TSchema[] = TDistribute<Types>, Broadend extends TSchema[] = TBroaden<Distribution>, Result extends TSchema =
|
|
16
|
+
export declare function EvaluateEnum<Values extends TEnumValue[]>(values: [...Values], result?: TSchema[]): TEvaluateEnum<Values>;
|
|
17
|
+
export type TEvaluateIntersect<Types extends TSchema[], Distribution extends TSchema[] = TDistribute<Types>, Broadend extends TSchema[] = TBroaden<Distribution>, Result extends TSchema = TEvaluateUnion<Broadend>> = Result;
|
|
18
18
|
export declare function EvaluateIntersect<Types extends TSchema[]>(types: [...Types]): TEvaluateIntersect<Types>;
|
|
19
19
|
export type TEvaluateTemplateLiteral<Pattern extends string, Evaluated extends TSchema = TTemplateLiteralDecode<Pattern>, Result extends TSchema = TEvaluateType<Evaluated>> = Result;
|
|
20
20
|
export declare function EvaluateTemplateLiteral<Pattern extends string>(pattern: Pattern): TEvaluateTemplateLiteral<Pattern>;
|
|
@@ -2,29 +2,31 @@
|
|
|
2
2
|
import { Guard } from '../../../guard/index.mjs';
|
|
3
3
|
import { IsDependent } from '../../types/dependent.mjs';
|
|
4
4
|
import { IsEnum } from '../../types/enum.mjs';
|
|
5
|
+
import { IsIntersect } from '../../types/intersect.mjs';
|
|
5
6
|
import { Literal } from '../../types/literal.mjs';
|
|
6
|
-
import { IsIntersect, Intersect } from '../../types/intersect.mjs';
|
|
7
7
|
import { Never } from '../../types/never.mjs';
|
|
8
8
|
import { IsTemplateLiteral } from '../../types/template_literal.mjs';
|
|
9
9
|
import { Union, IsUnion } from '../../types/union.mjs';
|
|
10
|
+
// ------------------------------------------------------------------
|
|
11
|
+
// Infrastructure
|
|
12
|
+
// ------------------------------------------------------------------
|
|
10
13
|
import { Distribute } from './distribute.mjs';
|
|
11
14
|
import { Broaden } from './broaden.mjs';
|
|
12
15
|
import { ExcludeOperation } from '../exclude/operation.mjs';
|
|
13
16
|
import { TemplateLiteralDecode } from '../template_literal/decode.mjs';
|
|
14
17
|
export function EvaluateDependent(if_, then_, else_) {
|
|
15
|
-
const
|
|
18
|
+
const intersected = EvaluateIntersect([if_, then_]);
|
|
16
19
|
const excluded = ExcludeOperation(else_, if_);
|
|
17
|
-
const result = EvaluateUnion([
|
|
20
|
+
const result = EvaluateUnion([intersected, excluded]);
|
|
18
21
|
return result;
|
|
19
22
|
}
|
|
20
|
-
export function EvaluateEnum(values) {
|
|
21
|
-
|
|
22
|
-
return EvaluateUnion(result);
|
|
23
|
+
export function EvaluateEnum(values, result = []) {
|
|
24
|
+
return Guard.ShiftLeft(values, (left, right) => EvaluateEnum(right, [...result, Literal(left)]), () => EvaluateUnion(result));
|
|
23
25
|
}
|
|
24
26
|
export function EvaluateIntersect(types) {
|
|
25
27
|
const distribution = Distribute(types);
|
|
26
28
|
const broadend = Broaden(distribution);
|
|
27
|
-
const result =
|
|
29
|
+
const result = EvaluateUnion(broadend);
|
|
28
30
|
return result;
|
|
29
31
|
}
|
|
30
32
|
export function EvaluateTemplateLiteral(pattern) {
|
|
@@ -38,12 +40,13 @@ export function EvaluateUnion(types) {
|
|
|
38
40
|
return result;
|
|
39
41
|
}
|
|
40
42
|
export function EvaluateType(type) {
|
|
41
|
-
|
|
43
|
+
const result = (IsDependent(type) ? EvaluateDependent(type.if, type.then, type.else) :
|
|
42
44
|
IsEnum(type) ? EvaluateEnum(type.enum) :
|
|
43
45
|
IsIntersect(type) ? EvaluateIntersect(type.allOf) :
|
|
44
46
|
IsTemplateLiteral(type) ? EvaluateTemplateLiteral(type.pattern) :
|
|
45
47
|
IsUnion(type) ? EvaluateUnion(type.anyOf) :
|
|
46
48
|
type);
|
|
49
|
+
return result;
|
|
47
50
|
}
|
|
48
51
|
export function EvaluateUnionFast(types) {
|
|
49
52
|
const result = (Guard.IsEqual(types.length, 1) ? types[0] :
|
|
@@ -2,5 +2,5 @@ import { type TSchema } from '../../types/schema.mjs';
|
|
|
2
2
|
import { type TUnion } from '../../types/union.mjs';
|
|
3
3
|
type TFlattenType<Type extends TSchema, Result extends TSchema[] = Type extends TUnion<infer Types extends TSchema[]> ? TFlatten<Types> : [Type]> = Result;
|
|
4
4
|
export type TFlatten<Types extends TSchema[], Result extends TSchema[] = []> = (Types extends [infer Left extends TSchema, ...infer Right extends TSchema[]] ? TFlatten<Right, [...Result, ...TFlattenType<Left>]> : Result);
|
|
5
|
-
export declare function Flatten<Types extends TSchema[]>(types: [...Types]): TFlatten<Types>;
|
|
5
|
+
export declare function Flatten<Types extends TSchema[]>(types: [...Types], result?: TSchema[]): TFlatten<Types>;
|
|
6
6
|
export {};
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
// deno-fmt-ignore-file
|
|
2
|
+
import { Guard } from '../../../guard/index.mjs';
|
|
2
3
|
import { IsUnion } from '../../types/union.mjs';
|
|
3
4
|
function FlattenType(type) {
|
|
4
5
|
const result = IsUnion(type) ? Flatten(type.anyOf) : [type];
|
|
5
6
|
return result;
|
|
6
7
|
}
|
|
7
|
-
export function Flatten(types) {
|
|
8
|
-
return
|
|
9
|
-
return [...result, ...FlattenType(type)];
|
|
10
|
-
}, []);
|
|
8
|
+
export function Flatten(types, result = []) {
|
|
9
|
+
return Guard.ShiftLeft(types, (left, right) => Flatten(right, [...result, ...FlattenType(left)]), () => result);
|
|
11
10
|
}
|
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
import { type TSchema } from '../../types/schema.mjs';
|
|
2
|
+
import { type TAny } from '../../types/any.mjs';
|
|
2
3
|
import { type TNever } from '../../types/never.mjs';
|
|
3
|
-
import { type
|
|
4
|
-
|
|
4
|
+
import { type TUnknown } from '../../types/unknown.mjs';
|
|
5
|
+
import { type TCompare, type TCompareResult, CompareResultLeftInside, CompareResultRightInside, CompareResultEqual } from './compare.mjs';
|
|
6
|
+
import { type TComposite, type TCanComposite } from './composite.mjs';
|
|
7
|
+
type TNarrowCompareRule<Left extends TSchema, Right extends TSchema, Result extends TCompareResult = TCompare<Left, Right>> = (Result extends typeof CompareResultLeftInside ? Left : Result extends typeof CompareResultRightInside ? Right : Result extends typeof CompareResultEqual ? Right : TNever);
|
|
8
|
+
type TNarrowCompositeRule<Left extends TSchema, Right extends TSchema, CanCompositeLeft extends boolean = TCanComposite<Left>, CanCompositeRight extends boolean = TCanComposite<Right>> = ([
|
|
9
|
+
CanCompositeLeft,
|
|
10
|
+
CanCompositeRight
|
|
11
|
+
] extends [true, true] ? TComposite<Left, Right> : [
|
|
12
|
+
CanCompositeLeft,
|
|
13
|
+
CanCompositeRight
|
|
14
|
+
] extends [true, false] ? Left : [
|
|
15
|
+
CanCompositeLeft,
|
|
16
|
+
CanCompositeRight
|
|
17
|
+
] extends [false, true] ? Right : TNarrowCompareRule<Left, Right>);
|
|
18
|
+
export type TNarrow<Left extends TSchema, Right extends TSchema> = (Left extends TNever ? TNever : Left extends TAny ? TAny : Left extends TUnknown ? Right : Right extends TNever ? TNever : Right extends TAny ? TAny : Right extends TUnknown ? Left : TNarrowCompositeRule<Left, Right>);
|
|
5
19
|
export declare function Narrow<Left extends TSchema, Right extends TSchema>(left: Left, right: Right): TNarrow<Left, Right>;
|
|
20
|
+
export {};
|
|
@@ -1,11 +1,31 @@
|
|
|
1
1
|
// deno-fmt-ignore-file
|
|
2
2
|
import { Guard } from '../../../guard/index.mjs';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
3
|
+
import { IsAny } from '../../types/any.mjs';
|
|
4
|
+
import { Never, IsNever } from '../../types/never.mjs';
|
|
5
|
+
import { IsUnknown } from '../../types/unknown.mjs';
|
|
6
|
+
import { Compare, CompareResultLeftInside, CompareResultRightInside, CompareResultEqual } from './compare.mjs';
|
|
7
|
+
import { Composite, CanComposite } from './composite.mjs';
|
|
8
|
+
function NarrowCompareRule(left, right) {
|
|
6
9
|
const result = Compare(left, right);
|
|
7
|
-
return (Guard.IsEqual(result,
|
|
8
|
-
Guard.IsEqual(result,
|
|
9
|
-
Guard.IsEqual(result,
|
|
10
|
+
return (Guard.IsEqual(result, CompareResultLeftInside) ? left :
|
|
11
|
+
Guard.IsEqual(result, CompareResultRightInside) ? right :
|
|
12
|
+
Guard.IsEqual(result, CompareResultEqual) ? right :
|
|
10
13
|
Never());
|
|
11
14
|
}
|
|
15
|
+
function NarrowCompositeRule(left, right) {
|
|
16
|
+
const canCompositeLeft = CanComposite(left);
|
|
17
|
+
const canCompositeRight = CanComposite(right);
|
|
18
|
+
return (canCompositeLeft && canCompositeRight ? Composite(left, right) :
|
|
19
|
+
canCompositeLeft && !canCompositeRight ? left :
|
|
20
|
+
!canCompositeLeft && canCompositeRight ? right :
|
|
21
|
+
NarrowCompareRule(left, right));
|
|
22
|
+
}
|
|
23
|
+
export function Narrow(left, right) {
|
|
24
|
+
return (IsNever(left) ? left :
|
|
25
|
+
IsAny(left) ? left :
|
|
26
|
+
IsUnknown(left) ? right :
|
|
27
|
+
IsNever(right) ? right :
|
|
28
|
+
IsAny(right) ? right :
|
|
29
|
+
IsUnknown(right) ? left :
|
|
30
|
+
NarrowCompositeRule(left, right));
|
|
31
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// deno-lint-ignore-file ban-types
|
|
2
2
|
// deno-fmt-ignore-file
|
|
3
|
+
import { Guard } from '../../../guard/index.mjs';
|
|
3
4
|
import { IsUnion } from '../../types/union.mjs';
|
|
4
5
|
import { Extends, ExtendsResult } from '../../extends/index.mjs';
|
|
5
6
|
import { EvaluateType } from '../evaluate/evaluate.mjs';
|
|
@@ -9,10 +10,8 @@ function ExcludeType(left, right) {
|
|
|
9
10
|
const result = ExtendsResult.IsExtendsTrueLike(check) ? [] : [left];
|
|
10
11
|
return result;
|
|
11
12
|
}
|
|
12
|
-
function ExcludeUnion(
|
|
13
|
-
return
|
|
14
|
-
return [...result, ...ExcludeType(head, right)];
|
|
15
|
-
}, []);
|
|
13
|
+
function ExcludeUnion(left, right, result = []) {
|
|
14
|
+
return Guard.ShiftLeft(left, (head, tail) => ExcludeUnion(tail, right, [...result, ...ExcludeType(head, right)]), () => result);
|
|
16
15
|
}
|
|
17
16
|
export function ExcludeOperation(left, right) {
|
|
18
17
|
const evaluated = EvaluateType(left);
|
|
@@ -4,7 +4,7 @@ import { type TExtends, ExtendsResult } from '../../extends/index.mjs';
|
|
|
4
4
|
import { type TEvaluateType } from '../evaluate/evaluate.mjs';
|
|
5
5
|
import { type TEvaluateUnion } from '../evaluate/evaluate.mjs';
|
|
6
6
|
type TExtractType<Left extends TSchema, Right extends TSchema, Check extends ExtendsResult.TResult = TExtends<{}, Left, Right>, Result extends TSchema[] = Check extends ExtendsResult.TExtendsTrueLike ? [Left] : []> = Result;
|
|
7
|
-
type TExtractUnion<
|
|
7
|
+
type TExtractUnion<Left extends TSchema[], Right extends TSchema, Result extends TSchema[] = []> = (Left extends [infer Head extends TSchema, ...infer Tail extends TSchema[]] ? TExtractUnion<Tail, Right, [...Result, ...TExtractType<Head, Right>]> : Result);
|
|
8
8
|
export type TExtractOperation<Left extends TSchema, Right extends TSchema, Evaluated extends TSchema = TEvaluateType<Left>, Canonical extends TSchema[] = Evaluated extends TUnion<infer Types extends TSchema[]> ? Types : [Evaluated], Remaining extends TSchema[] = TExtractUnion<Canonical, Right>, Result extends TSchema = TEvaluateUnion<Remaining>> = Result;
|
|
9
9
|
export declare function ExtractOperation<Left extends TSchema, Right extends TSchema>(left: Left, right: Right): TExtractOperation<Left, Right>;
|
|
10
10
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// deno-lint-ignore-file ban-types
|
|
2
2
|
// deno-fmt-ignore-file
|
|
3
|
+
import { Guard } from '../../../guard/index.mjs';
|
|
3
4
|
import { IsUnion } from '../../types/union.mjs';
|
|
4
5
|
import { Extends, ExtendsResult } from '../../extends/index.mjs';
|
|
5
6
|
import { EvaluateType } from '../evaluate/evaluate.mjs';
|
|
@@ -9,10 +10,8 @@ function ExtractType(left, right) {
|
|
|
9
10
|
const result = ExtendsResult.IsExtendsTrueLike(check) ? [left] : [];
|
|
10
11
|
return result;
|
|
11
12
|
}
|
|
12
|
-
function ExtractUnion(
|
|
13
|
-
return
|
|
14
|
-
return [...result, ...ExtractType(head, right)];
|
|
15
|
-
}, []);
|
|
13
|
+
function ExtractUnion(left, right, result = []) {
|
|
14
|
+
return Guard.ShiftLeft(left, (head, tail) => ExtractUnion(tail, right, [...result, ...ExtractType(head, right)]), () => result);
|
|
16
15
|
}
|
|
17
16
|
export function ExtractOperation(left, right) {
|
|
18
17
|
const evaluated = EvaluateType(left);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type TSchema } from '../../types/schema.mjs';
|
|
2
|
-
import { type TCompare, type TCompareResult } from '../evaluate/compare.mjs';
|
|
3
|
-
type TComparer<Left extends TSchema, Right extends TSchema, CompareResult extends TCompareResult = TCompare<Left, Right>, Result extends 0 | 1 = (CompareResult extends
|
|
2
|
+
import { type TCompare, type TCompareResult, CompareResultRightInside, CompareResultDisjoint } from '../evaluate/compare.mjs';
|
|
3
|
+
type TComparer<Left extends TSchema, Right extends TSchema, CompareResult extends TCompareResult = TCompare<Left, Right>, Result extends 0 | 1 = (CompareResult extends typeof CompareResultRightInside ? 1 : CompareResult extends typeof CompareResultDisjoint ? 1 : 0)> = Result;
|
|
4
4
|
type TInsert<Type extends TSchema, Types extends TSchema[], Result extends TSchema[] = []> = (Types extends [infer Left extends TSchema, ...infer Right extends TSchema[]] ? TComparer<Type, Left> extends 1 ? TInsert<Type, Right, [...Result, Left]> : [...Result, Type, ...Types] : [...Result, Type]);
|
|
5
5
|
type TSort<Types extends TSchema[], Result extends TSchema[] = []> = (Types extends [infer Left extends TSchema, ...infer Right extends TSchema[]] ? TSort<Right, TInsert<Left, Result>> : Result);
|
|
6
6
|
/**
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
// deno-fmt-ignore-file
|
|
2
2
|
import { Guard } from '../../../guard/index.mjs';
|
|
3
|
-
import { Compare } from '../evaluate/compare.mjs';
|
|
3
|
+
import { Compare, CompareResultRightInside, CompareResultDisjoint } from '../evaluate/compare.mjs';
|
|
4
4
|
function Comparer(left, right) {
|
|
5
5
|
const compareResult = Compare(left, right);
|
|
6
|
-
|
|
7
|
-
Guard.IsEqual(compareResult,
|
|
6
|
+
return (Guard.IsEqual(compareResult, CompareResultRightInside) ? 1 :
|
|
7
|
+
Guard.IsEqual(compareResult, CompareResultDisjoint) ? 1 :
|
|
8
8
|
0);
|
|
9
|
-
return result;
|
|
10
9
|
}
|
|
11
10
|
function Insert(type, types, result = []) {
|
|
12
11
|
return Guard.ShiftLeft(types, (left, right) => Guard.IsEqual(Comparer(type, left), 1)
|
|
@@ -65,8 +65,8 @@ type TIntrinsicOrCall<Target extends string, Parameters extends T.TSchema[]> = (
|
|
|
65
65
|
Target,
|
|
66
66
|
Parameters
|
|
67
67
|
] extends ['Uppercase', [infer Type extends T.TSchema]] ? S.TUppercaseDeferred<Type> : T.TCallConstruct<T.TRef<Target>, Parameters>);
|
|
68
|
-
type TDelimitedDecode<Input extends
|
|
69
|
-
type TDelimited<Input extends [unknown, unknown]> = Input extends [infer Left extends unknown[], infer
|
|
68
|
+
type TDelimitedDecode<Input extends [unknown, unknown][], Result extends unknown[] = []> = (Input extends [infer Left extends [unknown, unknown], ...infer Right extends [unknown, unknown][]] ? TDelimitedDecode<Right, [...Result, Left[1]]> : Result);
|
|
69
|
+
type TDelimited<Input extends [unknown, unknown, unknown] | []> = (Input extends [infer Left extends unknown, infer Right extends [unknown, unknown][], infer _ extends unknown[]] ? [Left, ...TDelimitedDecode<Right>] : []);
|
|
70
70
|
export type TGenericParameterExtendsEqualsMapping<Input extends [unknown, unknown, unknown, unknown, unknown]> = (Input extends [infer Name extends string, 'extends', infer Extends extends T.TSchema, '=', infer Equals extends T.TSchema] ? T.TParameter<Name, Extends, Equals> : never);
|
|
71
71
|
export declare function GenericParameterExtendsEqualsMapping(input: [unknown, unknown, unknown, unknown, unknown]): unknown;
|
|
72
72
|
export type TGenericParameterExtendsMapping<Input extends [unknown, unknown, unknown]> = (Input extends [infer Name extends string, 'extends', infer Extends extends T.TSchema] ? T.TParameter<Name, Extends, Extends> : never);
|
|
@@ -77,12 +77,12 @@ export type TGenericParameterIdentifierMapping<Input extends string, Result exte
|
|
|
77
77
|
export declare function GenericParameterIdentifierMapping(input: string): unknown;
|
|
78
78
|
export type TGenericParameterMapping<Input extends unknown> = (Input);
|
|
79
79
|
export declare function GenericParameterMapping(input: unknown): unknown;
|
|
80
|
-
export type TGenericParameterListMapping<Input extends [unknown, unknown]> = (TDelimited<Input>);
|
|
81
|
-
export declare function GenericParameterListMapping(input: [unknown, unknown]): unknown;
|
|
80
|
+
export type TGenericParameterListMapping<Input extends [unknown, unknown, unknown] | []> = (TDelimited<Input>);
|
|
81
|
+
export declare function GenericParameterListMapping(input: [unknown, unknown, unknown] | []): unknown;
|
|
82
82
|
export type TGenericParametersMapping<Input extends [unknown, unknown, unknown]> = (Input extends ['<', infer Parameters extends T.TParameter[], '>'] ? Parameters : never);
|
|
83
83
|
export declare function GenericParametersMapping(input: [unknown, unknown, unknown]): unknown;
|
|
84
|
-
export type TGenericCallArgumentListMapping<Input extends [unknown, unknown]> = (TDelimited<Input>);
|
|
85
|
-
export declare function GenericCallArgumentListMapping(input: [unknown, unknown]): unknown;
|
|
84
|
+
export type TGenericCallArgumentListMapping<Input extends [unknown, unknown, unknown] | []> = (TDelimited<Input>);
|
|
85
|
+
export declare function GenericCallArgumentListMapping(input: [unknown, unknown, unknown] | []): unknown;
|
|
86
86
|
export type TGenericCallArgumentsMapping<Input extends [unknown, unknown, unknown]> = (Input extends ['<', infer Arguments extends T.TSchema[], '>'] ? Arguments : never);
|
|
87
87
|
export declare function GenericCallArgumentsMapping(input: [unknown, unknown, unknown]): unknown;
|
|
88
88
|
export type TGenericCallMapping<Input extends [unknown, unknown], Result = Input extends [infer Ref extends string, infer Arguments extends T.TSchema[]] ? TIntrinsicOrCall<Ref, Arguments> : never> = Result;
|
|
@@ -202,8 +202,8 @@ export type TPropertyMapping<Input extends [unknown, unknown, unknown, unknown,
|
|
|
202
202
|
export declare function PropertyMapping(input: [unknown, unknown, unknown, unknown, unknown]): unknown;
|
|
203
203
|
export type TPropertyDelimiterMapping<Input extends [unknown, unknown] | [unknown]> = (Input);
|
|
204
204
|
export declare function PropertyDelimiterMapping(input: [unknown, unknown] | [unknown]): unknown;
|
|
205
|
-
export type TPropertyListMapping<Input extends [unknown, unknown]> = (TDelimited<Input>);
|
|
206
|
-
export declare function PropertyListMapping(input: [unknown, unknown]): unknown;
|
|
205
|
+
export type TPropertyListMapping<Input extends [unknown, unknown, unknown] | []> = (TDelimited<Input>);
|
|
206
|
+
export declare function PropertyListMapping(input: [unknown, unknown, unknown] | []): unknown;
|
|
207
207
|
type TPropertiesReduce<PropertiesList extends T.TProperties[], Result extends [properties: T.TProperties, patternProperties: T.TProperties] = [{}, {}]> = (PropertiesList extends [infer Left extends T.TProperties, ...infer Right extends T.TProperties[]] ? (Left extends {
|
|
208
208
|
[_ in T.TIntegerKey]: T.TSchema;
|
|
209
209
|
} ? TPropertiesReduce<Right, [Result[0], Memory.TAssign<Result[1], Left>]> : Left extends {
|
|
@@ -219,18 +219,21 @@ export type T_Object_Mapping<Input extends unknown> = (Input extends [infer Prop
|
|
|
219
219
|
export declare function _Object_Mapping(input: unknown): unknown;
|
|
220
220
|
export type TElementNamedMapping<Input extends [unknown, unknown, unknown, unknown, unknown] | [unknown, unknown, unknown, unknown] | [unknown, unknown, unknown]> = (Input extends [string, '?', ':', 'readonly', infer Type extends T.TSchema] ? S.TAddReadonlyDeferred<S.TAddOptionalDeferred<Type>> : Input extends [string, /**/ ':', 'readonly', infer Type extends T.TSchema] ? S.TAddReadonlyDeferred<Type> : Input extends [string, '?', ':', /* */ infer Type extends T.TSchema] ? S.TAddOptionalDeferred<Type> : Input extends [string, /**/ ':', /* */ infer Type extends T.TSchema] ? Type : never);
|
|
221
221
|
export declare function ElementNamedMapping(input: [unknown, unknown, unknown, unknown, unknown] | [unknown, unknown, unknown, unknown] | [unknown, unknown, unknown]): unknown;
|
|
222
|
-
export type
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
222
|
+
export type TElementBaseMapping<Input extends unknown | [unknown, unknown, unknown]> = (Input extends [infer IsReadonly extends boolean, infer Type extends T.TSchema, infer IsOptional extends boolean] ? ([
|
|
223
|
+
IsReadonly,
|
|
224
|
+
IsOptional
|
|
225
|
+
] extends [true, true] ? S.TAddReadonlyDeferred<S.TAddOptionalDeferred<Type>> : [
|
|
226
|
+
IsReadonly,
|
|
227
|
+
IsOptional
|
|
228
|
+
] extends [true, false] ? S.TAddReadonlyDeferred<Type> : [
|
|
229
|
+
IsReadonly,
|
|
230
|
+
IsOptional
|
|
231
|
+
] extends [false, true] ? S.TAddOptionalDeferred<Type> : Type) : Input);
|
|
232
|
+
export declare function ElementBaseMapping(input: unknown | [unknown, unknown, unknown]): unknown;
|
|
230
233
|
export type TElementMapping<Input extends [unknown, unknown] | [unknown]> = (Input extends ['...', infer Type extends T.TSchema] ? T.TRest<Type> : Input extends [infer Type extends T.TSchema] ? Type : never);
|
|
231
234
|
export declare function ElementMapping(input: [unknown, unknown] | [unknown]): unknown;
|
|
232
|
-
export type TElementListMapping<Input extends [unknown, unknown]> = (TDelimited<Input>);
|
|
233
|
-
export declare function ElementListMapping(input: [unknown, unknown]): unknown;
|
|
235
|
+
export type TElementListMapping<Input extends [unknown, unknown, unknown] | []> = (TDelimited<Input>);
|
|
236
|
+
export declare function ElementListMapping(input: [unknown, unknown, unknown] | []): unknown;
|
|
234
237
|
export type T_Tuple_Mapping<Input extends [unknown, unknown, unknown]> = (Input extends ['[', infer Types extends T.TSchema[], ']'] ? T.TTuple<Types> : never);
|
|
235
238
|
export declare function _Tuple_Mapping(input: [unknown, unknown, unknown]): unknown;
|
|
236
239
|
export type TParameterReadonlyOptionalMapping<Input extends [unknown, unknown, unknown, unknown, unknown]> = (Input extends [string, '?', ':', 'readonly', infer Type extends T.TSchema] ? S.TAddReadonlyDeferred<S.TAddOptionalDeferred<Type>> : never);
|
|
@@ -245,8 +248,8 @@ export type TParameterBaseMapping<Input extends unknown> = (Input);
|
|
|
245
248
|
export declare function ParameterBaseMapping(input: unknown): unknown;
|
|
246
249
|
export type TParameterMapping<Input extends [unknown, unknown] | [unknown]> = (Input extends ['...', infer Type extends T.TSchema] ? T.TRest<Type> : Input extends [infer Type extends T.TSchema] ? Type : never);
|
|
247
250
|
export declare function ParameterMapping(input: [unknown, unknown] | [unknown]): unknown;
|
|
248
|
-
export type TParameterListMapping<Input extends [unknown, unknown]> = (TDelimited<Input>);
|
|
249
|
-
export declare function ParameterListMapping(input: [unknown, unknown]): unknown;
|
|
251
|
+
export type TParameterListMapping<Input extends [unknown, unknown, unknown] | []> = (TDelimited<Input>);
|
|
252
|
+
export declare function ParameterListMapping(input: [unknown, unknown, unknown] | []): unknown;
|
|
250
253
|
export type T_Function_Mapping<Input extends [unknown, unknown, unknown, unknown, unknown]> = (Input extends ['(', infer ParameterList extends T.TSchema[], ')', '=>', infer ReturnType extends T.TSchema] ? T.TFunction<ParameterList, ReturnType> : never);
|
|
251
254
|
export declare function _Function_Mapping(input: [unknown, unknown, unknown, unknown, unknown]): unknown;
|
|
252
255
|
export type T_Constructor_Mapping<Input extends [unknown, unknown, unknown, unknown, unknown, unknown]> = (Input extends ['new', '(', infer ParameterList extends T.TSchema[], ')', '=>', infer InstanceType extends T.TSchema] ? T.TConstructor<ParameterList, InstanceType> : never);
|
|
@@ -280,15 +283,15 @@ export type TWithPropertyMapping<Input extends [unknown, unknown, unknown]> = (I
|
|
|
280
283
|
[_ in Key]: Value;
|
|
281
284
|
} : never);
|
|
282
285
|
export declare function WithPropertyMapping(input: [unknown, unknown, unknown]): unknown;
|
|
283
|
-
export type TWithPropertyListMapping<Input extends [unknown, unknown]> = (TDelimited<Input>);
|
|
284
|
-
export declare function WithPropertyListMapping(input: [unknown, unknown]): unknown;
|
|
286
|
+
export type TWithPropertyListMapping<Input extends [unknown, unknown, unknown] | []> = (TDelimited<Input>);
|
|
287
|
+
export declare function WithPropertyListMapping(input: [unknown, unknown, unknown] | []): unknown;
|
|
285
288
|
type TWithObjectMappingReduce<PropertyList extends Record<PropertyKey, unknown>[], Result extends Record<PropertyKey, unknown> = {}> = (PropertyList extends [infer Left extends Record<PropertyKey, unknown>, ...infer Right extends Record<PropertyKey, unknown>[]] ? TWithObjectMappingReduce<Right, Memory.TAssign<Result, Left>> : {
|
|
286
289
|
[Key in keyof Result]: Result[Key];
|
|
287
290
|
});
|
|
288
291
|
export type TWithObjectMapping<Input extends [unknown, unknown, unknown]> = (Input extends ['{', infer PropertyList extends Record<PropertyKey, unknown>[], '}'] ? TWithObjectMappingReduce<PropertyList> : {});
|
|
289
292
|
export declare function WithObjectMapping(input: [unknown, unknown, unknown]): unknown;
|
|
290
|
-
export type TWithElementListMapping<Input extends [unknown, unknown]> = (TDelimited<Input>);
|
|
291
|
-
export declare function WithElementListMapping(input: [unknown, unknown]): unknown;
|
|
293
|
+
export type TWithElementListMapping<Input extends [unknown, unknown, unknown] | []> = (TDelimited<Input>);
|
|
294
|
+
export declare function WithElementListMapping(input: [unknown, unknown, unknown] | []): unknown;
|
|
292
295
|
export type TWithArrayMapping<Input extends [unknown, unknown, unknown]> = (Input extends ['[', infer Elements extends unknown[], ']'] ? Elements : never);
|
|
293
296
|
export declare function WithArrayMapping(input: [unknown, unknown, unknown]): unknown;
|
|
294
297
|
export type TWithValueMapping<Input extends unknown> = (Input);
|
|
@@ -318,8 +321,8 @@ export type TPatternBodyMapping<Input extends unknown> = (Input);
|
|
|
318
321
|
export declare function PatternBodyMapping(input: unknown): unknown;
|
|
319
322
|
export type TPatternMapping<Input extends [unknown, unknown, unknown]> = (Input extends ['^', infer Body extends T.TSchema[], '$'] ? Body : never);
|
|
320
323
|
export declare function PatternMapping(input: [unknown, unknown, unknown]): unknown;
|
|
321
|
-
export type TInterfaceDeclarationHeritageListMapping<Input extends [unknown, unknown]> = (TDelimited<Input>);
|
|
322
|
-
export declare function InterfaceDeclarationHeritageListMapping(input: [unknown, unknown]): unknown;
|
|
324
|
+
export type TInterfaceDeclarationHeritageListMapping<Input extends [unknown, unknown, unknown] | []> = (TDelimited<Input>);
|
|
325
|
+
export declare function InterfaceDeclarationHeritageListMapping(input: [unknown, unknown, unknown] | []): unknown;
|
|
323
326
|
export type TInterfaceDeclarationHeritageMapping<Input extends [unknown, unknown] | []> = (Input extends ['extends', infer Heritage extends T.TSchema[]] ? Heritage : []);
|
|
324
327
|
export declare function InterfaceDeclarationHeritageMapping(input: [unknown, unknown] | []): unknown;
|
|
325
328
|
export type TInterfaceDeclarationGenericMapping<Input extends [unknown, unknown, unknown, unknown, unknown]> = (Input extends ['interface', infer Name extends string, infer Parameters extends T.TParameter[], infer Heritage extends T.TSchema[], infer Properties extends [T.TProperties, T.TProperties]] ? {
|
|
@@ -342,11 +345,11 @@ export type TExportKeywordMapping<Input extends [unknown] | []> = (null);
|
|
|
342
345
|
export declare function ExportKeywordMapping(input: [unknown] | []): unknown;
|
|
343
346
|
export type TModuleDeclarationDelimiterMapping<Input extends [unknown, unknown] | [unknown]> = (Input);
|
|
344
347
|
export declare function ModuleDeclarationDelimiterMapping(input: [unknown, unknown] | [unknown]): unknown;
|
|
345
|
-
export type TModuleDeclarationListMapping<Input extends [unknown, unknown]> = (
|
|
346
|
-
export declare function ModuleDeclarationListMapping(input: [unknown, unknown]): unknown;
|
|
348
|
+
export type TModuleDeclarationListMapping<Input extends [unknown, unknown, unknown] | []> = (TDelimited<Input>);
|
|
349
|
+
export declare function ModuleDeclarationListMapping(input: [unknown, unknown, unknown] | []): unknown;
|
|
347
350
|
export type TModuleDeclarationMapping<Input extends [unknown, unknown, unknown]> = (Input extends [null, infer ModuleDeclaration extends T.TProperties, null] ? ModuleDeclaration : never);
|
|
348
351
|
export declare function ModuleDeclarationMapping(input: [unknown, unknown, unknown]): unknown;
|
|
349
|
-
export type TModuleMapping<Input extends [unknown, unknown]> = (Input extends [infer ModuleDeclaration extends T.TProperties, infer ModuleDeclarationList extends
|
|
352
|
+
export type TModuleMapping<Input extends [unknown, unknown]> = (Input extends [infer ModuleDeclaration extends T.TProperties, infer ModuleDeclarationList extends T.TProperties[]] ? S.TModuleDeferred<Memory.TAssign<ModuleDeclaration, TPropertiesReduce<ModuleDeclarationList>[0]>> : never);
|
|
350
353
|
export declare function ModuleMapping(input: [unknown, unknown]): unknown;
|
|
351
354
|
export type TScriptMapping<Input extends unknown> = (Input);
|
|
352
355
|
export declare function ScriptMapping(input: unknown): unknown;
|