@tsonic/frontend 0.0.62 → 0.0.64
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/.tsbuildinfo +1 -1
- package/dist/dependency-graph.d.ts +1 -1
- package/dist/dependency-graph.d.ts.map +1 -1
- package/dist/dependency-graph.js +1 -1
- package/dist/dependency-graph.js.map +1 -1
- package/dist/dotnet-metadata.d.ts +0 -12
- package/dist/dotnet-metadata.d.ts.map +1 -1
- package/dist/dotnet-metadata.js +0 -24
- package/dist/dotnet-metadata.js.map +1 -1
- package/dist/generic-function-values.d.ts +11 -0
- package/dist/generic-function-values.d.ts.map +1 -0
- package/dist/generic-function-values.js +243 -0
- package/dist/generic-function-values.js.map +1 -0
- package/dist/generic-function-values.test.d.ts +2 -0
- package/dist/generic-function-values.test.d.ts.map +1 -0
- package/dist/generic-function-values.test.js +256 -0
- package/dist/generic-function-values.test.js.map +1 -0
- package/dist/graph/extraction/imports.d.ts +5 -0
- package/dist/graph/extraction/imports.d.ts.map +1 -1
- package/dist/graph/extraction/imports.js +39 -1
- package/dist/graph/extraction/imports.js.map +1 -1
- package/dist/graph/extraction/index.d.ts +1 -1
- package/dist/graph/extraction/index.d.ts.map +1 -1
- package/dist/graph/extraction/index.js +1 -1
- package/dist/graph/extraction/index.js.map +1 -1
- package/dist/graph/extraction/orchestrator.d.ts.map +1 -1
- package/dist/graph/extraction/orchestrator.js +16 -2
- package/dist/graph/extraction/orchestrator.js.map +1 -1
- package/dist/graph/extraction.d.ts +1 -1
- package/dist/graph/extraction.d.ts.map +1 -1
- package/dist/graph/extraction.js +1 -1
- package/dist/graph/extraction.js.map +1 -1
- package/dist/ir/binding/binding-factory.d.ts +17 -0
- package/dist/ir/binding/binding-factory.d.ts.map +1 -0
- package/dist/ir/binding/binding-factory.js +765 -0
- package/dist/ir/binding/binding-factory.js.map +1 -0
- package/dist/ir/binding/binding-helpers.d.ts +90 -0
- package/dist/ir/binding/binding-helpers.d.ts.map +1 -0
- package/dist/ir/binding/binding-helpers.js +387 -0
- package/dist/ir/binding/binding-helpers.js.map +1 -0
- package/dist/ir/binding/binding-types.d.ts +203 -0
- package/dist/ir/binding/binding-types.d.ts.map +1 -0
- package/dist/ir/binding/binding-types.js +9 -0
- package/dist/ir/binding/binding-types.js.map +1 -0
- package/dist/ir/binding/index.d.ts +4 -158
- package/dist/ir/binding/index.d.ts.map +1 -1
- package/dist/ir/binding/index.js +3 -1134
- package/dist/ir/binding/index.js.map +1 -1
- package/dist/ir/binding-resolution.test.js +248 -0
- package/dist/ir/binding-resolution.test.js.map +1 -1
- package/dist/ir/builder/imports.d.ts.map +1 -1
- package/dist/ir/builder/imports.js +8 -1
- package/dist/ir/builder/imports.js.map +1 -1
- package/dist/ir/builder.test.js +360 -0
- package/dist/ir/builder.test.js.map +1 -1
- package/dist/ir/converters/anonymous-synthesis.d.ts +3 -3
- package/dist/ir/converters/anonymous-synthesis.d.ts.map +1 -1
- package/dist/ir/converters/anonymous-synthesis.js +45 -8
- package/dist/ir/converters/anonymous-synthesis.js.map +1 -1
- package/dist/ir/converters/expressions/access/access-converter.d.ts +14 -0
- package/dist/ir/converters/expressions/access/access-converter.d.ts.map +1 -0
- package/dist/ir/converters/expressions/access/access-converter.js +141 -0
- package/dist/ir/converters/expressions/access/access-converter.js.map +1 -0
- package/dist/ir/converters/expressions/access/binding-resolution.d.ts +35 -0
- package/dist/ir/converters/expressions/access/binding-resolution.d.ts.map +1 -0
- package/dist/ir/converters/expressions/access/binding-resolution.js +447 -0
- package/dist/ir/converters/expressions/access/binding-resolution.js.map +1 -0
- package/dist/ir/converters/expressions/access/member-resolution.d.ts +67 -0
- package/dist/ir/converters/expressions/access/member-resolution.d.ts.map +1 -0
- package/dist/ir/converters/expressions/access/member-resolution.js +262 -0
- package/dist/ir/converters/expressions/access/member-resolution.js.map +1 -0
- package/dist/ir/converters/expressions/access.d.ts +1 -7
- package/dist/ir/converters/expressions/access.d.ts.map +1 -1
- package/dist/ir/converters/expressions/access.js +1 -720
- package/dist/ir/converters/expressions/access.js.map +1 -1
- package/dist/ir/converters/expressions/calls/call-converter.d.ts +23 -0
- package/dist/ir/converters/expressions/calls/call-converter.d.ts.map +1 -0
- package/dist/ir/converters/expressions/calls/call-converter.js +526 -0
- package/dist/ir/converters/expressions/calls/call-converter.js.map +1 -0
- package/dist/ir/converters/expressions/calls/call-site-analysis.d.ts +53 -0
- package/dist/ir/converters/expressions/calls/call-site-analysis.d.ts.map +1 -0
- package/dist/ir/converters/expressions/calls/call-site-analysis.js +554 -0
- package/dist/ir/converters/expressions/calls/call-site-analysis.js.map +1 -0
- package/dist/ir/converters/expressions/calls/new-converter.d.ts +21 -0
- package/dist/ir/converters/expressions/calls/new-converter.d.ts.map +1 -0
- package/dist/ir/converters/expressions/calls/new-converter.js +182 -0
- package/dist/ir/converters/expressions/calls/new-converter.js.map +1 -0
- package/dist/ir/converters/expressions/calls.d.ts +2 -28
- package/dist/ir/converters/expressions/calls.d.ts.map +1 -1
- package/dist/ir/converters/expressions/calls.js +2 -1344
- package/dist/ir/converters/expressions/calls.js.map +1 -1
- package/dist/ir/converters/expressions/collections.d.ts.map +1 -1
- package/dist/ir/converters/expressions/collections.js +37 -6
- package/dist/ir/converters/expressions/collections.js.map +1 -1
- package/dist/ir/converters/expressions/functions.js +1 -1
- package/dist/ir/converters/expressions/functions.js.map +1 -1
- package/dist/ir/converters/expressions/helpers.d.ts.map +1 -1
- package/dist/ir/converters/expressions/helpers.js +1 -0
- package/dist/ir/converters/expressions/helpers.js.map +1 -1
- package/dist/ir/converters/expressions/other.d.ts.map +1 -1
- package/dist/ir/converters/expressions/other.js +3 -2
- package/dist/ir/converters/expressions/other.js.map +1 -1
- package/dist/ir/converters/flow-narrowing.d.ts.map +1 -1
- package/dist/ir/converters/flow-narrowing.js +3 -2
- package/dist/ir/converters/flow-narrowing.js.map +1 -1
- package/dist/ir/converters/statements/declarations/classes/methods.js +1 -1
- package/dist/ir/converters/statements/declarations/classes/methods.js.map +1 -1
- package/dist/ir/converters/statements/declarations/type-aliases.js +1 -1
- package/dist/ir/converters/statements/declarations/type-aliases.js.map +1 -1
- package/dist/ir/converters/statements/declarations/variables.d.ts +2 -2
- package/dist/ir/converters/statements/declarations/variables.d.ts.map +1 -1
- package/dist/ir/converters/statements/declarations/variables.js +289 -2
- package/dist/ir/converters/statements/declarations/variables.js.map +1 -1
- package/dist/ir/expression-converter.d.ts +0 -1
- package/dist/ir/expression-converter.d.ts.map +1 -1
- package/dist/ir/expression-converter.js +0 -2
- package/dist/ir/expression-converter.js.map +1 -1
- package/dist/ir/generic-function-value-lowering.test.d.ts +2 -0
- package/dist/ir/generic-function-value-lowering.test.d.ts.map +1 -0
- package/dist/ir/generic-function-value-lowering.test.js +312 -0
- package/dist/ir/generic-function-value-lowering.test.js.map +1 -0
- package/dist/ir/generic-validator.d.ts +3 -4
- package/dist/ir/generic-validator.d.ts.map +1 -1
- package/dist/ir/generic-validator.js +3 -35
- package/dist/ir/generic-validator.js.map +1 -1
- package/dist/ir/program-context.d.ts +12 -0
- package/dist/ir/program-context.d.ts.map +1 -1
- package/dist/ir/program-context.js +2 -0
- package/dist/ir/program-context.js.map +1 -1
- package/dist/ir/statement-converter.d.ts +0 -2
- package/dist/ir/statement-converter.d.ts.map +1 -1
- package/dist/ir/statement-converter.js +0 -3
- package/dist/ir/statement-converter.js.map +1 -1
- package/dist/ir/type-system/internal/handle-types.d.ts +16 -16
- package/dist/ir/type-system/internal/handle-types.d.ts.map +1 -1
- package/dist/ir/type-system/internal/nominal-env.d.ts +0 -2
- package/dist/ir/type-system/internal/nominal-env.d.ts.map +1 -1
- package/dist/ir/type-system/internal/nominal-env.js +2 -6
- package/dist/ir/type-system/internal/nominal-env.js.map +1 -1
- package/dist/ir/type-system/internal/type-converter/converter.d.ts +3 -1
- package/dist/ir/type-system/internal/type-converter/converter.d.ts.map +1 -1
- package/dist/ir/type-system/internal/type-converter/converter.js +3 -1
- package/dist/ir/type-system/internal/type-converter/converter.js.map +1 -1
- package/dist/ir/type-system/internal/type-converter/objects.js +7 -1
- package/dist/ir/type-system/internal/type-converter/objects.js.map +1 -1
- package/dist/ir/type-system/internal/type-converter/orchestrator.d.ts +0 -2
- package/dist/ir/type-system/internal/type-converter/orchestrator.d.ts.map +1 -1
- package/dist/ir/type-system/internal/type-converter/orchestrator.js +322 -23
- package/dist/ir/type-system/internal/type-converter/orchestrator.js.map +1 -1
- package/dist/ir/type-system/internal/type-converter/orchestrator.test.d.ts +2 -0
- package/dist/ir/type-system/internal/type-converter/orchestrator.test.d.ts.map +1 -0
- package/dist/ir/type-system/internal/type-converter/orchestrator.test.js +265 -0
- package/dist/ir/type-system/internal/type-converter/orchestrator.test.js.map +1 -0
- package/dist/ir/type-system/internal/type-converter/primitives.d.ts.map +1 -1
- package/dist/ir/type-system/internal/type-converter/primitives.js +5 -0
- package/dist/ir/type-system/internal/type-converter/primitives.js.map +1 -1
- package/dist/ir/type-system/internal/type-converter/references.d.ts.map +1 -1
- package/dist/ir/type-system/internal/type-converter/references.js +67 -29
- package/dist/ir/type-system/internal/type-converter/references.js.map +1 -1
- package/dist/ir/type-system/internal/type-converter/utility-types.d.ts.map +1 -1
- package/dist/ir/type-system/internal/type-converter/utility-types.js +145 -0
- package/dist/ir/type-system/internal/type-converter/utility-types.js.map +1 -1
- package/dist/ir/type-system/internal/type-converter/utility-types.test.js +91 -1
- package/dist/ir/type-system/internal/type-converter/utility-types.test.js.map +1 -1
- package/dist/ir/type-system/internal/type-registry.d.ts +1 -1
- package/dist/ir/type-system/internal/type-registry.js +7 -7
- package/dist/ir/type-system/internal/type-registry.js.map +1 -1
- package/dist/ir/type-system/internal/universe/alias-table.d.ts +0 -14
- package/dist/ir/type-system/internal/universe/alias-table.d.ts.map +1 -1
- package/dist/ir/type-system/internal/universe/alias-table.js +0 -17
- package/dist/ir/type-system/internal/universe/alias-table.js.map +1 -1
- package/dist/ir/type-system/internal/universe/clr-catalog.d.ts +3 -0
- package/dist/ir/type-system/internal/universe/clr-catalog.d.ts.map +1 -1
- package/dist/ir/type-system/internal/universe/clr-catalog.js +4 -1044
- package/dist/ir/type-system/internal/universe/clr-catalog.js.map +1 -1
- package/dist/ir/type-system/internal/universe/clr-entry-converter.d.ts +51 -0
- package/dist/ir/type-system/internal/universe/clr-entry-converter.d.ts.map +1 -0
- package/dist/ir/type-system/internal/universe/clr-entry-converter.js +657 -0
- package/dist/ir/type-system/internal/universe/clr-entry-converter.js.map +1 -0
- package/dist/ir/type-system/internal/universe/clr-type-parser.d.ts +52 -0
- package/dist/ir/type-system/internal/universe/clr-type-parser.d.ts.map +1 -0
- package/dist/ir/type-system/internal/universe/clr-type-parser.js +481 -0
- package/dist/ir/type-system/internal/universe/clr-type-parser.js.map +1 -0
- package/dist/ir/type-system/internal/universe/clr-type-parser.test.d.ts +2 -0
- package/dist/ir/type-system/internal/universe/clr-type-parser.test.d.ts.map +1 -0
- package/dist/ir/type-system/internal/universe/clr-type-parser.test.js +55 -0
- package/dist/ir/type-system/internal/universe/clr-type-parser.test.js.map +1 -0
- package/dist/ir/type-system/internal/universe/index.d.ts +1 -1
- package/dist/ir/type-system/internal/universe/index.d.ts.map +1 -1
- package/dist/ir/type-system/internal/universe/index.js +1 -3
- package/dist/ir/type-system/internal/universe/index.js.map +1 -1
- package/dist/ir/type-system/internal/universe/unified-universe.test.js +2 -0
- package/dist/ir/type-system/internal/universe/unified-universe.test.js.map +1 -1
- package/dist/ir/type-system/type-system-call-resolution.d.ts +69 -0
- package/dist/ir/type-system/type-system-call-resolution.d.ts.map +1 -0
- package/dist/ir/type-system/type-system-call-resolution.js +1121 -0
- package/dist/ir/type-system/type-system-call-resolution.js.map +1 -0
- package/dist/ir/type-system/type-system-inference.d.ts +98 -0
- package/dist/ir/type-system/type-system-inference.d.ts.map +1 -0
- package/dist/ir/type-system/type-system-inference.js +1121 -0
- package/dist/ir/type-system/type-system-inference.js.map +1 -0
- package/dist/ir/type-system/type-system-relations.d.ts +15 -0
- package/dist/ir/type-system/type-system-relations.d.ts.map +1 -0
- package/dist/ir/type-system/type-system-relations.js +152 -0
- package/dist/ir/type-system/type-system-relations.js.map +1 -0
- package/dist/ir/type-system/type-system-state.d.ts +436 -0
- package/dist/ir/type-system/type-system-state.d.ts.map +1 -0
- package/dist/ir/type-system/type-system-state.js +212 -0
- package/dist/ir/type-system/type-system-state.js.map +1 -0
- package/dist/ir/type-system/type-system-utilities.d.ts +56 -0
- package/dist/ir/type-system/type-system-utilities.d.ts.map +1 -0
- package/dist/ir/type-system/type-system-utilities.js +373 -0
- package/dist/ir/type-system/type-system-utilities.js.map +1 -0
- package/dist/ir/type-system/type-system.d.ts +17 -358
- package/dist/ir/type-system/type-system.d.ts.map +1 -1
- package/dist/ir/type-system/type-system.js +67 -2945
- package/dist/ir/type-system/type-system.js.map +1 -1
- package/dist/ir/types/index.d.ts +1 -0
- package/dist/ir/types/index.d.ts.map +1 -1
- package/dist/ir/types/index.js +1 -0
- package/dist/ir/types/index.js.map +1 -1
- package/dist/ir/types/ir-substitution.js +1 -1
- package/dist/ir/types/ir-substitution.js.map +1 -1
- package/dist/ir/types/statements.d.ts +1 -1
- package/dist/ir/types/type-ops.d.ts +9 -0
- package/dist/ir/types/type-ops.d.ts.map +1 -0
- package/dist/ir/types/type-ops.js +134 -0
- package/dist/ir/types/type-ops.js.map +1 -0
- package/dist/ir/types/type-ops.test.d.ts +2 -0
- package/dist/ir/types/type-ops.test.d.ts.map +1 -0
- package/dist/ir/types/type-ops.test.js +73 -0
- package/dist/ir/types/type-ops.test.js.map +1 -0
- package/dist/ir/validation/anonymous-type-lowering-pass.d.ts.map +1 -1
- package/dist/ir/validation/anonymous-type-lowering-pass.js +34 -0
- package/dist/ir/validation/anonymous-type-lowering-pass.js.map +1 -1
- package/dist/ir/validation/anonymous-type-lowering-regressions.test.d.ts +2 -0
- package/dist/ir/validation/anonymous-type-lowering-regressions.test.d.ts.map +1 -0
- package/dist/ir/validation/anonymous-type-lowering-regressions.test.js +121 -0
- package/dist/ir/validation/anonymous-type-lowering-regressions.test.js.map +1 -0
- package/dist/ir/validation/attribute-collection/arg-extractor.d.ts +58 -0
- package/dist/ir/validation/attribute-collection/arg-extractor.d.ts.map +1 -0
- package/dist/ir/validation/attribute-collection/arg-extractor.js +284 -0
- package/dist/ir/validation/attribute-collection/arg-extractor.js.map +1 -0
- package/dist/ir/validation/attribute-collection/marker-parser.d.ts +28 -0
- package/dist/ir/validation/attribute-collection/marker-parser.d.ts.map +1 -0
- package/dist/ir/validation/attribute-collection/marker-parser.js +404 -0
- package/dist/ir/validation/attribute-collection/marker-parser.js.map +1 -0
- package/dist/ir/validation/attribute-collection/orchestrator.d.ts +28 -0
- package/dist/ir/validation/attribute-collection/orchestrator.d.ts.map +1 -0
- package/dist/ir/validation/attribute-collection/orchestrator.js +332 -0
- package/dist/ir/validation/attribute-collection/orchestrator.js.map +1 -0
- package/dist/ir/validation/attribute-collection-pass.d.ts +1 -23
- package/dist/ir/validation/attribute-collection-pass.d.ts.map +1 -1
- package/dist/ir/validation/attribute-collection-pass.js +1 -961
- package/dist/ir/validation/attribute-collection-pass.js.map +1 -1
- package/dist/ir/validation/attribute-collection-pass.test.js +12 -6
- package/dist/ir/validation/attribute-collection-pass.test.js.map +1 -1
- package/dist/ir/validation/numeric-invariants.test.js +29 -0
- package/dist/ir/validation/numeric-invariants.test.js.map +1 -1
- package/dist/ir/validation/numeric-proof-pass.d.ts.map +1 -1
- package/dist/ir/validation/numeric-proof-pass.js +21 -0
- package/dist/ir/validation/numeric-proof-pass.js.map +1 -1
- package/dist/ir/validation/soundness-gate.d.ts.map +1 -1
- package/dist/ir/validation/soundness-gate.js +2 -1
- package/dist/ir/validation/soundness-gate.js.map +1 -1
- package/dist/ir/validation/soundness-gate.test.js +69 -0
- package/dist/ir/validation/soundness-gate.test.js.map +1 -1
- package/dist/ir/validation/yield-lowering-pass.d.ts +11 -5
- package/dist/ir/validation/yield-lowering-pass.d.ts.map +1 -1
- package/dist/ir/validation/yield-lowering-pass.js +942 -48
- package/dist/ir/validation/yield-lowering-pass.js.map +1 -1
- package/dist/ir/validation/yield-lowering-pass.test.js +1333 -127
- package/dist/ir/validation/yield-lowering-pass.test.js.map +1 -1
- package/dist/program/binding-loader.d.ts +37 -0
- package/dist/program/binding-loader.d.ts.map +1 -0
- package/dist/program/binding-loader.js +155 -0
- package/dist/program/binding-loader.js.map +1 -0
- package/dist/program/binding-registry.d.ts +106 -0
- package/dist/program/binding-registry.d.ts.map +1 -0
- package/dist/program/binding-registry.js +590 -0
- package/dist/program/binding-registry.js.map +1 -0
- package/dist/program/binding-types.d.ts +166 -0
- package/dist/program/binding-types.d.ts.map +1 -0
- package/dist/program/binding-types.js +57 -0
- package/dist/program/binding-types.js.map +1 -0
- package/dist/program/bindings.d.ts +6 -271
- package/dist/program/bindings.d.ts.map +1 -1
- package/dist/program/bindings.js +7 -781
- package/dist/program/bindings.js.map +1 -1
- package/dist/program/creation.d.ts.map +1 -1
- package/dist/program/creation.js +104 -13
- package/dist/program/creation.js.map +1 -1
- package/dist/program/creation.test.js +133 -1
- package/dist/program/creation.test.js.map +1 -1
- package/dist/program/diagnostics.d.ts +1 -1
- package/dist/program/diagnostics.d.ts.map +1 -1
- package/dist/program/diagnostics.js +47 -2
- package/dist/program/diagnostics.js.map +1 -1
- package/dist/program/diagnostics.test.d.ts +2 -0
- package/dist/program/diagnostics.test.d.ts.map +1 -0
- package/dist/program/diagnostics.test.js +58 -0
- package/dist/program/diagnostics.test.js.map +1 -0
- package/dist/program/types.d.ts +2 -0
- package/dist/program/types.d.ts.map +1 -1
- package/dist/resolver/clr-bindings-resolver.d.ts +0 -1
- package/dist/resolver/clr-bindings-resolver.d.ts.map +1 -1
- package/dist/resolver/clr-bindings-resolver.js +22 -32
- package/dist/resolver/clr-bindings-resolver.js.map +1 -1
- package/dist/resolver/clr-bindings-resolver.test.js +0 -27
- package/dist/resolver/clr-bindings-resolver.test.js.map +1 -1
- package/dist/resolver/import-resolution.d.ts +3 -1
- package/dist/resolver/import-resolution.d.ts.map +1 -1
- package/dist/resolver/import-resolution.js +14 -11
- package/dist/resolver/import-resolution.js.map +1 -1
- package/dist/resolver/naming.d.ts.map +1 -1
- package/dist/resolver/naming.js +1 -0
- package/dist/resolver/naming.js.map +1 -1
- package/dist/resolver/node-module-aliases.d.ts +6 -0
- package/dist/resolver/node-module-aliases.d.ts.map +1 -0
- package/dist/resolver/node-module-aliases.js +164 -0
- package/dist/resolver/node-module-aliases.js.map +1 -0
- package/dist/resolver/node-module-aliases.test.d.ts +2 -0
- package/dist/resolver/node-module-aliases.test.d.ts.map +1 -0
- package/dist/resolver/node-module-aliases.test.js +64 -0
- package/dist/resolver/node-module-aliases.test.js.map +1 -0
- package/dist/resolver.test.js +103 -0
- package/dist/resolver.test.js.map +1 -1
- package/dist/surface/js-surface-shims.d.ts +3 -0
- package/dist/surface/js-surface-shims.d.ts.map +1 -0
- package/dist/surface/js-surface-shims.js +332 -0
- package/dist/surface/js-surface-shims.js.map +1 -0
- package/dist/surface/js-surface-shims.test.d.ts +2 -0
- package/dist/surface/js-surface-shims.test.d.ts.map +1 -0
- package/dist/surface/js-surface-shims.test.js +53 -0
- package/dist/surface/js-surface-shims.test.js.map +1 -0
- package/dist/surface/profiles.d.ts +10 -0
- package/dist/surface/profiles.d.ts.map +1 -0
- package/dist/surface/profiles.js +65 -0
- package/dist/surface/profiles.js.map +1 -0
- package/dist/surface/profiles.test.d.ts +2 -0
- package/dist/surface/profiles.test.d.ts.map +1 -0
- package/dist/surface/profiles.test.js +44 -0
- package/dist/surface/profiles.test.js.map +1 -0
- package/dist/types/diagnostic.d.ts +1 -1
- package/dist/types/diagnostic.d.ts.map +1 -1
- package/dist/types/diagnostic.js.map +1 -1
- package/dist/validation/features.d.ts.map +1 -1
- package/dist/validation/features.js +38 -13
- package/dist/validation/features.js.map +1 -1
- package/dist/validation/features.test.d.ts +2 -0
- package/dist/validation/features.test.d.ts.map +1 -0
- package/dist/validation/features.test.js +273 -0
- package/dist/validation/features.test.js.map +1 -0
- package/dist/validation/generics.d.ts +1 -1
- package/dist/validation/generics.d.ts.map +1 -1
- package/dist/validation/generics.js +2 -26
- package/dist/validation/generics.js.map +1 -1
- package/dist/validation/imports.d.ts.map +1 -1
- package/dist/validation/imports.js +29 -5
- package/dist/validation/imports.js.map +1 -1
- package/dist/validation/imports.test.d.ts +2 -0
- package/dist/validation/imports.test.d.ts.map +1 -0
- package/dist/validation/imports.test.js +211 -0
- package/dist/validation/imports.test.js.map +1 -0
- package/dist/validation/static-safety.d.ts +6 -6
- package/dist/validation/static-safety.d.ts.map +1 -1
- package/dist/validation/static-safety.js +163 -109
- package/dist/validation/static-safety.js.map +1 -1
- package/dist/validation/unsupported-utility-types.d.ts +3 -3
- package/dist/validation/unsupported-utility-types.d.ts.map +1 -1
- package/dist/validation/unsupported-utility-types.js +4 -7
- package/dist/validation/unsupported-utility-types.js.map +1 -1
- package/dist/validator.maximus.test.d.ts +2 -0
- package/dist/validator.maximus.test.d.ts.map +1 -0
- package/dist/validator.maximus.test.js +1214 -0
- package/dist/validator.maximus.test.js.map +1 -0
- package/dist/validator.test.js +152 -18
- package/dist/validator.test.js.map +1 -1
- package/package.json +1 -1
- package/dist/ir/converters/statements/declarations/registry.d.ts +0 -96
- package/dist/ir/converters/statements/declarations/registry.d.ts.map +0 -1
- package/dist/ir/converters/statements/declarations/registry.js +0 -130
- package/dist/ir/converters/statements/declarations/registry.js.map +0 -1
- package/dist/ir/this-parameter-inference.test.d.ts +0 -13
- package/dist/ir/this-parameter-inference.test.d.ts.map +0 -1
- package/dist/ir/this-parameter-inference.test.js +0 -165
- package/dist/ir/this-parameter-inference.test.js.map +0 -1
- package/dist/metadata/bindings-loader.d.ts +0 -41
- package/dist/metadata/bindings-loader.d.ts.map +0 -1
- package/dist/metadata/bindings-loader.js +0 -308
- package/dist/metadata/bindings-loader.js.map +0 -1
- package/dist/metadata/bindings-loader.test.d.ts +0 -5
- package/dist/metadata/bindings-loader.test.d.ts.map +0 -1
- package/dist/metadata/bindings-loader.test.js +0 -117
- package/dist/metadata/bindings-loader.test.js.map +0 -1
- package/dist/metadata/index.d.ts +0 -8
- package/dist/metadata/index.d.ts.map +0 -1
- package/dist/metadata/index.js +0 -7
- package/dist/metadata/index.js.map +0 -1
- package/dist/metadata/library-loader.d.ts +0 -42
- package/dist/metadata/library-loader.d.ts.map +0 -1
- package/dist/metadata/library-loader.js +0 -126
- package/dist/metadata/library-loader.js.map +0 -1
- package/dist/metadata/loader.d.ts +0 -26
- package/dist/metadata/loader.d.ts.map +0 -1
- package/dist/metadata/loader.js +0 -333
- package/dist/metadata/loader.js.map +0 -1
- package/dist/metadata/loader.test.d.ts +0 -5
- package/dist/metadata/loader.test.d.ts.map +0 -1
- package/dist/metadata/loader.test.js +0 -119
- package/dist/metadata/loader.test.js.map +0 -1
- package/dist/resolver/naming-policy.d.ts +0 -20
- package/dist/resolver/naming-policy.d.ts.map +0 -1
- package/dist/resolver/naming-policy.js +0 -40
- package/dist/resolver/naming-policy.js.map +0 -1
- package/dist/types/bindings.d.ts +0 -153
- package/dist/types/bindings.d.ts.map +0 -1
- package/dist/types/bindings.js +0 -14
- package/dist/types/bindings.js.map +0 -1
- package/dist/types/metadata.d.ts +0 -196
- package/dist/types/metadata.d.ts.map +0 -1
- package/dist/types/metadata.js +0 -10
- package/dist/types/metadata.js.map +0 -1
- package/dist/types/nested-types.d.ts +0 -111
- package/dist/types/nested-types.d.ts.map +0 -1
- package/dist/types/nested-types.js +0 -176
- package/dist/types/nested-types.js.map +0 -1
- package/dist/types/nested-types.test.d.ts +0 -5
- package/dist/types/nested-types.test.d.ts.map +0 -1
- package/dist/types/nested-types.test.js +0 -135
- package/dist/types/nested-types.test.js.map +0 -1
- package/dist/types/ref-parameters.d.ts +0 -123
- package/dist/types/ref-parameters.d.ts.map +0 -1
- package/dist/types/ref-parameters.js +0 -203
- package/dist/types/ref-parameters.js.map +0 -1
- package/dist/types/ref-parameters.test.d.ts +0 -5
- package/dist/types/ref-parameters.test.d.ts.map +0 -1
- package/dist/types/ref-parameters.test.js +0 -147
- package/dist/types/ref-parameters.test.js.map +0 -1
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Binding manifest types - maps JS/TS names to CLR types/members
|
|
3
|
+
* See spec/bindings.md for full manifest format
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Parameter modifier for ref/out/in parameters
|
|
7
|
+
* Matches the format from tsbindgen: { index: number, modifier: "ref" | "out" | "in" }
|
|
8
|
+
*/
|
|
9
|
+
export type ParameterModifier = {
|
|
10
|
+
readonly index: number;
|
|
11
|
+
readonly modifier: "ref" | "out" | "in";
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Member binding (method/property level)
|
|
15
|
+
*/
|
|
16
|
+
export type MemberBinding = {
|
|
17
|
+
readonly kind: "method" | "property";
|
|
18
|
+
readonly signature?: string;
|
|
19
|
+
/** Total CLR parameter count (includes extension receiver for extension methods). */
|
|
20
|
+
readonly parameterCount?: number;
|
|
21
|
+
readonly name: string;
|
|
22
|
+
readonly alias: string;
|
|
23
|
+
readonly binding: {
|
|
24
|
+
readonly assembly: string;
|
|
25
|
+
readonly type: string;
|
|
26
|
+
readonly member: string;
|
|
27
|
+
};
|
|
28
|
+
readonly parameterModifiers?: readonly ParameterModifier[];
|
|
29
|
+
readonly isExtensionMethod?: boolean;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Type binding (class/interface/struct/enum level)
|
|
33
|
+
*/
|
|
34
|
+
export type TypeBinding = {
|
|
35
|
+
readonly name: string;
|
|
36
|
+
readonly alias: string;
|
|
37
|
+
readonly kind: "class" | "interface" | "struct" | "enum";
|
|
38
|
+
readonly members: readonly MemberBinding[];
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Namespace binding
|
|
42
|
+
*/
|
|
43
|
+
export type NamespaceBinding = {
|
|
44
|
+
readonly name: string;
|
|
45
|
+
readonly alias: string;
|
|
46
|
+
readonly types: readonly TypeBinding[];
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Full binding manifest structure (new format from bindings.md)
|
|
50
|
+
*/
|
|
51
|
+
export type FullBindingManifest = {
|
|
52
|
+
readonly assembly: string;
|
|
53
|
+
readonly namespaces: readonly NamespaceBinding[];
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Simple binding entry for global/module identifiers
|
|
57
|
+
* Maps identifiers like `console`, `Math`, `fs` to CLR types
|
|
58
|
+
*/
|
|
59
|
+
export type SimpleBindingDescriptor = {
|
|
60
|
+
readonly kind: "global" | "module";
|
|
61
|
+
readonly assembly: string;
|
|
62
|
+
readonly type: string;
|
|
63
|
+
readonly csharpName?: string;
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* Simple binding file structure for global/module bindings
|
|
67
|
+
*/
|
|
68
|
+
export type SimpleBindingFile = {
|
|
69
|
+
readonly bindings: Readonly<Record<string, SimpleBindingDescriptor>>;
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* tsbindgen format - generated by tsbindgen tool
|
|
73
|
+
* This is the format produced when generating bindings from .NET assemblies
|
|
74
|
+
*/
|
|
75
|
+
export type TsbindgenMethod = {
|
|
76
|
+
readonly clrName: string;
|
|
77
|
+
/** Normalized signature string (tsbindgen metadata, used for extension receiver inference) */
|
|
78
|
+
readonly normalizedSignature?: string;
|
|
79
|
+
/** Total parameter count in CLR signature (includes extension receiver) */
|
|
80
|
+
readonly parameterCount?: number;
|
|
81
|
+
readonly declaringClrType: string;
|
|
82
|
+
readonly declaringAssemblyName: string;
|
|
83
|
+
readonly parameterModifiers?: readonly ParameterModifier[];
|
|
84
|
+
readonly isExtensionMethod?: boolean;
|
|
85
|
+
};
|
|
86
|
+
export type TsbindgenProperty = {
|
|
87
|
+
readonly clrName: string;
|
|
88
|
+
readonly declaringClrType: string;
|
|
89
|
+
readonly declaringAssemblyName: string;
|
|
90
|
+
};
|
|
91
|
+
export type TsbindgenField = {
|
|
92
|
+
readonly clrName: string;
|
|
93
|
+
readonly declaringClrType: string;
|
|
94
|
+
readonly declaringAssemblyName: string;
|
|
95
|
+
};
|
|
96
|
+
export type TsbindgenTypeRef = {
|
|
97
|
+
readonly stableId?: string;
|
|
98
|
+
readonly clrName: string;
|
|
99
|
+
readonly typeArguments?: readonly string[];
|
|
100
|
+
};
|
|
101
|
+
export type TsbindgenType = {
|
|
102
|
+
readonly clrName: string;
|
|
103
|
+
readonly assemblyName: string;
|
|
104
|
+
readonly baseType?: TsbindgenTypeRef;
|
|
105
|
+
readonly interfaces?: readonly TsbindgenTypeRef[];
|
|
106
|
+
/**
|
|
107
|
+
* CLR type kind from tsbindgen (e.g., "Class", "Interface", "Struct", "Enum").
|
|
108
|
+
*
|
|
109
|
+
* This is used for airplane-grade emission decisions (e.g., whether a name in
|
|
110
|
+
* a TS `implements` clause is a CLR interface and should be emitted in the C#
|
|
111
|
+
* heritage list).
|
|
112
|
+
*/
|
|
113
|
+
readonly kind?: "Class" | "Interface" | "Struct" | "Enum";
|
|
114
|
+
readonly methods: readonly TsbindgenMethod[];
|
|
115
|
+
readonly properties: readonly TsbindgenProperty[];
|
|
116
|
+
readonly fields: readonly TsbindgenField[];
|
|
117
|
+
};
|
|
118
|
+
/**
|
|
119
|
+
* tsbindgen "flattened named export" descriptor.
|
|
120
|
+
*
|
|
121
|
+
* This is an additive surface to support JS-style named imports that bind to
|
|
122
|
+
* a stable declaring CLR type + member (typically module container static types).
|
|
123
|
+
*
|
|
124
|
+
* Example (user code):
|
|
125
|
+
* import { buildSite } from "@tsumo/engine/Tsumo.Engine.js";
|
|
126
|
+
* buildSite(req);
|
|
127
|
+
*
|
|
128
|
+
* Example (bindings.json excerpt):
|
|
129
|
+
* "exports": {
|
|
130
|
+
* "buildSite": {
|
|
131
|
+
* "kind": "method",
|
|
132
|
+
* "clrName": "buildSite",
|
|
133
|
+
* "declaringClrType": "Tsumo.Engine.BuildSite",
|
|
134
|
+
* "declaringAssemblyName": "Tsumo.Engine"
|
|
135
|
+
* }
|
|
136
|
+
* }
|
|
137
|
+
*/
|
|
138
|
+
export type TsbindgenExport = {
|
|
139
|
+
readonly kind: "method" | "property" | "field";
|
|
140
|
+
readonly clrName: string;
|
|
141
|
+
readonly declaringClrType: string;
|
|
142
|
+
readonly declaringAssemblyName: string;
|
|
143
|
+
};
|
|
144
|
+
export type TsbindgenBindingFile = {
|
|
145
|
+
readonly namespace: string;
|
|
146
|
+
readonly types: readonly TsbindgenType[];
|
|
147
|
+
readonly exports?: Readonly<Record<string, TsbindgenExport>>;
|
|
148
|
+
};
|
|
149
|
+
/**
|
|
150
|
+
* Union type for all binding formats
|
|
151
|
+
*/
|
|
152
|
+
export type BindingFile = FullBindingManifest | SimpleBindingFile | TsbindgenBindingFile;
|
|
153
|
+
/**
|
|
154
|
+
* Type guard to check if a manifest is the full format
|
|
155
|
+
*/
|
|
156
|
+
export declare const isFullBindingManifest: (manifest: BindingFile) => manifest is FullBindingManifest;
|
|
157
|
+
/**
|
|
158
|
+
* Type guard to check if a manifest is the tsbindgen format
|
|
159
|
+
*/
|
|
160
|
+
export declare const isTsbindgenBindingFile: (manifest: BindingFile) => manifest is TsbindgenBindingFile;
|
|
161
|
+
/**
|
|
162
|
+
* Validate that a parsed JSON object is a valid binding file format.
|
|
163
|
+
* Returns an error message if invalid, undefined if valid.
|
|
164
|
+
*/
|
|
165
|
+
export declare const validateBindingFile: (obj: unknown, filePath: string) => string | undefined;
|
|
166
|
+
//# sourceMappingURL=binding-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"binding-types.d.ts","sourceRoot":"","sources":["../../src/program/binding-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,EAAE,KAAK,G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AAC,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC;CAC9D,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,WAAW,GACnB,mBAAmB,GACnB,iBAAiB,GACjB,oBAAoB,CAAC;AAEzB;;GAEG;AACH,eAAO,MAAM,qBAAqB,GAChC,UAAU,WAAW,KACpB,QAAQ,IAAI,mBAEd,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,sBAAsB,GACjC,UAAU,WAAW,KACpB,QAAQ,IAAI,oBAMd,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,GAC9B,KAAK,OAAO,EACZ,UAAU,MAAM,KACf,MAAM,GAAG,SAsCX,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Binding manifest types - maps JS/TS names to CLR types/members
|
|
3
|
+
* See spec/bindings.md for full manifest format
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Type guard to check if a manifest is the full format
|
|
7
|
+
*/
|
|
8
|
+
export const isFullBindingManifest = (manifest) => {
|
|
9
|
+
return "assembly" in manifest && "namespaces" in manifest;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Type guard to check if a manifest is the tsbindgen format
|
|
13
|
+
*/
|
|
14
|
+
export const isTsbindgenBindingFile = (manifest) => {
|
|
15
|
+
return ("namespace" in manifest &&
|
|
16
|
+
"types" in manifest &&
|
|
17
|
+
!("namespaces" in manifest));
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Validate that a parsed JSON object is a valid binding file format.
|
|
21
|
+
* Returns an error message if invalid, undefined if valid.
|
|
22
|
+
*/
|
|
23
|
+
export const validateBindingFile = (obj, filePath) => {
|
|
24
|
+
if (obj === null || typeof obj !== "object") {
|
|
25
|
+
return `${filePath}: Expected object, got ${typeof obj}`;
|
|
26
|
+
}
|
|
27
|
+
const manifest = obj;
|
|
28
|
+
// Check for tsbindgen format
|
|
29
|
+
if ("namespace" in manifest && "types" in manifest) {
|
|
30
|
+
if (typeof manifest.namespace !== "string") {
|
|
31
|
+
return `${filePath}: 'namespace' must be a string`;
|
|
32
|
+
}
|
|
33
|
+
if (!Array.isArray(manifest.types)) {
|
|
34
|
+
return `${filePath}: 'types' must be an array`;
|
|
35
|
+
}
|
|
36
|
+
return undefined; // Valid tsbindgen format
|
|
37
|
+
}
|
|
38
|
+
// Check for full manifest format
|
|
39
|
+
if ("assembly" in manifest && "namespaces" in manifest) {
|
|
40
|
+
if (typeof manifest.assembly !== "string") {
|
|
41
|
+
return `${filePath}: 'assembly' must be a string`;
|
|
42
|
+
}
|
|
43
|
+
if (!Array.isArray(manifest.namespaces)) {
|
|
44
|
+
return `${filePath}: 'namespaces' must be an array`;
|
|
45
|
+
}
|
|
46
|
+
return undefined; // Valid full format
|
|
47
|
+
}
|
|
48
|
+
// Check for simple format (global/module bindings)
|
|
49
|
+
if ("bindings" in manifest) {
|
|
50
|
+
if (typeof manifest.bindings !== "object" || manifest.bindings === null) {
|
|
51
|
+
return `${filePath}: 'bindings' must be an object`;
|
|
52
|
+
}
|
|
53
|
+
return undefined; // Valid simple format
|
|
54
|
+
}
|
|
55
|
+
return `${filePath}: Unrecognized binding file format. Expected tsbindgen (namespace+types), full (assembly+namespaces), or simple (bindings) format.`;
|
|
56
|
+
};
|
|
57
|
+
//# sourceMappingURL=binding-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"binding-types.js","sourceRoot":"","sources":["../../src/program/binding-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA4KH;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CACnC,QAAqB,EACY,EAAE;IACnC,OAAO,UAAU,IAAI,QAAQ,IAAI,YAAY,IAAI,QAAQ,CAAC;AAC5D,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CACpC,QAAqB,EACa,EAAE;IACpC,OAAO,CACL,WAAW,IAAI,QAA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AK,QAAQ,IAAI,QAAQ,CAAC,QAAQ,KAAK,IAAI,EAAE,CAAC;YACxE,OAAO,GAAG,QAAQ,gCAAgC,CAAC;QACrD,CAAC;QACD,OAAO,SAAS,CAAC,CAAC,sBAAsB;IAC1C,CAAC;IAED,OAAO,GAAG,QAAQ,oIAAoI,CAAC;AACzJ,CAAC,CAAC"}
|
|
@@ -1,277 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Binding manifest loading - maps JS/TS names to CLR types/members
|
|
3
3
|
* See spec/bindings.md for full manifest format
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* Parameter modifier for ref/out/in parameters
|
|
7
|
-
* Matches the format from tsbindgen: { index: number, modifier: "ref" | "out" | "in" }
|
|
8
|
-
*/
|
|
9
|
-
export type ParameterModifier = {
|
|
10
|
-
readonly index: number;
|
|
11
|
-
readonly modifier: "ref" | "out" | "in";
|
|
12
|
-
};
|
|
13
|
-
/**
|
|
14
|
-
* Member binding (method/property level)
|
|
15
|
-
*/
|
|
16
|
-
export type MemberBinding = {
|
|
17
|
-
readonly kind: "method" | "property";
|
|
18
|
-
readonly signature?: string;
|
|
19
|
-
/** Total CLR parameter count (includes extension receiver for extension methods). */
|
|
20
|
-
readonly parameterCount?: number;
|
|
21
|
-
readonly name: string;
|
|
22
|
-
readonly alias: string;
|
|
23
|
-
readonly binding: {
|
|
24
|
-
readonly assembly: string;
|
|
25
|
-
readonly type: string;
|
|
26
|
-
readonly member: string;
|
|
27
|
-
};
|
|
28
|
-
readonly parameterModifiers?: readonly ParameterModifier[];
|
|
29
|
-
readonly isExtensionMethod?: boolean;
|
|
30
|
-
};
|
|
31
|
-
/**
|
|
32
|
-
* Type binding (class/interface/struct/enum level)
|
|
33
|
-
*/
|
|
34
|
-
export type TypeBinding = {
|
|
35
|
-
readonly name: string;
|
|
36
|
-
readonly alias: string;
|
|
37
|
-
readonly kind: "class" | "interface" | "struct" | "enum";
|
|
38
|
-
readonly members: readonly MemberBinding[];
|
|
39
|
-
};
|
|
40
|
-
/**
|
|
41
|
-
* Namespace binding
|
|
42
|
-
*/
|
|
43
|
-
export type NamespaceBinding = {
|
|
44
|
-
readonly name: string;
|
|
45
|
-
readonly alias: string;
|
|
46
|
-
readonly types: readonly TypeBinding[];
|
|
47
|
-
};
|
|
48
|
-
/**
|
|
49
|
-
* Full binding manifest structure (new format from bindings.md)
|
|
50
|
-
*/
|
|
51
|
-
export type FullBindingManifest = {
|
|
52
|
-
readonly assembly: string;
|
|
53
|
-
readonly namespaces: readonly NamespaceBinding[];
|
|
54
|
-
};
|
|
55
|
-
/**
|
|
56
|
-
* Simple binding entry for global/module identifiers
|
|
57
|
-
* Maps identifiers like `console`, `Math`, `fs` to CLR types
|
|
58
|
-
*/
|
|
59
|
-
export type SimpleBindingDescriptor = {
|
|
60
|
-
readonly kind: "global" | "module";
|
|
61
|
-
readonly assembly: string;
|
|
62
|
-
readonly type: string;
|
|
63
|
-
readonly csharpName?: string;
|
|
64
|
-
};
|
|
65
|
-
/**
|
|
66
|
-
* Simple binding file structure for global/module bindings
|
|
67
|
-
*/
|
|
68
|
-
export type SimpleBindingFile = {
|
|
69
|
-
readonly bindings: Readonly<Record<string, SimpleBindingDescriptor>>;
|
|
70
|
-
};
|
|
71
|
-
/**
|
|
72
|
-
* tsbindgen format - generated by tsbindgen tool
|
|
73
|
-
* This is the format produced when generating bindings from .NET assemblies
|
|
74
|
-
*/
|
|
75
|
-
export type TsbindgenMethod = {
|
|
76
|
-
readonly clrName: string;
|
|
77
|
-
/** Normalized signature string (tsbindgen metadata, used for extension receiver inference) */
|
|
78
|
-
readonly normalizedSignature?: string;
|
|
79
|
-
/** Total parameter count in CLR signature (includes extension receiver) */
|
|
80
|
-
readonly parameterCount?: number;
|
|
81
|
-
readonly declaringClrType: string;
|
|
82
|
-
readonly declaringAssemblyName: string;
|
|
83
|
-
readonly parameterModifiers?: readonly ParameterModifier[];
|
|
84
|
-
readonly isExtensionMethod?: boolean;
|
|
85
|
-
};
|
|
86
|
-
export type TsbindgenProperty = {
|
|
87
|
-
readonly clrName: string;
|
|
88
|
-
readonly declaringClrType: string;
|
|
89
|
-
readonly declaringAssemblyName: string;
|
|
90
|
-
};
|
|
91
|
-
export type TsbindgenField = {
|
|
92
|
-
readonly clrName: string;
|
|
93
|
-
readonly declaringClrType: string;
|
|
94
|
-
readonly declaringAssemblyName: string;
|
|
95
|
-
};
|
|
96
|
-
export type TsbindgenTypeRef = {
|
|
97
|
-
readonly stableId?: string;
|
|
98
|
-
readonly clrName: string;
|
|
99
|
-
readonly typeArguments?: readonly string[];
|
|
100
|
-
};
|
|
101
|
-
export type TsbindgenType = {
|
|
102
|
-
readonly clrName: string;
|
|
103
|
-
readonly assemblyName: string;
|
|
104
|
-
readonly baseType?: TsbindgenTypeRef;
|
|
105
|
-
readonly interfaces?: readonly TsbindgenTypeRef[];
|
|
106
|
-
/**
|
|
107
|
-
* CLR type kind from tsbindgen (e.g., "Class", "Interface", "Struct", "Enum").
|
|
108
|
-
*
|
|
109
|
-
* This is used for airplane-grade emission decisions (e.g., whether a name in
|
|
110
|
-
* a TS `implements` clause is a CLR interface and should be emitted in the C#
|
|
111
|
-
* heritage list).
|
|
112
|
-
*/
|
|
113
|
-
readonly kind?: "Class" | "Interface" | "Struct" | "Enum";
|
|
114
|
-
readonly methods: readonly TsbindgenMethod[];
|
|
115
|
-
readonly properties: readonly TsbindgenProperty[];
|
|
116
|
-
readonly fields: readonly TsbindgenField[];
|
|
117
|
-
};
|
|
118
|
-
/**
|
|
119
|
-
* tsbindgen "flattened named export" descriptor.
|
|
120
|
-
*
|
|
121
|
-
* This is an additive surface to support JS-style named imports that bind to
|
|
122
|
-
* a stable declaring CLR type + member (typically module container static types).
|
|
123
|
-
*
|
|
124
|
-
* Example (user code):
|
|
125
|
-
* import { buildSite } from "@tsumo/engine/Tsumo.Engine.js";
|
|
126
|
-
* buildSite(req);
|
|
127
|
-
*
|
|
128
|
-
* Example (bindings.json excerpt):
|
|
129
|
-
* "exports": {
|
|
130
|
-
* "buildSite": {
|
|
131
|
-
* "kind": "method",
|
|
132
|
-
* "clrName": "buildSite",
|
|
133
|
-
* "declaringClrType": "Tsumo.Engine.BuildSite",
|
|
134
|
-
* "declaringAssemblyName": "Tsumo.Engine"
|
|
135
|
-
* }
|
|
136
|
-
* }
|
|
137
|
-
*/
|
|
138
|
-
export type TsbindgenExport = {
|
|
139
|
-
readonly kind: "method" | "property" | "field";
|
|
140
|
-
readonly clrName: string;
|
|
141
|
-
readonly declaringClrType: string;
|
|
142
|
-
readonly declaringAssemblyName: string;
|
|
143
|
-
};
|
|
144
|
-
export type TsbindgenBindingFile = {
|
|
145
|
-
readonly namespace: string;
|
|
146
|
-
readonly types: readonly TsbindgenType[];
|
|
147
|
-
readonly exports?: Readonly<Record<string, TsbindgenExport>>;
|
|
148
|
-
};
|
|
149
|
-
/**
|
|
150
|
-
* Union type for all binding formats
|
|
151
|
-
*/
|
|
152
|
-
export type BindingFile = FullBindingManifest | SimpleBindingFile | TsbindgenBindingFile;
|
|
153
|
-
/**
|
|
154
|
-
* Registry of all loaded bindings
|
|
155
|
-
* Supports simple (global/module) and hierarchical (namespace/type/member) formats
|
|
156
|
-
*/
|
|
157
|
-
export declare class BindingRegistry {
|
|
158
|
-
private readonly loadedBindingFiles;
|
|
159
|
-
private readonly simpleBindings;
|
|
160
|
-
private readonly namespaces;
|
|
161
|
-
private readonly types;
|
|
162
|
-
private readonly members;
|
|
163
|
-
private readonly memberOverloads;
|
|
164
|
-
private readonly clrMemberOverloads;
|
|
165
|
-
private readonly tsbindgenExports;
|
|
166
|
-
private readonly tsSupertypes;
|
|
167
|
-
/**
|
|
168
|
-
* Extension method index for instance-style calls.
|
|
169
|
-
*
|
|
170
|
-
* Keyed by:
|
|
171
|
-
* - declaring namespace key (CLR namespace with '.' replaced by '_', e.g. "System_Linq")
|
|
172
|
-
* - receiver TS type name (e.g. "IEnumerable_1")
|
|
173
|
-
* - method TS name (e.g. "where")
|
|
174
|
-
*
|
|
175
|
-
* Values are one or more candidates (overloads share the same target).
|
|
176
|
-
*/
|
|
177
|
-
private readonly extensionMethods;
|
|
178
|
-
private getExtensionMethodCandidates;
|
|
179
|
-
private addSupertype;
|
|
180
|
-
private getDirectSupertypes;
|
|
181
|
-
/**
|
|
182
|
-
* Resolve an extension method binding target by extension interface name.
|
|
183
|
-
*
|
|
184
|
-
* @param extensionInterfaceName - e.g. "__Ext_System_Linq_IEnumerable_1"
|
|
185
|
-
* @param methodTsName - e.g. "where"
|
|
186
|
-
*/
|
|
187
|
-
resolveExtensionMethod(extensionInterfaceName: string, methodTsName: string, callArgumentCount?: number): MemberBinding | undefined;
|
|
188
|
-
/**
|
|
189
|
-
* Resolve an extension method binding target by explicit (namespaceKey, receiverTypeName).
|
|
190
|
-
*
|
|
191
|
-
* Used when extension methods are emitted as method-table members with explicit `this:`
|
|
192
|
-
* receiver constraints (the declaring interface name no longer encodes the receiver type).
|
|
193
|
-
*/
|
|
194
|
-
resolveExtensionMethodByKey(namespaceKey: string, receiverTypeName: string, methodTsName: string, callArgumentCount?: number): MemberBinding | undefined;
|
|
195
|
-
private parseExtensionInterfaceName;
|
|
196
|
-
/**
|
|
197
|
-
* Load a binding manifest file and add its bindings to the registry
|
|
198
|
-
* Supports simple, full, and tsbindgen formats
|
|
199
|
-
*/
|
|
200
|
-
addBindings(_filePath: string, manifest: BindingFile): void;
|
|
201
|
-
/**
|
|
202
|
-
* Look up a simple global/module binding
|
|
203
|
-
*/
|
|
204
|
-
getBinding(name: string): SimpleBindingDescriptor | undefined;
|
|
205
|
-
/**
|
|
206
|
-
* Look up a namespace binding by TS alias
|
|
207
|
-
*/
|
|
208
|
-
getNamespace(tsAlias: string): NamespaceBinding | undefined;
|
|
209
|
-
/**
|
|
210
|
-
* Look up a type binding by TS alias
|
|
211
|
-
*/
|
|
212
|
-
getType(tsAlias: string): TypeBinding | undefined;
|
|
213
|
-
/**
|
|
214
|
-
* Look up a member binding by TS type alias and member alias
|
|
215
|
-
*/
|
|
216
|
-
getMember(typeAlias: string, memberAlias: string): MemberBinding | undefined;
|
|
217
|
-
/**
|
|
218
|
-
* Look up all member bindings for a TS type alias + member alias.
|
|
219
|
-
*
|
|
220
|
-
* IMPORTANT: Methods can be overloaded, and overloads can differ in ref/out/in
|
|
221
|
-
* modifiers (tsbindgen provides these via `parameterModifiers`). This accessor
|
|
222
|
-
* preserves overload sets so the call converter can select the correct one.
|
|
223
|
-
*/
|
|
224
|
-
getMemberOverloads(typeAlias: string, memberAlias: string): readonly MemberBinding[] | undefined;
|
|
225
|
-
/**
|
|
226
|
-
* Look up all member bindings for a CLR member target.
|
|
227
|
-
*
|
|
228
|
-
* Keyed by declaring assembly, CLR type, and CLR member name.
|
|
229
|
-
*/
|
|
230
|
-
getClrMemberOverloads(assembly: string, clrType: string, clrMember: string): readonly MemberBinding[] | undefined;
|
|
231
|
-
/**
|
|
232
|
-
* Look up a tsbindgen flattened named export by CLR namespace + export name.
|
|
233
|
-
*/
|
|
234
|
-
getTsbindgenExport(namespace: string, exportName: string): TsbindgenExport | undefined;
|
|
235
|
-
/**
|
|
236
|
-
* Get all loaded simple bindings
|
|
237
|
-
*/
|
|
238
|
-
getAllBindings(): readonly [string, SimpleBindingDescriptor][];
|
|
239
|
-
/**
|
|
240
|
-
* Get all loaded namespaces
|
|
241
|
-
*/
|
|
242
|
-
getAllNamespaces(): readonly NamespaceBinding[];
|
|
243
|
-
/**
|
|
244
|
-
* Get a copy of the types map for passing to the emitter.
|
|
245
|
-
* Returns a new Map to ensure immutability - callers cannot modify the registry.
|
|
246
|
-
*/
|
|
247
|
-
getTypesMap(): ReadonlyMap<string, TypeBinding>;
|
|
248
|
-
/**
|
|
249
|
-
* Clear all loaded bindings
|
|
250
|
-
*/
|
|
251
|
-
clear(): void;
|
|
252
|
-
}
|
|
253
|
-
/**
|
|
254
|
-
* Load binding manifests from configured type roots.
|
|
255
|
-
*
|
|
256
|
-
* Conventions:
|
|
257
|
-
* - Root-level `bindings.json` (simple/global bindings)
|
|
258
|
-
* - `Namespace.d.ts` + `Namespace/bindings.json` (namespace facade)
|
|
259
|
-
*
|
|
260
|
-
* Also recursively loads bindings from @tsonic/* dependencies of typeRoot packages.
|
|
261
|
-
*/
|
|
262
|
-
export declare const loadBindings: (typeRoots: readonly string[]) => BindingRegistry;
|
|
263
|
-
/**
|
|
264
|
-
* Load bindings from a specific file path into an existing registry.
|
|
265
|
-
* Validates the file format and logs a warning if invalid.
|
|
266
|
-
*/
|
|
267
|
-
export declare const loadBindingsFromPath: (registry: BindingRegistry, bindingsPath: string) => void;
|
|
268
|
-
/**
|
|
269
|
-
* Load all CLR bindings discovered by the resolver.
|
|
270
|
-
* This should be called AFTER createProgram but BEFORE IR building
|
|
271
|
-
* to ensure all bindings are available during IR construction.
|
|
272
4
|
*
|
|
273
|
-
*
|
|
274
|
-
* so
|
|
5
|
+
* This barrel module re-exports all binding types, the registry, and loaders
|
|
6
|
+
* so that existing imports from "program/bindings.js" continue to work.
|
|
275
7
|
*/
|
|
276
|
-
export
|
|
8
|
+
export type { ParameterModifier, MemberBinding, TypeBinding, NamespaceBinding, FullBindingManifest, SimpleBindingDescriptor, SimpleBindingFile, TsbindgenMethod, TsbindgenProperty, TsbindgenField, TsbindgenTypeRef, TsbindgenType, TsbindgenExport, TsbindgenBindingFile, BindingFile, } from "./binding-types.js";
|
|
9
|
+
export { isFullBindingManifest, isTsbindgenBindingFile, validateBindingFile, } from "./binding-types.js";
|
|
10
|
+
export { BindingRegistry } from "./binding-registry.js";
|
|
11
|
+
export { scanForDeclarationFiles, loadBindings, loadBindingsFromPath, loadAllDiscoveredBindings, } from "./binding-loader.js";
|
|
277
12
|
//# sourceMappingURL=bindings.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bindings.d.ts","sourceRoot":"","sources":["../../src/program/bindings.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"bindings.d.ts","sourceRoot":"","sources":["../../src/program/bindings.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,YAAY,EACV,iBAAiB,EACjB,aAAa,EACb,WAAW,EACX,gBAAgB,EAChB,mBAAmB,EACnB,uBAAuB,EACvB,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,cAAc,EACd,gBAAgB,EAChB,aAAa,EACb,eAAe,EACf,oBAAoB,EACpB,WAAW,GACZ,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,mBAAmB,GACpB,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAGxD,OAAO,EACL,uBAAuB,EACvB,YAAY,EACZ,oBAAoB,EACpB,yBAAyB,GAC1B,MAAM,qBAAqB,CAAC"}
|