@openclaw/google-meet 2026.7.1-beta.2 → 2026.7.1-beta.5
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/{chrome-create-C1akZT_q.js → chrome-create-BhgM0jQO.js} +6 -5
- package/dist/{cli-BXICNPAs.js → cli-D364Yrym.js} +4 -4
- package/dist/{config-D_YKxh0m.js → config-DDYRr7-P.js} +2 -1
- package/dist/{create-CHlW2v6-.js → create-CkkaRlbI.js} +4 -3
- package/dist/index.js +177 -141
- package/dist/{oauth-DK1mwF2i.js → oauth-75iPDzIn.js} +6 -3
- package/node_modules/commander/Readme.md +11 -15
- package/node_modules/commander/index.js +14 -17
- package/node_modules/commander/lib/argument.js +3 -6
- package/node_modules/commander/lib/command.js +46 -33
- package/node_modules/commander/lib/error.js +2 -5
- package/node_modules/commander/lib/help.js +4 -20
- package/node_modules/commander/lib/option.js +3 -6
- package/node_modules/commander/lib/suggestSimilar.js +2 -4
- package/node_modules/commander/package.json +10 -28
- package/node_modules/commander/typings/index.d.ts +3 -3
- package/node_modules/typebox/build/compile/validator.d.mts +2 -7
- package/node_modules/typebox/build/compile/validator.mjs +6 -36
- package/node_modules/typebox/build/error/errors.d.mts +1 -7
- package/node_modules/typebox/build/format/_idna.mjs +36 -6
- package/node_modules/typebox/build/format/_puny.mjs +4 -1
- package/node_modules/typebox/build/format/uuid.d.mts +2 -2
- package/node_modules/typebox/build/format/uuid.mjs +3 -3
- package/node_modules/typebox/build/guard/emit.d.mts +0 -4
- package/node_modules/typebox/build/guard/emit.mjs +0 -8
- package/node_modules/typebox/build/guard/guard.d.mts +4 -8
- package/node_modules/typebox/build/guard/guard.mjs +5 -13
- package/node_modules/typebox/build/schema/engine/boolean.d.mts +3 -3
- package/node_modules/typebox/build/schema/engine/boolean.mjs +4 -4
- package/node_modules/typebox/build/schema/engine/index.d.mts +0 -1
- package/node_modules/typebox/build/schema/engine/index.mjs +0 -1
- package/node_modules/typebox/build/schema/engine/schema.mjs +5 -10
- package/node_modules/typebox/build/schema/engine/type.mjs +14 -18
- package/node_modules/typebox/build/schema/types/dependencies.mjs +1 -1
- package/node_modules/typebox/build/schema/types/index.d.mts +0 -1
- package/node_modules/typebox/build/schema/types/index.mjs +0 -1
- package/node_modules/typebox/build/schema/types/schema.d.mts +1 -1
- package/node_modules/typebox/build/schema/types/schema.mjs +2 -2
- package/node_modules/typebox/build/system/locale/ar_001.mjs +0 -1
- package/node_modules/typebox/build/system/locale/bn_BD.mjs +0 -1
- package/node_modules/typebox/build/system/locale/cs_CZ.mjs +0 -1
- package/node_modules/typebox/build/system/locale/de_DE.mjs +0 -1
- package/node_modules/typebox/build/system/locale/el_GR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/en_US.mjs +0 -1
- package/node_modules/typebox/build/system/locale/es_419.mjs +0 -1
- package/node_modules/typebox/build/system/locale/es_AR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/es_ES.mjs +0 -1
- package/node_modules/typebox/build/system/locale/es_MX.mjs +0 -1
- package/node_modules/typebox/build/system/locale/fa_IR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/fil_PH.mjs +0 -1
- package/node_modules/typebox/build/system/locale/fr_CA.mjs +0 -1
- package/node_modules/typebox/build/system/locale/fr_FR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ha_NG.mjs +0 -1
- package/node_modules/typebox/build/system/locale/hi_IN.mjs +0 -1
- package/node_modules/typebox/build/system/locale/hu_HU.mjs +0 -1
- package/node_modules/typebox/build/system/locale/id_ID.mjs +0 -1
- package/node_modules/typebox/build/system/locale/it_IT.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ja_JP.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ko_KR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ms_MY.mjs +0 -1
- package/node_modules/typebox/build/system/locale/nl_NL.mjs +0 -1
- package/node_modules/typebox/build/system/locale/pl_PL.mjs +0 -1
- package/node_modules/typebox/build/system/locale/pt_BR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/pt_PT.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ro_RO.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ru_RU.mjs +0 -1
- package/node_modules/typebox/build/system/locale/sv_SE.mjs +0 -1
- package/node_modules/typebox/build/system/locale/sw_TZ.mjs +0 -1
- package/node_modules/typebox/build/system/locale/th_TH.mjs +0 -1
- package/node_modules/typebox/build/system/locale/tr_TR.mjs +0 -1
- package/node_modules/typebox/build/system/locale/uk_UA.mjs +0 -1
- package/node_modules/typebox/build/system/locale/ur_PK.mjs +0 -1
- package/node_modules/typebox/build/system/locale/vi_VN.mjs +0 -1
- package/node_modules/typebox/build/system/locale/yo_NG.mjs +0 -1
- package/node_modules/typebox/build/system/locale/zh_Hans.mjs +0 -1
- package/node_modules/typebox/build/system/locale/zh_Hant.mjs +0 -1
- package/node_modules/typebox/build/system/memory/clone.d.mts +2 -3
- package/node_modules/typebox/build/system/memory/clone.mjs +73 -26
- package/node_modules/typebox/build/system/settings/settings.d.mts +15 -0
- package/node_modules/typebox/build/system/settings/settings.mjs +3 -1
- package/node_modules/typebox/build/type/action/_add_immutable.d.mts +11 -0
- package/node_modules/typebox/build/type/action/_add_immutable.mjs +11 -0
- package/node_modules/typebox/build/type/action/_add_optional.d.mts +11 -0
- package/node_modules/typebox/build/type/action/_add_optional.mjs +11 -0
- package/node_modules/typebox/build/type/action/_add_readonly.d.mts +11 -0
- package/node_modules/typebox/build/type/action/_add_readonly.mjs +11 -0
- package/node_modules/typebox/build/type/action/_remove_immutable.d.mts +11 -0
- package/node_modules/typebox/build/type/action/_remove_immutable.mjs +11 -0
- package/node_modules/typebox/build/type/action/_remove_optional.d.mts +11 -0
- package/node_modules/typebox/build/type/action/_remove_optional.mjs +11 -0
- package/node_modules/typebox/build/type/action/_remove_readonly.d.mts +11 -0
- package/node_modules/typebox/build/type/action/_remove_readonly.mjs +11 -0
- package/node_modules/typebox/build/type/action/conditional.d.mts +2 -3
- package/node_modules/typebox/build/type/action/conditional.mjs +2 -1
- package/node_modules/typebox/build/type/action/index.d.mts +7 -4
- package/node_modules/typebox/build/type/action/index.mjs +7 -4
- package/node_modules/typebox/build/type/action/mapped.d.mts +2 -3
- package/node_modules/typebox/build/type/action/mapped.mjs +2 -1
- package/node_modules/typebox/build/type/action/module.d.mts +8 -7
- package/node_modules/typebox/build/type/action/module.mjs +7 -6
- package/node_modules/typebox/build/type/action/readonly_object.d.mts +0 -5
- package/node_modules/typebox/build/type/action/readonly_object.mjs +0 -5
- package/node_modules/typebox/build/type/action/with.d.mts +11 -0
- package/node_modules/typebox/build/type/action/with.mjs +11 -0
- package/node_modules/typebox/build/type/engine/call/distribute_arguments.mjs +1 -1
- package/node_modules/typebox/build/type/engine/call/instantiate.d.mts +1 -3
- package/node_modules/typebox/build/type/engine/call/instantiate.mjs +3 -2
- package/node_modules/typebox/build/type/engine/call/resolve_arguments.mjs +2 -2
- package/node_modules/typebox/build/type/engine/constructor_parameters/instantiate.d.mts +3 -4
- package/node_modules/typebox/build/type/engine/constructor_parameters/instantiate.mjs +2 -1
- package/node_modules/typebox/build/type/engine/cyclic/candidates.d.mts +2 -3
- package/node_modules/typebox/build/type/engine/cyclic/candidates.mjs +3 -6
- package/node_modules/typebox/build/type/engine/cyclic/check.d.mts +6 -9
- package/node_modules/typebox/build/type/engine/cyclic/check.mjs +10 -16
- package/node_modules/typebox/build/type/engine/cyclic/dependencies.d.mts +1 -4
- package/node_modules/typebox/build/type/engine/cyclic/dependencies.mjs +9 -15
- package/node_modules/typebox/build/type/engine/cyclic/extends.d.mts +1 -4
- package/node_modules/typebox/build/type/engine/cyclic/extends.mjs +8 -14
- package/node_modules/typebox/build/type/engine/cyclic/instantiate.d.mts +2 -5
- package/node_modules/typebox/build/type/engine/cyclic/instantiate.mjs +3 -2
- package/node_modules/typebox/build/type/engine/enum/index.d.mts +0 -1
- package/node_modules/typebox/build/type/engine/enum/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/evaluate/broaden.d.mts +1 -2
- package/node_modules/typebox/build/type/engine/evaluate/broaden.mjs +2 -6
- package/node_modules/typebox/build/type/engine/evaluate/composite.d.mts +10 -6
- package/node_modules/typebox/build/type/engine/evaluate/composite.mjs +10 -6
- package/node_modules/typebox/build/type/engine/evaluate/distribute.d.mts +2 -1
- package/node_modules/typebox/build/type/engine/evaluate/distribute.mjs +3 -3
- package/node_modules/typebox/build/type/engine/evaluate/evaluate.d.mts +17 -5
- package/node_modules/typebox/build/type/engine/evaluate/evaluate.mjs +34 -8
- package/node_modules/typebox/build/type/engine/exclude/operation.d.mts +5 -6
- package/node_modules/typebox/build/type/engine/exclude/operation.mjs +11 -12
- package/node_modules/typebox/build/type/engine/extract/operation.d.mts +5 -6
- package/node_modules/typebox/build/type/engine/extract/operation.mjs +11 -12
- package/node_modules/typebox/build/type/engine/immutable/instantiate_add.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/immutable/instantiate_add.mjs +14 -0
- package/node_modules/typebox/build/type/engine/immutable/instantiate_remove.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/immutable/instantiate_remove.mjs +14 -0
- package/node_modules/typebox/build/type/engine/index.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/index.mjs +2 -2
- package/node_modules/typebox/build/type/engine/indexable/from_dependent.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/indexable/from_dependent.mjs +8 -0
- package/node_modules/typebox/build/type/engine/indexable/from_enum.d.mts +3 -3
- package/node_modules/typebox/build/type/engine/indexable/from_enum.mjs +4 -4
- package/node_modules/typebox/build/type/engine/indexable/from_template_literal.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/indexable/from_template_literal.mjs +3 -3
- package/node_modules/typebox/build/type/engine/indexable/from_type.d.mts +3 -1
- package/node_modules/typebox/build/type/engine/indexable/from_type.mjs +9 -6
- package/node_modules/typebox/build/type/engine/indexed/instantiate.d.mts +2 -1
- package/node_modules/typebox/build/type/engine/indexed/instantiate.mjs +5 -2
- package/node_modules/typebox/build/type/engine/instantiate.d.mts +44 -31
- package/node_modules/typebox/build/type/engine/instantiate.mjs +82 -83
- package/node_modules/typebox/build/type/engine/interface/instantiate.d.mts +3 -6
- package/node_modules/typebox/build/type/engine/intrinsics/from_template_literal.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/intrinsics/from_template_literal.mjs +3 -3
- package/node_modules/typebox/build/type/engine/keyof/instantiate.d.mts +2 -1
- package/node_modules/typebox/build/type/engine/keyof/instantiate.mjs +5 -1
- package/node_modules/typebox/build/type/engine/mapped/mapped_operation.d.mts +4 -4
- package/node_modules/typebox/build/type/engine/mapped/mapped_operation.mjs +3 -3
- package/node_modules/typebox/build/type/engine/mapped/mapped_variants.d.mts +5 -4
- package/node_modules/typebox/build/type/engine/mapped/mapped_variants.mjs +10 -5
- package/node_modules/typebox/build/type/engine/module/instantiate.d.mts +7 -9
- package/node_modules/typebox/build/type/engine/module/instantiate.mjs +17 -15
- package/node_modules/typebox/build/type/engine/object/from_dependent.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/object/from_dependent.mjs +8 -0
- package/node_modules/typebox/build/type/engine/object/from_type.d.mts +3 -1
- package/node_modules/typebox/build/type/engine/object/from_type.mjs +8 -5
- package/node_modules/typebox/build/type/engine/object/from_union.mjs +2 -2
- package/node_modules/typebox/build/type/engine/optional/instantiate_add.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/optional/instantiate_add.mjs +14 -0
- package/node_modules/typebox/build/type/engine/optional/instantiate_remove.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/optional/instantiate_remove.mjs +14 -0
- package/node_modules/typebox/build/type/engine/parameters/instantiate.d.mts +3 -4
- package/node_modules/typebox/build/type/engine/parameters/instantiate.mjs +2 -1
- package/node_modules/typebox/build/type/engine/partial/from_dependent.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/partial/from_dependent.mjs +8 -0
- package/node_modules/typebox/build/type/engine/partial/from_intersect.d.mts +1 -1
- package/node_modules/typebox/build/type/engine/partial/from_intersect.mjs +3 -2
- package/node_modules/typebox/build/type/engine/partial/from_object.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/partial/from_object.mjs +2 -2
- package/node_modules/typebox/build/type/engine/partial/from_type.d.mts +3 -1
- package/node_modules/typebox/build/type/engine/partial/from_type.mjs +7 -4
- package/node_modules/typebox/build/type/engine/priority/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/priority/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/priority/priority.d.mts +20 -0
- package/node_modules/typebox/build/type/engine/priority/priority.mjs +28 -0
- package/node_modules/typebox/build/type/engine/readonly/instantiate_add.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/readonly/instantiate_add.mjs +14 -0
- package/node_modules/typebox/build/type/engine/readonly/instantiate_remove.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/readonly/instantiate_remove.mjs +14 -0
- package/node_modules/typebox/build/type/engine/readonly_object/from_array.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_array.mjs +2 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_dependent.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/readonly_object/from_dependent.mjs +8 -0
- package/node_modules/typebox/build/type/engine/readonly_object/from_intersect.d.mts +1 -1
- package/node_modules/typebox/build/type/engine/readonly_object/from_intersect.mjs +3 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_object.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_object.mjs +2 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_tuple.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_tuple.mjs +2 -2
- package/node_modules/typebox/build/type/engine/readonly_object/from_type.d.mts +3 -1
- package/node_modules/typebox/build/type/engine/readonly_object/from_type.mjs +8 -5
- package/node_modules/typebox/build/type/engine/record/from_key_enum.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/record/from_key_enum.mjs +2 -2
- package/node_modules/typebox/build/type/engine/record/from_key_template_literal.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/record/from_key_template_literal.mjs +2 -2
- package/node_modules/typebox/build/type/engine/ref/instantiate.d.mts +3 -3
- package/node_modules/typebox/build/type/engine/ref/instantiate.mjs +6 -6
- package/node_modules/typebox/build/type/engine/required/from_dependent.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/required/from_dependent.mjs +8 -0
- package/node_modules/typebox/build/type/engine/required/from_intersect.d.mts +1 -1
- package/node_modules/typebox/build/type/engine/required/from_intersect.mjs +3 -2
- package/node_modules/typebox/build/type/engine/required/from_object.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/required/from_object.mjs +2 -2
- package/node_modules/typebox/build/type/engine/required/from_type.d.mts +3 -1
- package/node_modules/typebox/build/type/engine/required/from_type.mjs +7 -4
- package/node_modules/typebox/build/type/engine/template_literal/decode.mjs +3 -3
- package/node_modules/typebox/build/type/engine/template_literal/encode.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/template_literal/encode.mjs +6 -6
- package/node_modules/typebox/build/type/engine/template_literal/is_finite.mjs +1 -1
- package/node_modules/typebox/build/type/engine/template_literal/is_pattern.mjs +1 -0
- package/node_modules/typebox/build/type/engine/this/expand_this.d.mts +1 -4
- package/node_modules/typebox/build/type/engine/this/expand_this.mjs +7 -13
- package/node_modules/typebox/build/type/engine/with/instantiate.d.mts +8 -0
- package/node_modules/typebox/build/type/engine/{options → with}/instantiate.mjs +5 -5
- package/node_modules/typebox/build/type/extends/dependent.d.mts +6 -0
- package/node_modules/typebox/build/type/extends/dependent.mjs +6 -0
- package/node_modules/typebox/build/type/extends/enum.d.mts +4 -4
- package/node_modules/typebox/build/type/extends/enum.mjs +3 -2
- package/node_modules/typebox/build/type/extends/extends_left.d.mts +5 -7
- package/node_modules/typebox/build/type/extends/extends_left.mjs +24 -27
- package/node_modules/typebox/build/type/extends/extends_right.d.mts +7 -5
- package/node_modules/typebox/build/type/extends/extends_right.mjs +20 -15
- package/node_modules/typebox/build/type/extends/inference.mjs +1 -1
- package/node_modules/typebox/build/type/extends/object.d.mts +8 -1
- package/node_modules/typebox/build/type/extends/object.mjs +25 -3
- package/node_modules/typebox/build/type/extends/parameters.mjs +2 -2
- package/node_modules/typebox/build/type/extends/record.d.mts +13 -0
- package/node_modules/typebox/build/type/extends/record.mjs +23 -0
- package/node_modules/typebox/build/type/extends/template_literal.d.mts +3 -3
- package/node_modules/typebox/build/type/extends/template_literal.mjs +3 -3
- package/node_modules/typebox/build/type/extends/tuple.d.mts +3 -6
- package/node_modules/typebox/build/type/extends/tuple.mjs +6 -5
- package/node_modules/typebox/build/type/extends/union.mjs +2 -2
- package/node_modules/typebox/build/type/script/mapping.d.mts +84 -99
- package/node_modules/typebox/build/type/script/mapping.mjs +81 -85
- package/node_modules/typebox/build/type/script/parser.d.mts +40 -40
- package/node_modules/typebox/build/type/script/parser.mjs +22 -22
- package/node_modules/typebox/build/type/script/script.d.mts +3 -4
- package/node_modules/typebox/build/type/script/script.mjs +3 -2
- package/node_modules/typebox/build/type/script/token/internal/guard.d.mts +1 -1
- package/node_modules/typebox/build/type/script/token/internal/guard.mjs +1 -1
- package/node_modules/typebox/build/type/script/token/internal/take.mjs +1 -1
- package/node_modules/typebox/build/type/script/token/until.mjs +2 -2
- package/node_modules/typebox/build/type/types/_codec.d.mts +12 -12
- package/node_modules/typebox/build/type/types/_codec.mjs +0 -1
- package/node_modules/typebox/build/type/types/_immutable.d.mts +2 -9
- package/node_modules/typebox/build/type/types/_immutable.mjs +2 -10
- package/node_modules/typebox/build/type/types/_optional.d.mts +2 -9
- package/node_modules/typebox/build/type/types/_optional.mjs +2 -11
- package/node_modules/typebox/build/type/types/_readonly.d.mts +2 -9
- package/node_modules/typebox/build/type/types/_readonly.mjs +2 -10
- package/node_modules/typebox/build/type/types/_refine.d.mts +8 -10
- package/node_modules/typebox/build/type/types/_refine.mjs +1 -2
- package/node_modules/typebox/build/type/types/call.d.mts +3 -3
- package/node_modules/typebox/build/type/types/call.mjs +3 -2
- package/node_modules/typebox/build/type/types/deferred.d.mts +1 -0
- package/node_modules/typebox/build/type/types/deferred.mjs +1 -1
- package/node_modules/typebox/build/type/types/dependent.d.mts +17 -0
- package/node_modules/typebox/build/type/types/dependent.mjs +24 -0
- package/node_modules/typebox/build/type/types/enum.d.mts +3 -1
- package/node_modules/typebox/build/type/types/enum.mjs +5 -0
- package/node_modules/typebox/build/type/types/index.d.mts +1 -4
- package/node_modules/typebox/build/type/types/index.mjs +1 -4
- package/node_modules/typebox/build/type/types/number.d.mts +1 -1
- package/node_modules/typebox/build/type/types/number.mjs +1 -1
- package/node_modules/typebox/build/type/types/record.d.mts +13 -7
- package/node_modules/typebox/build/type/types/record.mjs +15 -9
- package/node_modules/typebox/build/type/types/static.d.mts +2 -5
- package/node_modules/typebox/build/typebox.d.mts +4 -8
- package/node_modules/typebox/build/typebox.mjs +4 -8
- package/node_modules/typebox/build/value/clean/clean.mjs +4 -2
- package/node_modules/typebox/build/value/clean/from_intersect.mjs +2 -2
- package/node_modules/typebox/build/value/clean/from_type.mjs +8 -10
- package/node_modules/typebox/build/value/clean/from_union.d.mts +1 -1
- package/node_modules/typebox/build/value/clean/from_union.mjs +1 -2
- package/node_modules/typebox/build/value/clone/clone.mjs +2 -73
- package/node_modules/typebox/build/value/codec/decode.mjs +4 -2
- package/node_modules/typebox/build/value/codec/encode.mjs +4 -2
- package/node_modules/typebox/build/value/codec/from_array.mjs +1 -4
- package/node_modules/typebox/build/value/codec/from_object.mjs +1 -4
- package/node_modules/typebox/build/value/codec/from_record.mjs +2 -7
- package/node_modules/typebox/build/value/codec/from_tuple.mjs +1 -4
- package/node_modules/typebox/build/value/codec/from_union.mjs +2 -3
- package/node_modules/typebox/build/value/convert/from_enum.mjs +3 -4
- package/node_modules/typebox/build/value/convert/from_template_literal.d.mts +1 -1
- package/node_modules/typebox/build/value/convert/from_template_literal.mjs +2 -3
- package/node_modules/typebox/build/value/convert/from_type.mjs +19 -21
- package/node_modules/typebox/build/value/create/from_enum.mjs +2 -2
- package/node_modules/typebox/build/value/create/from_type.mjs +23 -31
- package/node_modules/typebox/build/value/default/from_object.mjs +1 -1
- package/node_modules/typebox/build/value/default/from_type.mjs +8 -10
- package/node_modules/typebox/build/value/index.d.mts +0 -1
- package/node_modules/typebox/build/value/index.mjs +0 -1
- package/node_modules/typebox/build/value/repair/from_enum.mjs +2 -3
- package/node_modules/typebox/build/value/repair/from_type.mjs +24 -22
- package/node_modules/typebox/build/value/shared/union_priority_sort.d.mts +6 -2
- package/node_modules/typebox/build/value/shared/union_priority_sort.mjs +62 -26
- package/node_modules/typebox/build/value/value.d.mts +0 -1
- package/node_modules/typebox/build/value/value.mjs +0 -1
- package/node_modules/typebox/package.json +25 -25
- package/node_modules/typebox/readme.md +97 -80
- package/npm-shrinkwrap.json +12 -12
- package/package.json +6 -6
- package/node_modules/commander/esm.mjs +0 -16
- package/node_modules/commander/typings/esm.d.mts +0 -3
- package/node_modules/typebox/build/schema/engine/_guard.d.mts +0 -6
- package/node_modules/typebox/build/schema/engine/_guard.mjs +0 -26
- package/node_modules/typebox/build/schema/types/_guard.d.mts +0 -10
- package/node_modules/typebox/build/schema/types/_guard.mjs +0 -16
- package/node_modules/typebox/build/type/action/_optional.d.mts +0 -19
- package/node_modules/typebox/build/type/action/_optional.mjs +0 -40
- package/node_modules/typebox/build/type/action/_readonly.d.mts +0 -19
- package/node_modules/typebox/build/type/action/_readonly.mjs +0 -40
- package/node_modules/typebox/build/type/action/awaited.d.mts +0 -15
- package/node_modules/typebox/build/type/action/awaited.mjs +0 -15
- package/node_modules/typebox/build/type/action/options.d.mts +0 -11
- package/node_modules/typebox/build/type/action/options.mjs +0 -11
- package/node_modules/typebox/build/type/engine/awaited/instantiate.d.mts +0 -11
- package/node_modules/typebox/build/type/engine/awaited/instantiate.mjs +0 -20
- package/node_modules/typebox/build/type/engine/enum/enum_to_union.d.mts +0 -14
- package/node_modules/typebox/build/type/engine/enum/enum_to_union.mjs +0 -24
- package/node_modules/typebox/build/type/engine/options/index.d.mts +0 -1
- package/node_modules/typebox/build/type/engine/options/index.mjs +0 -1
- package/node_modules/typebox/build/type/engine/options/instantiate.d.mts +0 -8
- package/node_modules/typebox/build/type/extends/async_iterator.d.mts +0 -7
- package/node_modules/typebox/build/type/extends/async_iterator.mjs +0 -9
- package/node_modules/typebox/build/type/extends/iterator.d.mts +0 -7
- package/node_modules/typebox/build/type/extends/iterator.mjs +0 -9
- package/node_modules/typebox/build/type/extends/promise.d.mts +0 -7
- package/node_modules/typebox/build/type/extends/promise.mjs +0 -9
- package/node_modules/typebox/build/type/types/async_iterator.d.mts +0 -20
- package/node_modules/typebox/build/type/types/async_iterator.mjs +0 -28
- package/node_modules/typebox/build/type/types/base.d.mts +0 -50
- package/node_modules/typebox/build/type/types/base.mjs +0 -84
- package/node_modules/typebox/build/type/types/iterator.d.mts +0 -20
- package/node_modules/typebox/build/type/types/iterator.mjs +0 -28
- package/node_modules/typebox/build/type/types/promise.d.mts +0 -21
- package/node_modules/typebox/build/type/types/promise.mjs +0 -29
- package/node_modules/typebox/build/value/clean/from_base.d.mts +0 -2
- package/node_modules/typebox/build/value/clean/from_base.mjs +0 -4
- package/node_modules/typebox/build/value/convert/from_base.d.mts +0 -2
- package/node_modules/typebox/build/value/convert/from_base.mjs +0 -4
- package/node_modules/typebox/build/value/create/from_async_iterator.d.mts +0 -2
- package/node_modules/typebox/build/value/create/from_async_iterator.mjs +0 -5
- package/node_modules/typebox/build/value/create/from_base.d.mts +0 -2
- package/node_modules/typebox/build/value/create/from_base.mjs +0 -4
- package/node_modules/typebox/build/value/create/from_iterator.d.mts +0 -2
- package/node_modules/typebox/build/value/create/from_iterator.mjs +0 -5
- package/node_modules/typebox/build/value/create/from_promise.d.mts +0 -2
- package/node_modules/typebox/build/value/create/from_promise.mjs +0 -5
- package/node_modules/typebox/build/value/default/from_base.d.mts +0 -2
- package/node_modules/typebox/build/value/default/from_base.mjs +0 -5
- package/node_modules/typebox/build/value/mutate/error.d.mts +0 -3
- package/node_modules/typebox/build/value/mutate/error.mjs +0 -6
- package/node_modules/typebox/build/value/mutate/from_array.d.mts +0 -2
- package/node_modules/typebox/build/value/mutate/from_array.mjs +0 -16
- package/node_modules/typebox/build/value/mutate/from_object.d.mts +0 -2
- package/node_modules/typebox/build/value/mutate/from_object.mjs +0 -40
- package/node_modules/typebox/build/value/mutate/from_unknown.d.mts +0 -2
- package/node_modules/typebox/build/value/mutate/from_unknown.mjs +0 -7
- package/node_modules/typebox/build/value/mutate/from_value.d.mts +0 -2
- package/node_modules/typebox/build/value/mutate/from_value.mjs +0 -12
- package/node_modules/typebox/build/value/mutate/index.d.mts +0 -1
- package/node_modules/typebox/build/value/mutate/index.mjs +0 -1
- package/node_modules/typebox/build/value/mutate/mutate.d.mts +0 -11
- package/node_modules/typebox/build/value/mutate/mutate.mjs +0 -41
- package/node_modules/typebox/build/value/repair/from_base.d.mts +0 -2
- package/node_modules/typebox/build/value/repair/from_base.mjs +0 -8
- /package/node_modules/typebox/build/type/engine/{awaited → with}/index.d.mts +0 -0
- /package/node_modules/typebox/build/type/engine/{awaited → with}/index.mjs +0 -0
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
// deno-fmt-ignore-file
|
|
3
3
|
import { Deferred } from '../types/deferred.mjs';
|
|
4
4
|
import { ConditionalAction } from '../engine/conditional/instantiate.mjs';
|
|
5
|
+
import { State } from '../engine/instantiate.mjs';
|
|
5
6
|
/** Creates a deferred Conditional action. */
|
|
6
7
|
export function ConditionalDeferred(left, right, true_, false_, options = {}) {
|
|
7
8
|
return Deferred('Conditional', [left, right, true_, false_], options);
|
|
8
9
|
}
|
|
9
10
|
/** Applies a Conditional action to the given types. */
|
|
10
11
|
export function Conditional(left, right, true_, false_, options = {}) {
|
|
11
|
-
return ConditionalAction({},
|
|
12
|
+
return ConditionalAction({}, State([], []), left, right, true_, false_, options);
|
|
12
13
|
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export * from './
|
|
3
|
-
export * from './
|
|
1
|
+
export * from './_add_immutable.mjs';
|
|
2
|
+
export * from './_add_readonly.mjs';
|
|
3
|
+
export * from './_add_optional.mjs';
|
|
4
|
+
export * from './_remove_immutable.mjs';
|
|
5
|
+
export * from './_remove_readonly.mjs';
|
|
6
|
+
export * from './_remove_optional.mjs';
|
|
4
7
|
export * from './capitalize.mjs';
|
|
5
8
|
export * from './conditional.mjs';
|
|
6
9
|
export * from './constructor_parameters.mjs';
|
|
@@ -16,7 +19,6 @@ export * from './mapped.mjs';
|
|
|
16
19
|
export * from './module.mjs';
|
|
17
20
|
export * from './non_nullable.mjs';
|
|
18
21
|
export * from './omit.mjs';
|
|
19
|
-
export * from './options.mjs';
|
|
20
22
|
export * from './parameters.mjs';
|
|
21
23
|
export * from './partial.mjs';
|
|
22
24
|
export * from './pick.mjs';
|
|
@@ -25,3 +27,4 @@ export * from './required.mjs';
|
|
|
25
27
|
export * from './return_type.mjs';
|
|
26
28
|
export * from './uncapitalize.mjs';
|
|
27
29
|
export * from './uppercase.mjs';
|
|
30
|
+
export * from './with.mjs';
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export * from './
|
|
3
|
-
export * from './
|
|
1
|
+
export * from './_add_immutable.mjs';
|
|
2
|
+
export * from './_add_readonly.mjs';
|
|
3
|
+
export * from './_add_optional.mjs';
|
|
4
|
+
export * from './_remove_immutable.mjs';
|
|
5
|
+
export * from './_remove_readonly.mjs';
|
|
6
|
+
export * from './_remove_optional.mjs';
|
|
4
7
|
export * from './capitalize.mjs';
|
|
5
8
|
export * from './conditional.mjs';
|
|
6
9
|
export * from './constructor_parameters.mjs';
|
|
@@ -16,7 +19,6 @@ export * from './mapped.mjs';
|
|
|
16
19
|
export * from './module.mjs';
|
|
17
20
|
export * from './non_nullable.mjs';
|
|
18
21
|
export * from './omit.mjs';
|
|
19
|
-
export * from './options.mjs';
|
|
20
22
|
export * from './parameters.mjs';
|
|
21
23
|
export * from './partial.mjs';
|
|
22
24
|
export * from './pick.mjs';
|
|
@@ -25,3 +27,4 @@ export * from './required.mjs';
|
|
|
25
27
|
export * from './return_type.mjs';
|
|
26
28
|
export * from './uncapitalize.mjs';
|
|
27
29
|
export * from './uppercase.mjs';
|
|
30
|
+
export * from './with.mjs';
|
|
@@ -2,13 +2,12 @@ import { type TSchema, type TSchemaOptions } from '../types/schema.mjs';
|
|
|
2
2
|
import { type TIdentifier } from '../types/identifier.mjs';
|
|
3
3
|
import { type TDeferred } from '../types/deferred.mjs';
|
|
4
4
|
import { type TMappedAction } from '../engine/mapped/instantiate.mjs';
|
|
5
|
+
import { type TState } from '../engine/instantiate.mjs';
|
|
5
6
|
/** Creates a deferred Mapped action. */
|
|
6
7
|
export type TMappedDeferred<Identifier extends TIdentifier, Type extends TSchema, As extends TSchema, Property extends TSchema> = (TDeferred<'Mapped', [Identifier, Type, As, Property]>);
|
|
7
8
|
/** Creates a deferred Mapped action. */
|
|
8
9
|
export declare function MappedDeferred<Identifier extends TIdentifier, Type extends TSchema, As extends TSchema, Property extends TSchema>(identifier: Identifier, type: Type, as: As, property: Property, options?: TSchemaOptions): TMappedDeferred<Identifier, Type, As, Property>;
|
|
9
10
|
/** Applies a Mapped action using the given types. */
|
|
10
|
-
export type TMapped<Identifier extends TIdentifier, Type extends TSchema, As extends TSchema, Property extends TSchema> = (TMappedAction<{},
|
|
11
|
-
callstack: [];
|
|
12
|
-
}, Identifier, Type, As, Property>);
|
|
11
|
+
export type TMapped<Identifier extends TIdentifier, Type extends TSchema, As extends TSchema, Property extends TSchema> = (TMappedAction<{}, TState<[], []>, Identifier, Type, As, Property>);
|
|
13
12
|
/** Applies a Mapped action using the given types. */
|
|
14
13
|
export declare function Mapped<Identifier extends TIdentifier, Type extends TSchema, As extends TSchema, Property extends TSchema>(identifier: Identifier, type: Type, as: As, property: Property, options?: TSchemaOptions): TMapped<Identifier, Type, As, Property>;
|
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
// deno-fmt-ignore-file
|
|
3
3
|
import { Deferred } from '../types/deferred.mjs';
|
|
4
4
|
import { MappedAction } from '../engine/mapped/instantiate.mjs';
|
|
5
|
+
import { State } from '../engine/instantiate.mjs';
|
|
5
6
|
/** Creates a deferred Mapped action. */
|
|
6
7
|
export function MappedDeferred(identifier, type, as, property, options = {}) {
|
|
7
8
|
return Deferred('Mapped', [identifier, type, as, property], options);
|
|
8
9
|
}
|
|
9
10
|
/** Applies a Mapped action using the given types. */
|
|
10
11
|
export function Mapped(identifier, type, as, property, options = {}) {
|
|
11
|
-
return MappedAction({},
|
|
12
|
+
return MappedAction({}, State([], []), identifier, type, as, property, options);
|
|
12
13
|
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { type TSchemaOptions } from '../types/schema.mjs';
|
|
2
2
|
import { type TProperties } from '../types/properties.mjs';
|
|
3
3
|
import { type TDeferred } from '../types/deferred.mjs';
|
|
4
|
-
import { type
|
|
4
|
+
import { type TState } from '../engine/instantiate.mjs';
|
|
5
|
+
import { type TModuleInstantiate } from '../engine/module/instantiate.mjs';
|
|
5
6
|
/** Creates a deferred Module action. */
|
|
6
|
-
export type TModuleDeferred<
|
|
7
|
+
export type TModuleDeferred<Declarations extends TProperties> = (TDeferred<'Module', [Declarations]>);
|
|
7
8
|
/** Creates a deferred Module action. */
|
|
8
|
-
export declare function ModuleDeferred<
|
|
9
|
-
/**
|
|
10
|
-
export type TModule<
|
|
11
|
-
/**
|
|
12
|
-
export declare function Module<
|
|
9
|
+
export declare function ModuleDeferred<Declarations extends TProperties>(declarations: Declarations, options?: TSchemaOptions): TModuleDeferred<Declarations>;
|
|
10
|
+
/** Creates a Module with the given declarations */
|
|
11
|
+
export type TModule<Declarations extends TProperties> = (TModuleInstantiate<{}, TState<[], []>, Declarations>);
|
|
12
|
+
/** Creates a Module with the given declarations */
|
|
13
|
+
export declare function Module<Declarations extends TProperties>(declarations: Declarations, options?: TSchemaOptions): TModule<Declarations>;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
// deno-lint-ignore-file ban-types
|
|
2
2
|
// deno-fmt-ignore-file
|
|
3
3
|
import { Deferred } from '../types/deferred.mjs';
|
|
4
|
-
import {
|
|
4
|
+
import { State } from '../engine/instantiate.mjs';
|
|
5
|
+
import { ModuleInstantiate } from '../engine/module/instantiate.mjs';
|
|
5
6
|
/** Creates a deferred Module action. */
|
|
6
|
-
export function ModuleDeferred(
|
|
7
|
-
return Deferred('Module', [
|
|
7
|
+
export function ModuleDeferred(declarations, options = {}) {
|
|
8
|
+
return Deferred('Module', [declarations], options);
|
|
8
9
|
}
|
|
9
|
-
/**
|
|
10
|
-
export function Module(
|
|
11
|
-
return
|
|
10
|
+
/** Creates a Module with the given declarations */
|
|
11
|
+
export function Module(declarations, options = {}) {
|
|
12
|
+
return ModuleInstantiate({}, State([], []), declarations, options);
|
|
12
13
|
}
|
|
@@ -9,8 +9,3 @@ export declare function ReadonlyObjectDeferred<Type extends TSchema>(type: Type,
|
|
|
9
9
|
export type TReadonlyObject<Type extends TSchema> = (TReadonlyObjectAction<Type>);
|
|
10
10
|
/** This type is an alias for TypeScript's `Readonly<T>` utility type. It will make all properties of a TObject readonly or marks an TArray or TTuple as immutable `readonly T[]`. */
|
|
11
11
|
export declare function ReadonlyObject<Type extends TSchema>(type: Type, options?: TSchemaOptions): TReadonlyObject<Type>;
|
|
12
|
-
/**
|
|
13
|
-
* This type has been renamed to ReadonlyObject.
|
|
14
|
-
* @deprecated
|
|
15
|
-
*/
|
|
16
|
-
export declare const ReadonlyType: typeof ReadonlyObject;
|
|
@@ -9,8 +9,3 @@ export function ReadonlyObjectDeferred(type, options = {}) {
|
|
|
9
9
|
export function ReadonlyObject(type, options = {}) {
|
|
10
10
|
return ReadonlyObjectAction(type, options);
|
|
11
11
|
}
|
|
12
|
-
/**
|
|
13
|
-
* This type has been renamed to ReadonlyObject.
|
|
14
|
-
* @deprecated
|
|
15
|
-
*/
|
|
16
|
-
export const ReadonlyType = ReadonlyObject;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type TSchema } from '../types/schema.mjs';
|
|
2
|
+
import { type TDeferred } from '../types/deferred.mjs';
|
|
3
|
+
import { type TWithAction } from '../engine/with/instantiate.mjs';
|
|
4
|
+
/** Creates a deferred With action. */
|
|
5
|
+
export type TWithDeferred<Type extends TSchema, Options extends TSchema> = (TDeferred<'With', [Type, Options]>);
|
|
6
|
+
/** Creates a deferred With action. */
|
|
7
|
+
export declare function WithDeferred<Type extends TSchema, Options extends TSchema>(type: Type, options: Options): TWithDeferred<Type, Options>;
|
|
8
|
+
/** Applies annotation options to the given type. */
|
|
9
|
+
export type TWith<Type extends TSchema, Options extends TSchema> = (Type & Options);
|
|
10
|
+
/** Applies annotation options to the given type. */
|
|
11
|
+
export declare function With<Type extends TSchema, const Options extends TSchema>(type: Type, options: Options): TWithAction<Type, Options>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// deno-fmt-ignore-file
|
|
2
|
+
import { Deferred } from '../types/deferred.mjs';
|
|
3
|
+
import { WithAction } from '../engine/with/instantiate.mjs';
|
|
4
|
+
/** Creates a deferred With action. */
|
|
5
|
+
export function WithDeferred(type, options) {
|
|
6
|
+
return Deferred('With', [type, options], {});
|
|
7
|
+
}
|
|
8
|
+
/** Applies annotation options to the given type. */
|
|
9
|
+
export function With(type, options) {
|
|
10
|
+
return WithAction(type, options);
|
|
11
|
+
}
|
|
@@ -19,7 +19,7 @@ function BuildDistributionArray(parameters, names) {
|
|
|
19
19
|
return parameters.reduce((result, left) => [...result, names.includes(left.name)], []);
|
|
20
20
|
}
|
|
21
21
|
function ZipDistributionArray(arguments_, distributionArray, result = []) {
|
|
22
|
-
return Guard.
|
|
22
|
+
return Guard.ShiftLeft(arguments_, (argumentLeft, argumentRight) => Guard.ShiftLeft(distributionArray, (booleanLeft, booleanRight) => ZipDistributionArray(argumentRight, booleanRight, [...result, [booleanLeft, argumentLeft]]), () => result), () => result);
|
|
23
23
|
}
|
|
24
24
|
function Expand(type) {
|
|
25
25
|
return (IsUnion(type)
|
|
@@ -13,9 +13,7 @@ import { type TResolveTarget } from './resolve_target.mjs';
|
|
|
13
13
|
import { type TResolveArgumentsContext } from './resolve_arguments.mjs';
|
|
14
14
|
type TPeek<State extends TState, Result extends string = State['callstack'] extends [...infer _ extends string[], infer Top extends string] ? Top : ''> = Result;
|
|
15
15
|
type TIsTailCall<State extends TState, Name extends string, Result extends boolean = TPeek<State> extends Name ? true : false> = Result;
|
|
16
|
-
type TCallDispatch<Context extends TProperties, State extends TState, Target extends TRef, Parameters extends TParameter[], Expression extends TSchema, Arguments extends TSchema[], ArgumentsContext extends TProperties = TResolveArgumentsContext<Context, State, Parameters, Arguments>, ReturnType extends TSchema = TInstantiateType<ArgumentsContext,
|
|
17
|
-
callstack: [...State['callstack'], Target['$ref']];
|
|
18
|
-
}, Expression>> = TInstantiateType<Context, State, ReturnType>;
|
|
16
|
+
type TCallDispatch<Context extends TProperties, State extends TState, Target extends TRef, Parameters extends TParameter[], Expression extends TSchema, Arguments extends TSchema[], ArgumentsContext extends TProperties = TResolveArgumentsContext<Context, State, Parameters, Arguments>, ReturnType extends TSchema = TInstantiateType<ArgumentsContext, TState<[...State['callstack'], Target['$ref']], State['visited']>, Expression>> = TInstantiateType<ArgumentsContext, TState<[], []>, ReturnType>;
|
|
19
17
|
type TCallDistributed<Context extends TProperties, State extends TState, Target extends TRef, Parameters extends TParameter[], Expression extends TSchema, DistributedArguments extends TSchema[][], Result extends TSchema[] = []> = (DistributedArguments extends [infer Arguments extends TSchema[], ...infer DistributedArguments extends TSchema[][]] ? TCallDispatch<Context, State, Target, Parameters, Expression, Arguments> extends infer ReturnType extends TSchema ? TCallDistributed<Context, State, Target, Parameters, Expression, DistributedArguments, [...Result, ReturnType]> : never : Result);
|
|
20
18
|
type TCallImmediate<Context extends TProperties, State extends TState, Target extends TRef, Parameters extends TParameter[], Expression extends TSchema, InstantiatedArguments extends TSchema[], DistributedArguments extends TSchema[][] = TDistributeArguments<Parameters, InstantiatedArguments, Expression>, ReturnTypes extends TSchema[] = TCallDistributed<Context, State, Target, Parameters, Expression, DistributedArguments>, Result extends TSchema = ReturnTypes['length'] extends 1 ? ReturnTypes[0] : TEvaluateUnion<ReturnTypes>> = Result;
|
|
21
19
|
export type TCallInstantiate<Context extends TProperties, State extends TState, Target extends TSchema, Arguments extends TSchema[], InstantiatedArguments extends TSchema[] = TInstantiateTypes<Context, State, Arguments>, Resolved extends [string, TSchema] = TResolveTarget<Context, Target, Arguments>, Name extends string = Resolved[0], Type extends TSchema = Resolved[1], Result extends TSchema = (Type extends TGeneric<infer Parameters extends TParameter[], infer Expression extends TSchema> ? TIsTailCall<State, Name> extends true ? TCallConstruct<TRef<Name>, InstantiatedArguments> : TCallImmediate<Context, State, TRef<Name>, Parameters, Expression, InstantiatedArguments> : TCallConstruct<Target, InstantiatedArguments>)> = Result;
|
|
@@ -6,6 +6,7 @@ import { IsGeneric } from '../../types/generic.mjs';
|
|
|
6
6
|
import { EvaluateUnion } from '../evaluate/index.mjs';
|
|
7
7
|
import { InstantiateType } from '../instantiate.mjs';
|
|
8
8
|
import { InstantiateTypes } from '../instantiate.mjs';
|
|
9
|
+
import { State } from '../instantiate.mjs';
|
|
9
10
|
// ------------------------------------------------------------------
|
|
10
11
|
// Infrastructure
|
|
11
12
|
// ------------------------------------------------------------------
|
|
@@ -22,8 +23,8 @@ function IsTailCall(state, name) {
|
|
|
22
23
|
}
|
|
23
24
|
function CallDispatch(context, state, target, parameters, expression, arguments_) {
|
|
24
25
|
const argumentsContext = ResolveArgumentsContext(context, state, parameters, arguments_);
|
|
25
|
-
const returnType = InstantiateType(argumentsContext,
|
|
26
|
-
return InstantiateType(
|
|
26
|
+
const returnType = InstantiateType(argumentsContext, State([...state['callstack'], target['$ref']], state['visited']), expression);
|
|
27
|
+
return InstantiateType(argumentsContext, State([], []), returnType);
|
|
27
28
|
}
|
|
28
29
|
function CallDistributed(context, state, target, parameters, expression, distributedArguments) {
|
|
29
30
|
return distributedArguments.reduce((result, arguments_) => [...result, CallDispatch(context, state, target, parameters, expression, arguments_)], []);
|
|
@@ -23,10 +23,10 @@ function BindArgument(context, state, name, extends_, type) {
|
|
|
23
23
|
function BindArguments(context, state, parameterLeft, parameterRight, arguments_) {
|
|
24
24
|
const instantiatedExtends = InstantiateType(context, state, parameterLeft.extends);
|
|
25
25
|
const instantiatedEquals = InstantiateType(context, state, parameterLeft.equals);
|
|
26
|
-
return Guard.
|
|
26
|
+
return Guard.ShiftLeft(arguments_, (left, right) => BindParameters(BindArgument(context, state, parameterLeft['name'], instantiatedExtends, left), state, parameterRight, right), () => BindParameters(BindArgument(context, state, parameterLeft['name'], instantiatedExtends, instantiatedEquals), state, parameterRight, []));
|
|
27
27
|
}
|
|
28
28
|
function BindParameters(context, state, parameters, arguments_) {
|
|
29
|
-
return Guard.
|
|
29
|
+
return Guard.ShiftLeft(parameters, (left, right) => BindArguments(context, state, left, right, arguments_), () => context);
|
|
30
30
|
}
|
|
31
31
|
export function ResolveArgumentsContext(context, state, parameters, arguments_) {
|
|
32
32
|
return BindParameters(context, state, parameters, arguments_);
|
|
@@ -3,11 +3,10 @@ import { type TProperties } from '../../types/properties.mjs';
|
|
|
3
3
|
import { type TConstructor } from '../../types/constructor.mjs';
|
|
4
4
|
import { type TTuple } from '../../types/tuple.mjs';
|
|
5
5
|
import { type TConstructorParametersDeferred } from '../../action/constructor_parameters.mjs';
|
|
6
|
-
import { type
|
|
6
|
+
import { type TInstantiateType, type TCanInstantiate } from '../instantiate.mjs';
|
|
7
7
|
import { type TInstantiateElements } from '../instantiate.mjs';
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}, Parameters>, Result extends TSchema = TTuple<InstantiatedParameters>> = Result;
|
|
8
|
+
import { type TState } from '../instantiate.mjs';
|
|
9
|
+
type TConstructorParametersOperation<Type extends TSchema, Parameters extends TSchema[] = Type extends TConstructor ? Type['parameters'] : [], InstantiatedParameters extends TSchema[] = TInstantiateElements<{}, TState<[], []>, Parameters>, Result extends TSchema = TTuple<InstantiatedParameters>> = Result;
|
|
11
10
|
export type TConstructorParametersAction<Type extends TSchema, Result extends TSchema = TCanInstantiate<[Type]> extends true ? TConstructorParametersOperation<Type> : TConstructorParametersDeferred<Type>> = Result;
|
|
12
11
|
export declare function ConstructorParametersAction<Type extends TSchema>(type: Type, options: TSchemaOptions): TConstructorParametersAction<Type>;
|
|
13
12
|
export type TConstructorParametersInstantiate<Context extends TProperties, State extends TState, Type extends TSchema, InstantiatedType extends TSchema = TInstantiateType<Context, State, Type>> = TConstructorParametersAction<InstantiatedType>;
|
|
@@ -6,9 +6,10 @@ import { Tuple } from '../../types/tuple.mjs';
|
|
|
6
6
|
import { ConstructorParametersDeferred } from '../../action/constructor_parameters.mjs';
|
|
7
7
|
import { InstantiateType, CanInstantiate } from '../instantiate.mjs';
|
|
8
8
|
import { InstantiateElements } from '../instantiate.mjs';
|
|
9
|
+
import { State } from '../instantiate.mjs';
|
|
9
10
|
function ConstructorParametersOperation(type) {
|
|
10
11
|
const parameters = IsConstructor(type) ? type['parameters'] : [];
|
|
11
|
-
const instantiatedParameters = InstantiateElements({},
|
|
12
|
+
const instantiatedParameters = InstantiateElements({}, State([], []), parameters);
|
|
12
13
|
const result = Tuple(instantiatedParameters);
|
|
13
14
|
return result;
|
|
14
15
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { type TUnreachable } from '../../../system/unreachable/index.mjs';
|
|
2
1
|
import { type TProperties, type TPropertyKeys } from '../../types/properties.mjs';
|
|
3
2
|
import { type TCyclicCheck } from './check.mjs';
|
|
4
|
-
type TResolveCandidateKeys<Context extends TProperties, Keys extends
|
|
3
|
+
type TResolveCandidateKeys<Context extends TProperties, Keys extends (keyof Context)[], Result extends (keyof Context)[] = []> = (Keys extends [infer Left extends keyof Context, ...infer Right extends (keyof Context)[]] ? TCyclicCheck<[Left], Context, Context[Left]> extends true ? TResolveCandidateKeys<Context, Right, [...Result, Left]> : TResolveCandidateKeys<Context, Right, Result> : Result);
|
|
5
4
|
/** Returns keys for context types that need to be transformed to TCyclic. */
|
|
6
|
-
export type TCyclicCandidates<Context extends TProperties, Keys extends
|
|
5
|
+
export type TCyclicCandidates<Context extends TProperties, Keys extends (keyof Context)[] = TPropertyKeys<Context>, Result extends (keyof Context)[] = TResolveCandidateKeys<Context, Keys>> = Result;
|
|
7
6
|
/** Returns keys for context types that need to be transformed to TCyclic. */
|
|
8
7
|
export declare function CyclicCandidates<Context extends TProperties>(context: Context): TCyclicCandidates<Context>;
|
|
9
8
|
export {};
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
// deno-fmt-ignore-file
|
|
2
|
-
import { Unreachable } from '../../../system/unreachable/index.mjs';
|
|
3
2
|
import { PropertyKeys } from '../../types/properties.mjs';
|
|
4
3
|
import { CyclicCheck } from './check.mjs';
|
|
5
4
|
function ResolveCandidateKeys(context, keys) {
|
|
6
5
|
return keys.reduce((result, left) => {
|
|
7
|
-
return left
|
|
8
|
-
?
|
|
9
|
-
|
|
10
|
-
: result
|
|
11
|
-
: Unreachable();
|
|
6
|
+
return CyclicCheck([left], context, context[left])
|
|
7
|
+
? [...result, left]
|
|
8
|
+
: result;
|
|
12
9
|
}, []);
|
|
13
10
|
}
|
|
14
11
|
/** Returns keys for context types that need to be transformed to TCyclic. */
|
|
@@ -1,24 +1,21 @@
|
|
|
1
1
|
import { type TSchema } from '../../types/schema.mjs';
|
|
2
2
|
import { type TArray } from '../../types/array.mjs';
|
|
3
|
-
import { type TAsyncIterator } from '../../types/async_iterator.mjs';
|
|
4
3
|
import { type TConstructor } from '../../types/constructor.mjs';
|
|
5
4
|
import { type TFunction } from '../../types/function.mjs';
|
|
6
5
|
import { type TIntersect } from '../../types/intersect.mjs';
|
|
7
|
-
import { type TIterator } from '../../types/iterator.mjs';
|
|
8
6
|
import { type TObject } from '../../types/object.mjs';
|
|
9
|
-
import { type TPromise } from '../../types/promise.mjs';
|
|
10
7
|
import { type TProperties, type TPropertyValues } from '../../types/properties.mjs';
|
|
11
8
|
import { type TRecord } from '../../types/record.mjs';
|
|
12
9
|
import { type TTuple } from '../../types/tuple.mjs';
|
|
13
10
|
import { type TUnion } from '../../types/union.mjs';
|
|
14
11
|
import { type TRef } from '../../types/ref.mjs';
|
|
15
12
|
import { type TInterfaceDeferred } from '../../action/interface.mjs';
|
|
16
|
-
type TFromRef<Stack extends
|
|
17
|
-
type TFromProperties<Stack extends
|
|
18
|
-
type TFromTypes<Stack extends
|
|
19
|
-
type TFromType<Stack extends
|
|
13
|
+
type TFromRef<Stack extends (keyof Context)[], Context extends TProperties, Ref extends (keyof Context)> = Ref extends Stack[number] ? true : TFromType<[...Stack, Ref], Context, Context[Ref]>;
|
|
14
|
+
type TFromProperties<Stack extends (keyof Context)[], Context extends TProperties, Properties extends TProperties, Types extends TSchema[] = TPropertyValues<Properties>> = TFromTypes<Stack, Context, Types>;
|
|
15
|
+
type TFromTypes<Stack extends (keyof Context)[], Context extends TProperties, Types extends TSchema[]> = Types extends [infer Left extends TSchema, ...infer Right extends TSchema[]] ? TFromType<Stack, Context, Left> extends true ? true : TFromTypes<Stack, Context, Right> : false;
|
|
16
|
+
type TFromType<Stack extends (keyof Context)[], Context extends TProperties, Type extends TSchema> = (Type extends TRef<infer Ref extends string> ? TFromRef<Stack, Context, Ref> : Type extends TArray<infer Type extends TSchema> ? TFromType<Stack, Context, Type> : Type extends TConstructor<infer Parameters extends TSchema[], infer InstanceType extends TSchema> ? TFromTypes<Stack, Context, [...Parameters, InstanceType]> : Type extends TFunction<infer Parameters extends TSchema[], infer ReturnType extends TSchema> ? TFromTypes<Stack, Context, [...Parameters, ReturnType]> : Type extends TInterfaceDeferred<TSchema[], infer Properties extends TProperties> ? TFromProperties<Stack, Context, Properties> : Type extends TIntersect<infer Types extends TSchema[]> ? TFromTypes<Stack, Context, Types> : Type extends TObject<infer Properties extends TProperties> ? TFromProperties<Stack, Context, Properties> : Type extends TUnion<infer Types extends TSchema[]> ? TFromTypes<Stack, Context, Types> : Type extends TTuple<infer Types extends TSchema[]> ? TFromTypes<Stack, Context, Types> : Type extends TRecord<string, infer Type extends TSchema> ? TFromType<Stack, Context, Type> : false);
|
|
20
17
|
/** Performs a cyclic check on the given type. Initial key stack can be empty, but faster if specified */
|
|
21
|
-
export type TCyclicCheck<Stack extends
|
|
18
|
+
export type TCyclicCheck<Stack extends (keyof Context)[], Context extends TProperties, Type extends TSchema, Result extends boolean = TFromType<Stack, Context, Type>> = Result;
|
|
22
19
|
/** Performs a cyclic check on the given type. Initial key stack can be empty, but faster if specified */
|
|
23
|
-
export declare function CyclicCheck<Stack extends
|
|
20
|
+
export declare function CyclicCheck<Stack extends (keyof Context)[], Context extends TProperties, Type extends TSchema>(stack: [...Stack], context: Context, type: Type): TCyclicCheck<Stack, Context, Type>;
|
|
24
21
|
export {};
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
// deno-fmt-ignore-file
|
|
2
2
|
import { Guard } from '../../../guard/index.mjs';
|
|
3
3
|
import { IsArray } from '../../types/array.mjs';
|
|
4
|
-
import { IsAsyncIterator } from '../../types/async_iterator.mjs';
|
|
5
4
|
import { IsConstructor } from '../../types/constructor.mjs';
|
|
6
5
|
import { IsFunction } from '../../types/function.mjs';
|
|
7
6
|
import { IsIntersect } from '../../types/intersect.mjs';
|
|
8
|
-
import { IsIterator } from '../../types/iterator.mjs';
|
|
9
7
|
import { IsObject } from '../../types/object.mjs';
|
|
10
|
-
import { IsPromise } from '../../types/promise.mjs';
|
|
11
8
|
import { PropertyValues } from '../../types/properties.mjs';
|
|
12
9
|
import { IsRecord, RecordValue } from '../../types/record.mjs';
|
|
13
10
|
import { IsTuple } from '../../types/tuple.mjs';
|
|
@@ -24,25 +21,22 @@ function FromProperties(stack, context, properties) {
|
|
|
24
21
|
return FromTypes(stack, context, types);
|
|
25
22
|
}
|
|
26
23
|
function FromTypes(stack, context, types) {
|
|
27
|
-
return Guard.
|
|
24
|
+
return Guard.ShiftLeft(types, (left, right) => FromType(stack, context, left)
|
|
28
25
|
? true
|
|
29
26
|
: FromTypes(stack, context, right), () => false);
|
|
30
27
|
}
|
|
31
28
|
function FromType(stack, context, type) {
|
|
32
29
|
return (IsRef(type) ? FromRef(stack, context, type.$ref) :
|
|
33
30
|
IsArray(type) ? FromType(stack, context, type.items) :
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
IsTuple(type) ? FromTypes(stack, context, type.items) :
|
|
44
|
-
IsRecord(type) ? FromType(stack, context, RecordValue(type)) :
|
|
45
|
-
false);
|
|
31
|
+
IsConstructor(type) ? FromTypes(stack, context, [...type.parameters, type.instanceType]) :
|
|
32
|
+
IsFunction(type) ? FromTypes(stack, context, [...type.parameters, type.returnType]) :
|
|
33
|
+
IsInterfaceDeferred(type) ? FromProperties(stack, context, type.parameters[1]) :
|
|
34
|
+
IsIntersect(type) ? FromTypes(stack, context, type.allOf) :
|
|
35
|
+
IsObject(type) ? FromProperties(stack, context, type.properties) :
|
|
36
|
+
IsUnion(type) ? FromTypes(stack, context, type.anyOf) :
|
|
37
|
+
IsTuple(type) ? FromTypes(stack, context, type.items) :
|
|
38
|
+
IsRecord(type) ? FromType(stack, context, RecordValue(type)) :
|
|
39
|
+
false);
|
|
46
40
|
}
|
|
47
41
|
/** Performs a cyclic check on the given type. Initial key stack can be empty, but faster if specified */
|
|
48
42
|
export function CyclicCheck(stack, context, type) {
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import { type TUnreachable } from '../../../system/unreachable/index.mjs';
|
|
2
2
|
import { type TSchema } from '../../types/schema.mjs';
|
|
3
3
|
import { type TArray } from '../../types/array.mjs';
|
|
4
|
-
import { type TAsyncIterator } from '../../types/async_iterator.mjs';
|
|
5
4
|
import { type TConstructor } from '../../types/constructor.mjs';
|
|
6
5
|
import { type TFunction } from '../../types/function.mjs';
|
|
7
6
|
import { type TIntersect } from '../../types/intersect.mjs';
|
|
8
|
-
import { type TIterator } from '../../types/iterator.mjs';
|
|
9
7
|
import { type TObject } from '../../types/object.mjs';
|
|
10
|
-
import { type TPromise } from '../../types/promise.mjs';
|
|
11
8
|
import { type TProperties, type TPropertyValues } from '../../types/properties.mjs';
|
|
12
9
|
import { type TRecord } from '../../types/record.mjs';
|
|
13
10
|
import { type TTuple } from '../../types/tuple.mjs';
|
|
@@ -17,7 +14,7 @@ import { type TInterfaceDeferred } from '../../action/interface.mjs';
|
|
|
17
14
|
type TFromRef<Context extends TProperties, Ref extends string, Dependencies extends string[]> = Ref extends Dependencies[number] ? Dependencies : Ref extends keyof Context ? TFromType<Context, Context[Ref], [...Dependencies, Ref]> : TUnreachable;
|
|
18
15
|
type TFromProperties<Context extends TProperties, Properties extends TProperties, Dependencies extends string[], Types extends TSchema[] = TPropertyValues<Properties>> = TFromTypes<Context, Types, Dependencies>;
|
|
19
16
|
type TFromTypes<Context extends TProperties, Types extends TSchema[], Dependencies extends string[]> = Types extends [infer Left extends TSchema, ...infer Right extends TSchema[]] ? TFromTypes<Context, Right, TFromType<Context, Left, Dependencies>> : Dependencies;
|
|
20
|
-
type TFromType<Context extends TProperties, Type extends TSchema, Result extends string[]> = (Type extends TRef<infer Ref extends string> ? TFromRef<Context, Ref, Result> : Type extends TArray<infer Type extends TSchema> ? TFromType<Context, Type, Result> : Type extends
|
|
17
|
+
type TFromType<Context extends TProperties, Type extends TSchema, Result extends string[]> = (Type extends TRef<infer Ref extends string> ? TFromRef<Context, Ref, Result> : Type extends TArray<infer Type extends TSchema> ? TFromType<Context, Type, Result> : Type extends TConstructor<infer Parameters extends TSchema[], infer InstanceType extends TSchema> ? TFromTypes<Context, [...Parameters, InstanceType], Result> : Type extends TFunction<infer Parameters extends TSchema[], infer ReturnType extends TSchema> ? TFromTypes<Context, [...Parameters, ReturnType], Result> : Type extends TInterfaceDeferred<TSchema[], infer Properties extends TProperties> ? TFromProperties<Context, Properties, Result> : Type extends TIntersect<infer Types extends TSchema[]> ? TFromTypes<Context, Types, Result> : Type extends TObject<infer Properties extends TProperties> ? TFromProperties<Context, Properties, Result> : Type extends TUnion<infer Types extends TSchema[]> ? TFromTypes<Context, Types, Result> : Type extends TTuple<infer Types extends TSchema[]> ? TFromTypes<Context, Types, Result> : Type extends TRecord<string, infer Type extends TSchema> ? TFromType<Context, Type, Result> : Result);
|
|
21
18
|
/** Returns dependent cyclic keys for the given type. This function is used to dead-type-eliminate (DTE) for initializing TCyclic types. */
|
|
22
19
|
export type TCyclicDependencies<Context extends TProperties, Key extends string, Type extends TSchema, Result extends string[] = TFromType<Context, Type, [Key]>> = Result;
|
|
23
20
|
/** Returns dependent cyclic keys for the given type. This function is used to dead-type-eliminate (DTE) for initializing TCyclic types. */
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
// deno-fmt-ignore-file
|
|
2
2
|
import { Unreachable } from '../../../system/unreachable/index.mjs';
|
|
3
3
|
import { IsArray } from '../../types/array.mjs';
|
|
4
|
-
import { IsAsyncIterator } from '../../types/async_iterator.mjs';
|
|
5
4
|
import { IsConstructor } from '../../types/constructor.mjs';
|
|
6
5
|
import { IsFunction } from '../../types/function.mjs';
|
|
7
6
|
import { IsIntersect } from '../../types/intersect.mjs';
|
|
8
|
-
import { IsIterator } from '../../types/iterator.mjs';
|
|
9
7
|
import { IsObject } from '../../types/object.mjs';
|
|
10
|
-
import { IsPromise } from '../../types/promise.mjs';
|
|
11
8
|
import { PropertyValues } from '../../types/properties.mjs';
|
|
12
9
|
import { IsRecord, RecordValue } from '../../types/record.mjs';
|
|
13
10
|
import { IsTuple } from '../../types/tuple.mjs';
|
|
@@ -33,18 +30,15 @@ function FromTypes(context, types, result) {
|
|
|
33
30
|
function FromType(context, type, result) {
|
|
34
31
|
return (IsRef(type) ? FromRef(context, type.$ref, result) :
|
|
35
32
|
IsArray(type) ? FromType(context, type.items, result) :
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
IsTuple(type) ? FromTypes(context, type.items, result) :
|
|
46
|
-
IsRecord(type) ? FromType(context, RecordValue(type), result) :
|
|
47
|
-
result);
|
|
33
|
+
IsConstructor(type) ? FromTypes(context, [...type.parameters, type.instanceType], result) :
|
|
34
|
+
IsFunction(type) ? FromTypes(context, [...type.parameters, type.returnType], result) :
|
|
35
|
+
IsInterfaceDeferred(type) ? FromProperties(context, type.parameters[1], result) :
|
|
36
|
+
IsIntersect(type) ? FromTypes(context, type.allOf, result) :
|
|
37
|
+
IsObject(type) ? FromProperties(context, type.properties, result) :
|
|
38
|
+
IsUnion(type) ? FromTypes(context, type.anyOf, result) :
|
|
39
|
+
IsTuple(type) ? FromTypes(context, type.items, result) :
|
|
40
|
+
IsRecord(type) ? FromType(context, RecordValue(type), result) :
|
|
41
|
+
result);
|
|
48
42
|
}
|
|
49
43
|
/** Returns dependent cyclic keys for the given type. This function is used to dead-type-eliminate (DTE) for initializing TCyclic types. */
|
|
50
44
|
export function CyclicDependencies(context, key, type) {
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import { type TSchema } from '../../types/schema.mjs';
|
|
2
2
|
import { type TAny } from '../../types/any.mjs';
|
|
3
3
|
import { type TArray } from '../../types/array.mjs';
|
|
4
|
-
import { type TAsyncIterator } from '../../types/async_iterator.mjs';
|
|
5
4
|
import { type TConstructor } from '../../types/constructor.mjs';
|
|
6
5
|
import { type TCyclic } from '../../types/cyclic.mjs';
|
|
7
6
|
import { type TFunction } from '../../types/function.mjs';
|
|
8
7
|
import { type TIntersect } from '../../types/intersect.mjs';
|
|
9
|
-
import { type TIterator } from '../../types/iterator.mjs';
|
|
10
8
|
import { type TObject } from '../../types/object.mjs';
|
|
11
|
-
import { type TPromise } from '../../types/promise.mjs';
|
|
12
9
|
import { type TProperties } from '../../types/properties.mjs';
|
|
13
10
|
import { type TRecord } from '../../types/record.mjs';
|
|
14
11
|
import { type TRef } from '../../types/ref.mjs';
|
|
@@ -22,7 +19,7 @@ type TFromProperties<Properties extends TProperties, Result extends TProperties
|
|
|
22
19
|
[Key in keyof Result]: Result[Key];
|
|
23
20
|
};
|
|
24
21
|
type TFromTypes<Types extends TSchema[], Result extends TSchema[] = []> = Types extends [infer Left extends TSchema, ...infer Right extends TSchema[]] ? TFromTypes<Right, [...Result, TFromType<Left>]> : Result;
|
|
25
|
-
type TFromType<Type extends TSchema> = (Type extends TRef<infer Ref extends string> ? TFromRef<Ref> : Type extends TArray<infer Type extends TSchema> ? TArray<TFromType<Type>> : Type extends
|
|
22
|
+
type TFromType<Type extends TSchema> = (Type extends TRef<infer Ref extends string> ? TFromRef<Ref> : Type extends TArray<infer Type extends TSchema> ? TArray<TFromType<Type>> : Type extends TConstructor<infer Parameters extends TSchema[], infer InstanceType extends TSchema> ? TFunction<TFromTypes<Parameters>, TFromType<InstanceType>> : Type extends TFunction<infer Parameters extends TSchema[], infer ReturnType extends TSchema> ? TFunction<TFromTypes<Parameters>, TFromType<ReturnType>> : Type extends TIntersect<infer Types extends TSchema[]> ? TIntersect<TFromTypes<Types>> : Type extends TObject<infer Properties extends TProperties> ? TObject<TFromProperties<Properties>> : Type extends TRecord<infer Pattern extends string, infer Value extends TSchema> ? TRecord<Pattern, TFromType<Value>> : Type extends TUnion<infer Types extends TSchema[]> ? TUnion<TFromTypes<Types>> : Type extends TTuple<infer Types extends TSchema[]> ? TTuple<TFromTypes<Types>> : Type);
|
|
26
23
|
type TCyclicAnyFromParameters<Defs extends TProperties, Ref extends string> = (Ref extends keyof Defs ? TFromType<Defs[Ref]> : TUnknown);
|
|
27
24
|
/** Transforms TCyclic TRef's into TAny's. This function is used prior to TExtends checks to enable cyclics to be structurally checked and terminated (with TAny) at first point of recursion, what would otherwise be a recursive TRef.*/
|
|
28
25
|
export type TCyclicExtends<Type extends TCyclic, Result extends TSchema = TCyclicAnyFromParameters<Type['$defs'], Type['$ref']>> = Result;
|
|
@@ -2,13 +2,10 @@
|
|
|
2
2
|
import { Guard } from '../../../guard/index.mjs';
|
|
3
3
|
import { Any } from '../../types/any.mjs';
|
|
4
4
|
import { Array as _Array_, IsArray, ArrayOptions } from '../../types/array.mjs';
|
|
5
|
-
import { AsyncIterator, IsAsyncIterator } from '../../types/async_iterator.mjs';
|
|
6
5
|
import { Constructor, IsConstructor } from '../../types/constructor.mjs';
|
|
7
6
|
import { Function as _Function_, IsFunction } from '../../types/function.mjs';
|
|
8
7
|
import { Intersect, IsIntersect } from '../../types/intersect.mjs';
|
|
9
|
-
import { Iterator, IsIterator } from '../../types/iterator.mjs';
|
|
10
8
|
import { Object, IsObject } from '../../types/object.mjs';
|
|
11
|
-
import { Promise, IsPromise } from '../../types/promise.mjs';
|
|
12
9
|
import { IsRecord, Record, RecordKey, RecordValue } from '../../types/record.mjs';
|
|
13
10
|
import { IsRef } from '../../types/ref.mjs';
|
|
14
11
|
import { Tuple, IsTuple } from '../../types/tuple.mjs';
|
|
@@ -30,17 +27,14 @@ function FromTypes(types) {
|
|
|
30
27
|
function FromType(type) {
|
|
31
28
|
return (IsRef(type) ? FromRef(type.$ref) :
|
|
32
29
|
IsArray(type) ? _Array_(FromType(type.items), ArrayOptions(type)) :
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
IsUnion(type) ? Union(FromTypes(type.anyOf)) :
|
|
42
|
-
IsTuple(type) ? Tuple(FromTypes(type.items)) :
|
|
43
|
-
type);
|
|
30
|
+
IsConstructor(type) ? Constructor(FromTypes(type.parameters), FromType(type.instanceType)) :
|
|
31
|
+
IsFunction(type) ? _Function_(FromTypes(type.parameters), FromType(type.returnType)) :
|
|
32
|
+
IsIntersect(type) ? Intersect(FromTypes(type.allOf)) :
|
|
33
|
+
IsObject(type) ? Object(FromProperties(type.properties)) :
|
|
34
|
+
IsRecord(type) ? Record(RecordKey(type), FromType(RecordValue(type))) :
|
|
35
|
+
IsUnion(type) ? Union(FromTypes(type.anyOf)) :
|
|
36
|
+
IsTuple(type) ? Tuple(FromTypes(type.items)) :
|
|
37
|
+
type);
|
|
44
38
|
}
|
|
45
39
|
function CyclicAnyFromParameters(defs, ref) {
|
|
46
40
|
return (ref in defs
|
|
@@ -6,12 +6,9 @@ import { type TCyclicDependencies } from '../cyclic/dependencies.mjs';
|
|
|
6
6
|
import { type TInterfaceDeferred } from '../../action/index.mjs';
|
|
7
7
|
import { type TInstantiateProperties } from '../instantiate.mjs';
|
|
8
8
|
import { type TInstantiateTypes } from '../instantiate.mjs';
|
|
9
|
+
import { type TState } from '../instantiate.mjs';
|
|
9
10
|
import { type TEvaluateIntersect } from '../evaluate/evaluate.mjs';
|
|
10
|
-
type TCyclicInterface<Context extends TProperties, Heritage extends TSchema[], Properties extends TProperties, InstantiatedHeritage extends TSchema[] = TInstantiateTypes<Context, {
|
|
11
|
-
callstack: [];
|
|
12
|
-
}, Heritage>, instantiatedProperties extends TProperties = TInstantiateProperties<{}, {
|
|
13
|
-
callstack: [];
|
|
14
|
-
}, Properties>, EvaluatedInterface extends TSchema = TEvaluateIntersect<[...InstantiatedHeritage, TObject<instantiatedProperties>]>> = EvaluatedInterface;
|
|
11
|
+
type TCyclicInterface<Context extends TProperties, Heritage extends TSchema[], Properties extends TProperties, InstantiatedHeritage extends TSchema[] = TInstantiateTypes<Context, TState<[], []>, Heritage>, instantiatedProperties extends TProperties = TInstantiateProperties<{}, TState<[], []>, Properties>, EvaluatedInterface extends TSchema = TEvaluateIntersect<[...InstantiatedHeritage, TObject<instantiatedProperties>]>> = EvaluatedInterface;
|
|
15
12
|
type TCyclicDefinitions<Context extends TProperties, Dependencies extends string[], Result extends TProperties = {
|
|
16
13
|
[Key in Extract<keyof Context, Dependencies[number]>]: Context[Key] extends TInterfaceDeferred<infer Heritage extends TSchema[], infer Properties extends TProperties> ? TCyclicInterface<Context, Heritage, Properties> : Context[Key];
|
|
17
14
|
}> = Result;
|
|
@@ -7,10 +7,11 @@ import { CyclicDependencies } from '../cyclic/dependencies.mjs';
|
|
|
7
7
|
import { IsInterfaceDeferred } from '../../action/index.mjs';
|
|
8
8
|
import { InstantiateProperties } from '../instantiate.mjs';
|
|
9
9
|
import { InstantiateTypes } from '../instantiate.mjs';
|
|
10
|
+
import { State } from '../instantiate.mjs';
|
|
10
11
|
import { EvaluateIntersect } from '../evaluate/evaluate.mjs';
|
|
11
12
|
function CyclicInterface(context, heritage, properties) {
|
|
12
|
-
const instantiatedHeritage = InstantiateTypes(context,
|
|
13
|
-
const instantiatedProperties = InstantiateProperties({},
|
|
13
|
+
const instantiatedHeritage = InstantiateTypes(context, State([], []), heritage);
|
|
14
|
+
const instantiatedProperties = InstantiateProperties({}, State([], []), properties);
|
|
14
15
|
const evaluatedInterface = EvaluateIntersect([...instantiatedHeritage, Object(instantiatedProperties)]);
|
|
15
16
|
return evaluatedInterface;
|
|
16
17
|
}
|