@flighthq/tool-compiler 0.5.1-edge.1687.b63c819
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/LICENSE.md +9 -0
- package/README.md +74 -0
- package/dist/packages/compiler-ambient/src/compilerAmbientSurface.d.ts +3 -0
- package/dist/packages/compiler-ambient/src/compilerAmbientSurface.d.ts.map +1 -0
- package/dist/packages/compiler-ambient/src/compilerAmbientSurface.js +564 -0
- package/dist/packages/compiler-ambient/src/compilerAmbientSurface.js.map +1 -0
- package/dist/packages/compiler-ambient/src/index.d.ts +2 -0
- package/dist/packages/compiler-ambient/src/index.d.ts.map +1 -0
- package/dist/packages/compiler-ambient/src/index.js +2 -0
- package/dist/packages/compiler-ambient/src/index.js.map +1 -0
- package/dist/packages/compiler-backend-cpp/src/cppAmbientMemberBinding.d.ts +3 -0
- package/dist/packages/compiler-backend-cpp/src/cppAmbientMemberBinding.d.ts.map +1 -0
- package/dist/packages/compiler-backend-cpp/src/cppAmbientMemberBinding.js +146 -0
- package/dist/packages/compiler-backend-cpp/src/cppAmbientMemberBinding.js.map +1 -0
- package/dist/packages/compiler-backend-cpp/src/cppBindingTypeInference.d.ts +3 -0
- package/dist/packages/compiler-backend-cpp/src/cppBindingTypeInference.d.ts.map +1 -0
- package/dist/packages/compiler-backend-cpp/src/cppBindingTypeInference.js +197 -0
- package/dist/packages/compiler-backend-cpp/src/cppBindingTypeInference.js.map +1 -0
- package/dist/packages/compiler-backend-cpp/src/cppCallableSignatureAbi.d.ts +8 -0
- package/dist/packages/compiler-backend-cpp/src/cppCallableSignatureAbi.d.ts.map +1 -0
- package/dist/packages/compiler-backend-cpp/src/cppCallableSignatureAbi.js +9 -0
- package/dist/packages/compiler-backend-cpp/src/cppCallableSignatureAbi.js.map +1 -0
- package/dist/packages/compiler-backend-cpp/src/cppClosureCapturePlan.d.ts +3 -0
- package/dist/packages/compiler-backend-cpp/src/cppClosureCapturePlan.d.ts.map +1 -0
- package/dist/packages/compiler-backend-cpp/src/cppClosureCapturePlan.js +109 -0
- package/dist/packages/compiler-backend-cpp/src/cppClosureCapturePlan.js.map +1 -0
- package/dist/packages/compiler-backend-cpp/src/cppCompilerBackend.d.ts +4 -0
- package/dist/packages/compiler-backend-cpp/src/cppCompilerBackend.d.ts.map +1 -0
- package/dist/packages/compiler-backend-cpp/src/cppCompilerBackend.js +16568 -0
- package/dist/packages/compiler-backend-cpp/src/cppCompilerBackend.js.map +1 -0
- package/dist/packages/compiler-backend-cpp/src/cppCompilerIdentity.d.ts +7 -0
- package/dist/packages/compiler-backend-cpp/src/cppCompilerIdentity.d.ts.map +1 -0
- package/dist/packages/compiler-backend-cpp/src/cppCompilerIdentity.js +176 -0
- package/dist/packages/compiler-backend-cpp/src/cppCompilerIdentity.js.map +1 -0
- package/dist/packages/compiler-backend-cpp/src/cppReferenceRepresentationPlan.d.ts +7 -0
- package/dist/packages/compiler-backend-cpp/src/cppReferenceRepresentationPlan.d.ts.map +1 -0
- package/dist/packages/compiler-backend-cpp/src/cppReferenceRepresentationPlan.js +1514 -0
- package/dist/packages/compiler-backend-cpp/src/cppReferenceRepresentationPlan.js.map +1 -0
- package/dist/packages/compiler-backend-cpp/src/cppRuntimeExternalSymbolBinding.d.ts +44 -0
- package/dist/packages/compiler-backend-cpp/src/cppRuntimeExternalSymbolBinding.d.ts.map +1 -0
- package/dist/packages/compiler-backend-cpp/src/cppRuntimeExternalSymbolBinding.js +1060 -0
- package/dist/packages/compiler-backend-cpp/src/cppRuntimeExternalSymbolBinding.js.map +1 -0
- package/dist/packages/compiler-backend-cpp/src/cppTupleRepresentation.d.ts +3 -0
- package/dist/packages/compiler-backend-cpp/src/cppTupleRepresentation.d.ts.map +1 -0
- package/dist/packages/compiler-backend-cpp/src/cppTupleRepresentation.js +13 -0
- package/dist/packages/compiler-backend-cpp/src/cppTupleRepresentation.js.map +1 -0
- package/dist/packages/compiler-backend-cpp/src/cppUnionRepresentationPlan.d.ts +66 -0
- package/dist/packages/compiler-backend-cpp/src/cppUnionRepresentationPlan.d.ts.map +1 -0
- package/dist/packages/compiler-backend-cpp/src/cppUnionRepresentationPlan.js +196 -0
- package/dist/packages/compiler-backend-cpp/src/cppUnionRepresentationPlan.js.map +1 -0
- package/dist/packages/compiler-backend-cpp/src/index.d.ts +6 -0
- package/dist/packages/compiler-backend-cpp/src/index.d.ts.map +1 -0
- package/dist/packages/compiler-backend-cpp/src/index.js +6 -0
- package/dist/packages/compiler-backend-cpp/src/index.js.map +1 -0
- package/dist/packages/compiler-backend-hx/src/haxeAmbientMemberBinding.d.ts +4 -0
- package/dist/packages/compiler-backend-hx/src/haxeAmbientMemberBinding.d.ts.map +1 -0
- package/dist/packages/compiler-backend-hx/src/haxeAmbientMemberBinding.js +160 -0
- package/dist/packages/compiler-backend-hx/src/haxeAmbientMemberBinding.js.map +1 -0
- package/dist/packages/compiler-backend-hx/src/haxeAsyncIterationLowering.d.ts +3 -0
- package/dist/packages/compiler-backend-hx/src/haxeAsyncIterationLowering.d.ts.map +1 -0
- package/dist/packages/compiler-backend-hx/src/haxeAsyncIterationLowering.js +129 -0
- package/dist/packages/compiler-backend-hx/src/haxeAsyncIterationLowering.js.map +1 -0
- package/dist/packages/compiler-backend-hx/src/haxeCompilerBackend.d.ts +5 -0
- package/dist/packages/compiler-backend-hx/src/haxeCompilerBackend.d.ts.map +1 -0
- package/dist/packages/compiler-backend-hx/src/haxeCompilerBackend.js +5172 -0
- package/dist/packages/compiler-backend-hx/src/haxeCompilerBackend.js.map +1 -0
- package/dist/packages/compiler-backend-hx/src/haxeCompilerEmittedSourceSyntax.d.ts +3 -0
- package/dist/packages/compiler-backend-hx/src/haxeCompilerEmittedSourceSyntax.d.ts.map +1 -0
- package/dist/packages/compiler-backend-hx/src/haxeCompilerEmittedSourceSyntax.js +8 -0
- package/dist/packages/compiler-backend-hx/src/haxeCompilerEmittedSourceSyntax.js.map +1 -0
- package/dist/packages/compiler-backend-hx/src/haxeCompilerIdentity.d.ts +3 -0
- package/dist/packages/compiler-backend-hx/src/haxeCompilerIdentity.d.ts.map +1 -0
- package/dist/packages/compiler-backend-hx/src/haxeCompilerIdentity.js +51 -0
- package/dist/packages/compiler-backend-hx/src/haxeCompilerIdentity.js.map +1 -0
- package/dist/packages/compiler-backend-hx/src/haxeCompilerTargetCompilationSmoke.d.ts +3 -0
- package/dist/packages/compiler-backend-hx/src/haxeCompilerTargetCompilationSmoke.d.ts.map +1 -0
- package/dist/packages/compiler-backend-hx/src/haxeCompilerTargetCompilationSmoke.js +8 -0
- package/dist/packages/compiler-backend-hx/src/haxeCompilerTargetCompilationSmoke.js.map +1 -0
- package/dist/packages/compiler-backend-hx/src/haxeExternEmission.d.ts +40 -0
- package/dist/packages/compiler-backend-hx/src/haxeExternEmission.d.ts.map +1 -0
- package/dist/packages/compiler-backend-hx/src/haxeExternEmission.js +968 -0
- package/dist/packages/compiler-backend-hx/src/haxeExternEmission.js.map +1 -0
- package/dist/packages/compiler-backend-hx/src/haxeRuntimeAbiManifest.d.ts +3 -0
- package/dist/packages/compiler-backend-hx/src/haxeRuntimeAbiManifest.d.ts.map +1 -0
- package/dist/packages/compiler-backend-hx/src/haxeRuntimeAbiManifest.js +53 -0
- package/dist/packages/compiler-backend-hx/src/haxeRuntimeAbiManifest.js.map +1 -0
- package/dist/packages/compiler-backend-hx/src/haxeRuntimeExternalConstructorAbi.d.ts +3 -0
- package/dist/packages/compiler-backend-hx/src/haxeRuntimeExternalConstructorAbi.d.ts.map +1 -0
- package/dist/packages/compiler-backend-hx/src/haxeRuntimeExternalConstructorAbi.js +64 -0
- package/dist/packages/compiler-backend-hx/src/haxeRuntimeExternalConstructorAbi.js.map +1 -0
- package/dist/packages/compiler-backend-hx/src/haxeRuntimeExternalSymbolBinding.d.ts +8 -0
- package/dist/packages/compiler-backend-hx/src/haxeRuntimeExternalSymbolBinding.d.ts.map +1 -0
- package/dist/packages/compiler-backend-hx/src/haxeRuntimeExternalSymbolBinding.js +803 -0
- package/dist/packages/compiler-backend-hx/src/haxeRuntimeExternalSymbolBinding.js.map +1 -0
- package/dist/packages/compiler-backend-hx/src/haxeRuntimeTaskCapability.d.ts +3 -0
- package/dist/packages/compiler-backend-hx/src/haxeRuntimeTaskCapability.d.ts.map +1 -0
- package/dist/packages/compiler-backend-hx/src/haxeRuntimeTaskCapability.js +66 -0
- package/dist/packages/compiler-backend-hx/src/haxeRuntimeTaskCapability.js.map +1 -0
- package/dist/packages/compiler-backend-hx/src/haxeTaskEmission.d.ts +3 -0
- package/dist/packages/compiler-backend-hx/src/haxeTaskEmission.d.ts.map +1 -0
- package/dist/packages/compiler-backend-hx/src/haxeTaskEmission.js +361 -0
- package/dist/packages/compiler-backend-hx/src/haxeTaskEmission.js.map +1 -0
- package/dist/packages/compiler-backend-hx/src/haxeTaskLowering.d.ts +4 -0
- package/dist/packages/compiler-backend-hx/src/haxeTaskLowering.d.ts.map +1 -0
- package/dist/packages/compiler-backend-hx/src/haxeTaskLowering.js +265 -0
- package/dist/packages/compiler-backend-hx/src/haxeTaskLowering.js.map +1 -0
- package/dist/packages/compiler-backend-hx/src/haxeTypeEmission.d.ts +16 -0
- package/dist/packages/compiler-backend-hx/src/haxeTypeEmission.d.ts.map +1 -0
- package/dist/packages/compiler-backend-hx/src/haxeTypeEmission.js +134 -0
- package/dist/packages/compiler-backend-hx/src/haxeTypeEmission.js.map +1 -0
- package/dist/packages/compiler-backend-hx/src/index.d.ts +13 -0
- package/dist/packages/compiler-backend-hx/src/index.d.ts.map +1 -0
- package/dist/packages/compiler-backend-hx/src/index.js +13 -0
- package/dist/packages/compiler-backend-hx/src/index.js.map +1 -0
- package/dist/packages/compiler-backend-rs/src/index.d.ts +8 -0
- package/dist/packages/compiler-backend-rs/src/index.d.ts.map +1 -0
- package/dist/packages/compiler-backend-rs/src/index.js +8 -0
- package/dist/packages/compiler-backend-rs/src/index.js.map +1 -0
- package/dist/packages/compiler-backend-rs/src/rustAmbientMemberBinding.d.ts +3 -0
- package/dist/packages/compiler-backend-rs/src/rustAmbientMemberBinding.d.ts.map +1 -0
- package/dist/packages/compiler-backend-rs/src/rustAmbientMemberBinding.js +99 -0
- package/dist/packages/compiler-backend-rs/src/rustAmbientMemberBinding.js.map +1 -0
- package/dist/packages/compiler-backend-rs/src/rustCompilerBackend.d.ts +5 -0
- package/dist/packages/compiler-backend-rs/src/rustCompilerBackend.d.ts.map +1 -0
- package/dist/packages/compiler-backend-rs/src/rustCompilerBackend.js +4555 -0
- package/dist/packages/compiler-backend-rs/src/rustCompilerBackend.js.map +1 -0
- package/dist/packages/compiler-backend-rs/src/rustCompilerEmittedSourceSyntax.d.ts +3 -0
- package/dist/packages/compiler-backend-rs/src/rustCompilerEmittedSourceSyntax.d.ts.map +1 -0
- package/dist/packages/compiler-backend-rs/src/rustCompilerEmittedSourceSyntax.js +8 -0
- package/dist/packages/compiler-backend-rs/src/rustCompilerEmittedSourceSyntax.js.map +1 -0
- package/dist/packages/compiler-backend-rs/src/rustCompilerIdentity.d.ts +4 -0
- package/dist/packages/compiler-backend-rs/src/rustCompilerIdentity.d.ts.map +1 -0
- package/dist/packages/compiler-backend-rs/src/rustCompilerIdentity.js +113 -0
- package/dist/packages/compiler-backend-rs/src/rustCompilerIdentity.js.map +1 -0
- package/dist/packages/compiler-backend-rs/src/rustCompilerTargetCompilationSmoke.d.ts +3 -0
- package/dist/packages/compiler-backend-rs/src/rustCompilerTargetCompilationSmoke.d.ts.map +1 -0
- package/dist/packages/compiler-backend-rs/src/rustCompilerTargetCompilationSmoke.js +8 -0
- package/dist/packages/compiler-backend-rs/src/rustCompilerTargetCompilationSmoke.js.map +1 -0
- package/dist/packages/compiler-backend-rs/src/rustOwnershipEvidence.d.ts +5 -0
- package/dist/packages/compiler-backend-rs/src/rustOwnershipEvidence.d.ts.map +1 -0
- package/dist/packages/compiler-backend-rs/src/rustOwnershipEvidence.js +345 -0
- package/dist/packages/compiler-backend-rs/src/rustOwnershipEvidence.js.map +1 -0
- package/dist/packages/compiler-backend-rs/src/rustRuntimeExternalConstructorAbi.d.ts +3 -0
- package/dist/packages/compiler-backend-rs/src/rustRuntimeExternalConstructorAbi.d.ts.map +1 -0
- package/dist/packages/compiler-backend-rs/src/rustRuntimeExternalConstructorAbi.js +38 -0
- package/dist/packages/compiler-backend-rs/src/rustRuntimeExternalConstructorAbi.js.map +1 -0
- package/dist/packages/compiler-backend-rs/src/rustRuntimeExternalSymbolBinding.d.ts +6 -0
- package/dist/packages/compiler-backend-rs/src/rustRuntimeExternalSymbolBinding.d.ts.map +1 -0
- package/dist/packages/compiler-backend-rs/src/rustRuntimeExternalSymbolBinding.js +301 -0
- package/dist/packages/compiler-backend-rs/src/rustRuntimeExternalSymbolBinding.js.map +1 -0
- package/dist/packages/compiler-canonical-form/src/compilerPortablePath.d.ts +2 -0
- package/dist/packages/compiler-canonical-form/src/compilerPortablePath.d.ts.map +1 -0
- package/dist/packages/compiler-canonical-form/src/compilerPortablePath.js +4 -0
- package/dist/packages/compiler-canonical-form/src/compilerPortablePath.js.map +1 -0
- package/dist/packages/compiler-canonical-form/src/compilerStructuralValue.d.ts +2 -0
- package/dist/packages/compiler-canonical-form/src/compilerStructuralValue.d.ts.map +1 -0
- package/dist/packages/compiler-canonical-form/src/compilerStructuralValue.js +63 -0
- package/dist/packages/compiler-canonical-form/src/compilerStructuralValue.js.map +1 -0
- package/dist/packages/compiler-canonical-form/src/compilerTextOrder.d.ts +2 -0
- package/dist/packages/compiler-canonical-form/src/compilerTextOrder.d.ts.map +1 -0
- package/dist/packages/compiler-canonical-form/src/compilerTextOrder.js +4 -0
- package/dist/packages/compiler-canonical-form/src/compilerTextOrder.js.map +1 -0
- package/dist/packages/compiler-canonical-form/src/index.d.ts +4 -0
- package/dist/packages/compiler-canonical-form/src/index.d.ts.map +1 -0
- package/dist/packages/compiler-canonical-form/src/index.js +4 -0
- package/dist/packages/compiler-canonical-form/src/index.js.map +1 -0
- package/dist/packages/compiler-check/src/compilerPackageCheck.d.ts +9 -0
- package/dist/packages/compiler-check/src/compilerPackageCheck.d.ts.map +1 -0
- package/dist/packages/compiler-check/src/compilerPackageCheck.js +417 -0
- package/dist/packages/compiler-check/src/compilerPackageCheck.js.map +1 -0
- package/dist/packages/compiler-check/src/index.d.ts +2 -0
- package/dist/packages/compiler-check/src/index.d.ts.map +1 -0
- package/dist/packages/compiler-check/src/index.js +2 -0
- package/dist/packages/compiler-check/src/index.js.map +1 -0
- package/dist/packages/compiler-closure/src/compilerClosureEvidence.d.ts +3 -0
- package/dist/packages/compiler-closure/src/compilerClosureEvidence.d.ts.map +1 -0
- package/dist/packages/compiler-closure/src/compilerClosureEvidence.js +469 -0
- package/dist/packages/compiler-closure/src/compilerClosureEvidence.js.map +1 -0
- package/dist/packages/compiler-closure/src/index.d.ts +2 -0
- package/dist/packages/compiler-closure/src/index.d.ts.map +1 -0
- package/dist/packages/compiler-closure/src/index.js +2 -0
- package/dist/packages/compiler-closure/src/index.js.map +1 -0
- package/dist/packages/compiler-command-line/src/compilerCommandLine.d.ts +12 -0
- package/dist/packages/compiler-command-line/src/compilerCommandLine.d.ts.map +1 -0
- package/dist/packages/compiler-command-line/src/compilerCommandLine.js +549 -0
- package/dist/packages/compiler-command-line/src/compilerCommandLine.js.map +1 -0
- package/dist/packages/compiler-command-line/src/compilerCommandLineEntryPoint.d.ts +5 -0
- package/dist/packages/compiler-command-line/src/compilerCommandLineEntryPoint.d.ts.map +1 -0
- package/dist/packages/compiler-command-line/src/compilerCommandLineEntryPoint.js +134 -0
- package/dist/packages/compiler-command-line/src/compilerCommandLineEntryPoint.js.map +1 -0
- package/dist/packages/compiler-command-line/src/index.d.ts +3 -0
- package/dist/packages/compiler-command-line/src/index.d.ts.map +1 -0
- package/dist/packages/compiler-command-line/src/index.js +3 -0
- package/dist/packages/compiler-command-line/src/index.js.map +1 -0
- package/dist/packages/compiler-completion/src/compilerAsyncTaskCompletion.d.ts +6 -0
- package/dist/packages/compiler-completion/src/compilerAsyncTaskCompletion.d.ts.map +1 -0
- package/dist/packages/compiler-completion/src/compilerAsyncTaskCompletion.js +89 -0
- package/dist/packages/compiler-completion/src/compilerAsyncTaskCompletion.js.map +1 -0
- package/dist/packages/compiler-completion/src/compilerCatchCompletion.d.ts +6 -0
- package/dist/packages/compiler-completion/src/compilerCatchCompletion.d.ts.map +1 -0
- package/dist/packages/compiler-completion/src/compilerCatchCompletion.js +77 -0
- package/dist/packages/compiler-completion/src/compilerCatchCompletion.js.map +1 -0
- package/dist/packages/compiler-completion/src/compilerCompletionSet.d.ts +6 -0
- package/dist/packages/compiler-completion/src/compilerCompletionSet.d.ts.map +1 -0
- package/dist/packages/compiler-completion/src/compilerCompletionSet.js +110 -0
- package/dist/packages/compiler-completion/src/compilerCompletionSet.js.map +1 -0
- package/dist/packages/compiler-completion/src/compilerFinallyCompletion.d.ts +3 -0
- package/dist/packages/compiler-completion/src/compilerFinallyCompletion.d.ts.map +1 -0
- package/dist/packages/compiler-completion/src/compilerFinallyCompletion.js +13 -0
- package/dist/packages/compiler-completion/src/compilerFinallyCompletion.js.map +1 -0
- package/dist/packages/compiler-completion/src/compilerStatementCompletion.d.ts +4 -0
- package/dist/packages/compiler-completion/src/compilerStatementCompletion.d.ts.map +1 -0
- package/dist/packages/compiler-completion/src/compilerStatementCompletion.js +181 -0
- package/dist/packages/compiler-completion/src/compilerStatementCompletion.js.map +1 -0
- package/dist/packages/compiler-completion/src/compilerStatementValueCompletion.d.ts +5 -0
- package/dist/packages/compiler-completion/src/compilerStatementValueCompletion.d.ts.map +1 -0
- package/dist/packages/compiler-completion/src/compilerStatementValueCompletion.js +41 -0
- package/dist/packages/compiler-completion/src/compilerStatementValueCompletion.js.map +1 -0
- package/dist/packages/compiler-completion/src/compilerValueCompletion.d.ts +8 -0
- package/dist/packages/compiler-completion/src/compilerValueCompletion.d.ts.map +1 -0
- package/dist/packages/compiler-completion/src/compilerValueCompletion.js +208 -0
- package/dist/packages/compiler-completion/src/compilerValueCompletion.js.map +1 -0
- package/dist/packages/compiler-completion/src/index.d.ts +8 -0
- package/dist/packages/compiler-completion/src/index.d.ts.map +1 -0
- package/dist/packages/compiler-completion/src/index.js +8 -0
- package/dist/packages/compiler-completion/src/index.js.map +1 -0
- package/dist/packages/compiler-emission/src/compilerEmittedSourceSyntax.d.ts +4 -0
- package/dist/packages/compiler-emission/src/compilerEmittedSourceSyntax.d.ts.map +1 -0
- package/dist/packages/compiler-emission/src/compilerEmittedSourceSyntax.js +122 -0
- package/dist/packages/compiler-emission/src/compilerEmittedSourceSyntax.js.map +1 -0
- package/dist/packages/compiler-emission/src/compilerGeneratedFileProvenance.d.ts +3 -0
- package/dist/packages/compiler-emission/src/compilerGeneratedFileProvenance.d.ts.map +1 -0
- package/dist/packages/compiler-emission/src/compilerGeneratedFileProvenance.js +17 -0
- package/dist/packages/compiler-emission/src/compilerGeneratedFileProvenance.js.map +1 -0
- package/dist/packages/compiler-emission/src/compilerLiteralUnion.d.ts +3 -0
- package/dist/packages/compiler-emission/src/compilerLiteralUnion.d.ts.map +1 -0
- package/dist/packages/compiler-emission/src/compilerLiteralUnion.js +20 -0
- package/dist/packages/compiler-emission/src/compilerLiteralUnion.js.map +1 -0
- package/dist/packages/compiler-emission/src/compilerNullableFlowGuard.d.ts +4 -0
- package/dist/packages/compiler-emission/src/compilerNullableFlowGuard.d.ts.map +1 -0
- package/dist/packages/compiler-emission/src/compilerNullableFlowGuard.js +32 -0
- package/dist/packages/compiler-emission/src/compilerNullableFlowGuard.js.map +1 -0
- package/dist/packages/compiler-emission/src/compilerSourceEmission.d.ts +16 -0
- package/dist/packages/compiler-emission/src/compilerSourceEmission.d.ts.map +1 -0
- package/dist/packages/compiler-emission/src/compilerSourceEmission.js +176 -0
- package/dist/packages/compiler-emission/src/compilerSourceEmission.js.map +1 -0
- package/dist/packages/compiler-emission/src/compilerTargetCompilationSmoke.d.ts +4 -0
- package/dist/packages/compiler-emission/src/compilerTargetCompilationSmoke.d.ts.map +1 -0
- package/dist/packages/compiler-emission/src/compilerTargetCompilationSmoke.js +114 -0
- package/dist/packages/compiler-emission/src/compilerTargetCompilationSmoke.js.map +1 -0
- package/dist/packages/compiler-emission/src/compilerTargetNameAllocation.d.ts +5 -0
- package/dist/packages/compiler-emission/src/compilerTargetNameAllocation.d.ts.map +1 -0
- package/dist/packages/compiler-emission/src/compilerTargetNameAllocation.js +449 -0
- package/dist/packages/compiler-emission/src/compilerTargetNameAllocation.js.map +1 -0
- package/dist/packages/compiler-emission/src/index.d.ts +8 -0
- package/dist/packages/compiler-emission/src/index.d.ts.map +1 -0
- package/dist/packages/compiler-emission/src/index.js +8 -0
- package/dist/packages/compiler-emission/src/index.js.map +1 -0
- package/dist/packages/compiler-inventory/src/compilerInventoryFailure.d.ts +4 -0
- package/dist/packages/compiler-inventory/src/compilerInventoryFailure.d.ts.map +1 -0
- package/dist/packages/compiler-inventory/src/compilerInventoryFailure.js +42 -0
- package/dist/packages/compiler-inventory/src/compilerInventoryFailure.js.map +1 -0
- package/dist/packages/compiler-inventory/src/compilerModuleResolution.d.ts +4 -0
- package/dist/packages/compiler-inventory/src/compilerModuleResolution.d.ts.map +1 -0
- package/dist/packages/compiler-inventory/src/compilerModuleResolution.js +74 -0
- package/dist/packages/compiler-inventory/src/compilerModuleResolution.js.map +1 -0
- package/dist/packages/compiler-inventory/src/fileSystemWorkspaceSource.d.ts +3 -0
- package/dist/packages/compiler-inventory/src/fileSystemWorkspaceSource.d.ts.map +1 -0
- package/dist/packages/compiler-inventory/src/fileSystemWorkspaceSource.js +20 -0
- package/dist/packages/compiler-inventory/src/fileSystemWorkspaceSource.js.map +1 -0
- package/dist/packages/compiler-inventory/src/flightPackageEligibility.d.ts +5 -0
- package/dist/packages/compiler-inventory/src/flightPackageEligibility.d.ts.map +1 -0
- package/dist/packages/compiler-inventory/src/flightPackageEligibility.js +174 -0
- package/dist/packages/compiler-inventory/src/flightPackageEligibility.js.map +1 -0
- package/dist/packages/compiler-inventory/src/flightPackageExclusion.d.ts +3 -0
- package/dist/packages/compiler-inventory/src/flightPackageExclusion.d.ts.map +1 -0
- package/dist/packages/compiler-inventory/src/flightPackageExclusion.js +79 -0
- package/dist/packages/compiler-inventory/src/flightPackageExclusion.js.map +1 -0
- package/dist/packages/compiler-inventory/src/flightPackageExportLane.d.ts +4 -0
- package/dist/packages/compiler-inventory/src/flightPackageExportLane.d.ts.map +1 -0
- package/dist/packages/compiler-inventory/src/flightPackageExportLane.js +30 -0
- package/dist/packages/compiler-inventory/src/flightPackageExportLane.js.map +1 -0
- package/dist/packages/compiler-inventory/src/flightPackageExportManifest.d.ts +3 -0
- package/dist/packages/compiler-inventory/src/flightPackageExportManifest.d.ts.map +1 -0
- package/dist/packages/compiler-inventory/src/flightPackageExportManifest.js +90 -0
- package/dist/packages/compiler-inventory/src/flightPackageExportManifest.js.map +1 -0
- package/dist/packages/compiler-inventory/src/flightPackageHostFacts.d.ts +3 -0
- package/dist/packages/compiler-inventory/src/flightPackageHostFacts.d.ts.map +1 -0
- package/dist/packages/compiler-inventory/src/flightPackageHostFacts.js +33 -0
- package/dist/packages/compiler-inventory/src/flightPackageHostFacts.js.map +1 -0
- package/dist/packages/compiler-inventory/src/flightPackageImport.d.ts +3 -0
- package/dist/packages/compiler-inventory/src/flightPackageImport.d.ts.map +1 -0
- package/dist/packages/compiler-inventory/src/flightPackageImport.js +82 -0
- package/dist/packages/compiler-inventory/src/flightPackageImport.js.map +1 -0
- package/dist/packages/compiler-inventory/src/flightPackageManifest.d.ts +3 -0
- package/dist/packages/compiler-inventory/src/flightPackageManifest.d.ts.map +1 -0
- package/dist/packages/compiler-inventory/src/flightPackageManifest.js +116 -0
- package/dist/packages/compiler-inventory/src/flightPackageManifest.js.map +1 -0
- package/dist/packages/compiler-inventory/src/flightWorkspaceCompilationInput.d.ts +4 -0
- package/dist/packages/compiler-inventory/src/flightWorkspaceCompilationInput.d.ts.map +1 -0
- package/dist/packages/compiler-inventory/src/flightWorkspaceCompilationInput.js +315 -0
- package/dist/packages/compiler-inventory/src/flightWorkspaceCompilationInput.js.map +1 -0
- package/dist/packages/compiler-inventory/src/flightWorkspaceInventory.d.ts +3 -0
- package/dist/packages/compiler-inventory/src/flightWorkspaceInventory.d.ts.map +1 -0
- package/dist/packages/compiler-inventory/src/flightWorkspaceInventory.js +591 -0
- package/dist/packages/compiler-inventory/src/flightWorkspaceInventory.js.map +1 -0
- package/dist/packages/compiler-inventory/src/gitCheckoutRevision.d.ts +2 -0
- package/dist/packages/compiler-inventory/src/gitCheckoutRevision.d.ts.map +1 -0
- package/dist/packages/compiler-inventory/src/gitCheckoutRevision.js +20 -0
- package/dist/packages/compiler-inventory/src/gitCheckoutRevision.js.map +1 -0
- package/dist/packages/compiler-inventory/src/index.d.ts +17 -0
- package/dist/packages/compiler-inventory/src/index.d.ts.map +1 -0
- package/dist/packages/compiler-inventory/src/index.js +17 -0
- package/dist/packages/compiler-inventory/src/index.js.map +1 -0
- package/dist/packages/compiler-inventory/src/memoryWorkspaceSource.d.ts +3 -0
- package/dist/packages/compiler-inventory/src/memoryWorkspaceSource.d.ts.map +1 -0
- package/dist/packages/compiler-inventory/src/memoryWorkspaceSource.js +61 -0
- package/dist/packages/compiler-inventory/src/memoryWorkspaceSource.js.map +1 -0
- package/dist/packages/compiler-inventory/src/typeScriptHostEndpointInventory.d.ts +3 -0
- package/dist/packages/compiler-inventory/src/typeScriptHostEndpointInventory.d.ts.map +1 -0
- package/dist/packages/compiler-inventory/src/typeScriptHostEndpointInventory.js +138 -0
- package/dist/packages/compiler-inventory/src/typeScriptHostEndpointInventory.js.map +1 -0
- package/dist/packages/compiler-inventory/src/typeScriptProject.d.ts +3 -0
- package/dist/packages/compiler-inventory/src/typeScriptProject.d.ts.map +1 -0
- package/dist/packages/compiler-inventory/src/typeScriptProject.js +28 -0
- package/dist/packages/compiler-inventory/src/typeScriptProject.js.map +1 -0
- package/dist/packages/compiler-inventory/src/typeScriptRuntimeBinding.d.ts +7 -0
- package/dist/packages/compiler-inventory/src/typeScriptRuntimeBinding.d.ts.map +1 -0
- package/dist/packages/compiler-inventory/src/typeScriptRuntimeBinding.js +67 -0
- package/dist/packages/compiler-inventory/src/typeScriptRuntimeBinding.js.map +1 -0
- package/dist/packages/compiler-ir-traversal/src/compilerIntermediateRepresentationTraversal.d.ts +5 -0
- package/dist/packages/compiler-ir-traversal/src/compilerIntermediateRepresentationTraversal.d.ts.map +1 -0
- package/dist/packages/compiler-ir-traversal/src/compilerIntermediateRepresentationTraversal.js +469 -0
- package/dist/packages/compiler-ir-traversal/src/compilerIntermediateRepresentationTraversal.js.map +1 -0
- package/dist/packages/compiler-ir-traversal/src/compilerIntermediateRepresentationTraversalPath.d.ts +3 -0
- package/dist/packages/compiler-ir-traversal/src/compilerIntermediateRepresentationTraversalPath.d.ts.map +1 -0
- package/dist/packages/compiler-ir-traversal/src/compilerIntermediateRepresentationTraversalPath.js +14 -0
- package/dist/packages/compiler-ir-traversal/src/compilerIntermediateRepresentationTraversalPath.js.map +1 -0
- package/dist/packages/compiler-ir-traversal/src/index.d.ts +3 -0
- package/dist/packages/compiler-ir-traversal/src/index.d.ts.map +1 -0
- package/dist/packages/compiler-ir-traversal/src/index.js +3 -0
- package/dist/packages/compiler-ir-traversal/src/index.js.map +1 -0
- package/dist/packages/compiler-ir-validation/src/compilerIrModuleStructure.d.ts +3 -0
- package/dist/packages/compiler-ir-validation/src/compilerIrModuleStructure.d.ts.map +1 -0
- package/dist/packages/compiler-ir-validation/src/compilerIrModuleStructure.js +1258 -0
- package/dist/packages/compiler-ir-validation/src/compilerIrModuleStructure.js.map +1 -0
- package/dist/packages/compiler-ir-validation/src/index.d.ts +2 -0
- package/dist/packages/compiler-ir-validation/src/index.d.ts.map +1 -0
- package/dist/packages/compiler-ir-validation/src/index.js +2 -0
- package/dist/packages/compiler-ir-validation/src/index.js.map +1 -0
- package/dist/packages/compiler-lowering/src/compilerArrayBindingPatternLowering.d.ts +3 -0
- package/dist/packages/compiler-lowering/src/compilerArrayBindingPatternLowering.d.ts.map +1 -0
- package/dist/packages/compiler-lowering/src/compilerArrayBindingPatternLowering.js +717 -0
- package/dist/packages/compiler-lowering/src/compilerArrayBindingPatternLowering.js.map +1 -0
- package/dist/packages/compiler-lowering/src/compilerArrayBindingPatternPresence.d.ts +3 -0
- package/dist/packages/compiler-lowering/src/compilerArrayBindingPatternPresence.d.ts.map +1 -0
- package/dist/packages/compiler-lowering/src/compilerArrayBindingPatternPresence.js +162 -0
- package/dist/packages/compiler-lowering/src/compilerArrayBindingPatternPresence.js.map +1 -0
- package/dist/packages/compiler-lowering/src/compilerAwaitConditionHoistingLowering.d.ts +3 -0
- package/dist/packages/compiler-lowering/src/compilerAwaitConditionHoistingLowering.d.ts.map +1 -0
- package/dist/packages/compiler-lowering/src/compilerAwaitConditionHoistingLowering.js +721 -0
- package/dist/packages/compiler-lowering/src/compilerAwaitConditionHoistingLowering.js.map +1 -0
- package/dist/packages/compiler-lowering/src/compilerBindingPatternLowering.d.ts +4 -0
- package/dist/packages/compiler-lowering/src/compilerBindingPatternLowering.d.ts.map +1 -0
- package/dist/packages/compiler-lowering/src/compilerBindingPatternLowering.js +43 -0
- package/dist/packages/compiler-lowering/src/compilerBindingPatternLowering.js.map +1 -0
- package/dist/packages/compiler-lowering/src/compilerCStyleForLowering.d.ts +3 -0
- package/dist/packages/compiler-lowering/src/compilerCStyleForLowering.d.ts.map +1 -0
- package/dist/packages/compiler-lowering/src/compilerCStyleForLowering.js +591 -0
- package/dist/packages/compiler-lowering/src/compilerCStyleForLowering.js.map +1 -0
- package/dist/packages/compiler-lowering/src/compilerCatchAwaitHoistingLowering.d.ts +3 -0
- package/dist/packages/compiler-lowering/src/compilerCatchAwaitHoistingLowering.d.ts.map +1 -0
- package/dist/packages/compiler-lowering/src/compilerCatchAwaitHoistingLowering.js +244 -0
- package/dist/packages/compiler-lowering/src/compilerCatchAwaitHoistingLowering.js.map +1 -0
- package/dist/packages/compiler-lowering/src/compilerClassInitialization.d.ts +4 -0
- package/dist/packages/compiler-lowering/src/compilerClassInitialization.d.ts.map +1 -0
- package/dist/packages/compiler-lowering/src/compilerClassInitialization.js +102 -0
- package/dist/packages/compiler-lowering/src/compilerClassInitialization.js.map +1 -0
- package/dist/packages/compiler-lowering/src/compilerExtraArgumentErasureLowering.d.ts +3 -0
- package/dist/packages/compiler-lowering/src/compilerExtraArgumentErasureLowering.d.ts.map +1 -0
- package/dist/packages/compiler-lowering/src/compilerExtraArgumentErasureLowering.js +156 -0
- package/dist/packages/compiler-lowering/src/compilerExtraArgumentErasureLowering.js.map +1 -0
- package/dist/packages/compiler-lowering/src/compilerFinallyAwaitHoistingLowering.d.ts +3 -0
- package/dist/packages/compiler-lowering/src/compilerFinallyAwaitHoistingLowering.d.ts.map +1 -0
- package/dist/packages/compiler-lowering/src/compilerFinallyAwaitHoistingLowering.js +255 -0
- package/dist/packages/compiler-lowering/src/compilerFinallyAwaitHoistingLowering.js.map +1 -0
- package/dist/packages/compiler-lowering/src/compilerInterfaceInheritanceLowering.d.ts +3 -0
- package/dist/packages/compiler-lowering/src/compilerInterfaceInheritanceLowering.d.ts.map +1 -0
- package/dist/packages/compiler-lowering/src/compilerInterfaceInheritanceLowering.js +1062 -0
- package/dist/packages/compiler-lowering/src/compilerInterfaceInheritanceLowering.js.map +1 -0
- package/dist/packages/compiler-lowering/src/compilerLoweringPass.d.ts +5 -0
- package/dist/packages/compiler-lowering/src/compilerLoweringPass.d.ts.map +1 -0
- package/dist/packages/compiler-lowering/src/compilerLoweringPass.js +133 -0
- package/dist/packages/compiler-lowering/src/compilerLoweringPass.js.map +1 -0
- package/dist/packages/compiler-lowering/src/compilerObjectBindingPatternLowering.d.ts +3 -0
- package/dist/packages/compiler-lowering/src/compilerObjectBindingPatternLowering.d.ts.map +1 -0
- package/dist/packages/compiler-lowering/src/compilerObjectBindingPatternLowering.js +589 -0
- package/dist/packages/compiler-lowering/src/compilerObjectBindingPatternLowering.js.map +1 -0
- package/dist/packages/compiler-lowering/src/compilerSwitchClauseCompletion.d.ts +3 -0
- package/dist/packages/compiler-lowering/src/compilerSwitchClauseCompletion.d.ts.map +1 -0
- package/dist/packages/compiler-lowering/src/compilerSwitchClauseCompletion.js +71 -0
- package/dist/packages/compiler-lowering/src/compilerSwitchClauseCompletion.js.map +1 -0
- package/dist/packages/compiler-lowering/src/compilerSwitchFallthroughLowering.d.ts +3 -0
- package/dist/packages/compiler-lowering/src/compilerSwitchFallthroughLowering.d.ts.map +1 -0
- package/dist/packages/compiler-lowering/src/compilerSwitchFallthroughLowering.js +810 -0
- package/dist/packages/compiler-lowering/src/compilerSwitchFallthroughLowering.js.map +1 -0
- package/dist/packages/compiler-lowering/src/compilerSwitchSuspensionLowering.d.ts +3 -0
- package/dist/packages/compiler-lowering/src/compilerSwitchSuspensionLowering.d.ts.map +1 -0
- package/dist/packages/compiler-lowering/src/compilerSwitchSuspensionLowering.js +226 -0
- package/dist/packages/compiler-lowering/src/compilerSwitchSuspensionLowering.js.map +1 -0
- package/dist/packages/compiler-lowering/src/compilerVariableHoistingInitialization.d.ts +3 -0
- package/dist/packages/compiler-lowering/src/compilerVariableHoistingInitialization.d.ts.map +1 -0
- package/dist/packages/compiler-lowering/src/compilerVariableHoistingInitialization.js +724 -0
- package/dist/packages/compiler-lowering/src/compilerVariableHoistingInitialization.js.map +1 -0
- package/dist/packages/compiler-lowering/src/compilerVariableHoistingLowering.d.ts +3 -0
- package/dist/packages/compiler-lowering/src/compilerVariableHoistingLowering.d.ts.map +1 -0
- package/dist/packages/compiler-lowering/src/compilerVariableHoistingLowering.js +797 -0
- package/dist/packages/compiler-lowering/src/compilerVariableHoistingLowering.js.map +1 -0
- package/dist/packages/compiler-lowering/src/compilerVariableInitializationCompletion.d.ts +9 -0
- package/dist/packages/compiler-lowering/src/compilerVariableInitializationCompletion.d.ts.map +1 -0
- package/dist/packages/compiler-lowering/src/compilerVariableInitializationCompletion.js +42 -0
- package/dist/packages/compiler-lowering/src/compilerVariableInitializationCompletion.js.map +1 -0
- package/dist/packages/compiler-lowering/src/index.d.ts +17 -0
- package/dist/packages/compiler-lowering/src/index.d.ts.map +1 -0
- package/dist/packages/compiler-lowering/src/index.js +17 -0
- package/dist/packages/compiler-lowering/src/index.js.map +1 -0
- package/dist/packages/compiler-module/src/compilerModuleEvaluation.d.ts +4 -0
- package/dist/packages/compiler-module/src/compilerModuleEvaluation.d.ts.map +1 -0
- package/dist/packages/compiler-module/src/compilerModuleEvaluation.js +506 -0
- package/dist/packages/compiler-module/src/compilerModuleEvaluation.js.map +1 -0
- package/dist/packages/compiler-module/src/compilerModuleFacadeIdentity.d.ts +4 -0
- package/dist/packages/compiler-module/src/compilerModuleFacadeIdentity.d.ts.map +1 -0
- package/dist/packages/compiler-module/src/compilerModuleFacadeIdentity.js +182 -0
- package/dist/packages/compiler-module/src/compilerModuleFacadeIdentity.js.map +1 -0
- package/dist/packages/compiler-module/src/compilerModuleFacadeLowering.d.ts +4 -0
- package/dist/packages/compiler-module/src/compilerModuleFacadeLowering.d.ts.map +1 -0
- package/dist/packages/compiler-module/src/compilerModuleFacadeLowering.js +466 -0
- package/dist/packages/compiler-module/src/compilerModuleFacadeLowering.js.map +1 -0
- package/dist/packages/compiler-module/src/compilerModuleFacadeRequirement.d.ts +3 -0
- package/dist/packages/compiler-module/src/compilerModuleFacadeRequirement.d.ts.map +1 -0
- package/dist/packages/compiler-module/src/compilerModuleFacadeRequirement.js +28 -0
- package/dist/packages/compiler-module/src/compilerModuleFacadeRequirement.js.map +1 -0
- package/dist/packages/compiler-module/src/index.d.ts +5 -0
- package/dist/packages/compiler-module/src/index.d.ts.map +1 -0
- package/dist/packages/compiler-module/src/index.js +5 -0
- package/dist/packages/compiler-module/src/index.js.map +1 -0
- package/dist/packages/compiler-orchestration/src/compilerOrchestration.d.ts +8 -0
- package/dist/packages/compiler-orchestration/src/compilerOrchestration.d.ts.map +1 -0
- package/dist/packages/compiler-orchestration/src/compilerOrchestration.js +161 -0
- package/dist/packages/compiler-orchestration/src/compilerOrchestration.js.map +1 -0
- package/dist/packages/compiler-orchestration/src/compilerPackageCompilation.d.ts +4 -0
- package/dist/packages/compiler-orchestration/src/compilerPackageCompilation.d.ts.map +1 -0
- package/dist/packages/compiler-orchestration/src/compilerPackageCompilation.js +745 -0
- package/dist/packages/compiler-orchestration/src/compilerPackageCompilation.js.map +1 -0
- package/dist/packages/compiler-orchestration/src/flightWorkspaceCompilation.d.ts +3 -0
- package/dist/packages/compiler-orchestration/src/flightWorkspaceCompilation.d.ts.map +1 -0
- package/dist/packages/compiler-orchestration/src/flightWorkspaceCompilation.js +14 -0
- package/dist/packages/compiler-orchestration/src/flightWorkspaceCompilation.js.map +1 -0
- package/dist/packages/compiler-orchestration/src/index.d.ts +4 -0
- package/dist/packages/compiler-orchestration/src/index.d.ts.map +1 -0
- package/dist/packages/compiler-orchestration/src/index.js +4 -0
- package/dist/packages/compiler-orchestration/src/index.js.map +1 -0
- package/dist/packages/compiler-patch/src/compilerSemanticPatch.d.ts +6 -0
- package/dist/packages/compiler-patch/src/compilerSemanticPatch.d.ts.map +1 -0
- package/dist/packages/compiler-patch/src/compilerSemanticPatch.js +316 -0
- package/dist/packages/compiler-patch/src/compilerSemanticPatch.js.map +1 -0
- package/dist/packages/compiler-patch/src/index.d.ts +2 -0
- package/dist/packages/compiler-patch/src/index.d.ts.map +1 -0
- package/dist/packages/compiler-patch/src/index.js +2 -0
- package/dist/packages/compiler-patch/src/index.js.map +1 -0
- package/dist/packages/compiler-provenance/src/index.d.ts +2 -0
- package/dist/packages/compiler-provenance/src/index.d.ts.map +1 -0
- package/dist/packages/compiler-provenance/src/index.js +2 -0
- package/dist/packages/compiler-provenance/src/index.js.map +1 -0
- package/dist/packages/compiler-provenance/src/sourceFingerprint.d.ts +7 -0
- package/dist/packages/compiler-provenance/src/sourceFingerprint.d.ts.map +1 -0
- package/dist/packages/compiler-provenance/src/sourceFingerprint.js +58 -0
- package/dist/packages/compiler-provenance/src/sourceFingerprint.js.map +1 -0
- package/dist/packages/compiler-runtime-contract/src/compilerRuntimeExternalConstructorAbiCompleteness.d.ts +4 -0
- package/dist/packages/compiler-runtime-contract/src/compilerRuntimeExternalConstructorAbiCompleteness.d.ts.map +1 -0
- package/dist/packages/compiler-runtime-contract/src/compilerRuntimeExternalConstructorAbiCompleteness.js +110 -0
- package/dist/packages/compiler-runtime-contract/src/compilerRuntimeExternalConstructorAbiCompleteness.js.map +1 -0
- package/dist/packages/compiler-runtime-contract/src/compilerRuntimeExternalConstructorReachability.d.ts +3 -0
- package/dist/packages/compiler-runtime-contract/src/compilerRuntimeExternalConstructorReachability.d.ts.map +1 -0
- package/dist/packages/compiler-runtime-contract/src/compilerRuntimeExternalConstructorReachability.js +42 -0
- package/dist/packages/compiler-runtime-contract/src/compilerRuntimeExternalConstructorReachability.js.map +1 -0
- package/dist/packages/compiler-runtime-contract/src/compilerRuntimeExternalSymbolCompleteness.d.ts +4 -0
- package/dist/packages/compiler-runtime-contract/src/compilerRuntimeExternalSymbolCompleteness.d.ts.map +1 -0
- package/dist/packages/compiler-runtime-contract/src/compilerRuntimeExternalSymbolCompleteness.js +64 -0
- package/dist/packages/compiler-runtime-contract/src/compilerRuntimeExternalSymbolCompleteness.js.map +1 -0
- package/dist/packages/compiler-runtime-contract/src/compilerRuntimeExternalSymbolReachability.d.ts +3 -0
- package/dist/packages/compiler-runtime-contract/src/compilerRuntimeExternalSymbolReachability.d.ts.map +1 -0
- package/dist/packages/compiler-runtime-contract/src/compilerRuntimeExternalSymbolReachability.js +89 -0
- package/dist/packages/compiler-runtime-contract/src/compilerRuntimeExternalSymbolReachability.js.map +1 -0
- package/dist/packages/compiler-runtime-contract/src/compilerRuntimeTaskCapability.d.ts +6 -0
- package/dist/packages/compiler-runtime-contract/src/compilerRuntimeTaskCapability.d.ts.map +1 -0
- package/dist/packages/compiler-runtime-contract/src/compilerRuntimeTaskCapability.js +247 -0
- package/dist/packages/compiler-runtime-contract/src/compilerRuntimeTaskCapability.js.map +1 -0
- package/dist/packages/compiler-runtime-contract/src/index.d.ts +6 -0
- package/dist/packages/compiler-runtime-contract/src/index.d.ts.map +1 -0
- package/dist/packages/compiler-runtime-contract/src/index.js +6 -0
- package/dist/packages/compiler-runtime-contract/src/index.js.map +1 -0
- package/dist/packages/compiler-semantic/src/compilerIrStaticFacts.d.ts +4 -0
- package/dist/packages/compiler-semantic/src/compilerIrStaticFacts.d.ts.map +1 -0
- package/dist/packages/compiler-semantic/src/compilerIrStaticFacts.js +396 -0
- package/dist/packages/compiler-semantic/src/compilerIrStaticFacts.js.map +1 -0
- package/dist/packages/compiler-semantic/src/compilerIrTypeMemberEvidence.d.ts +4 -0
- package/dist/packages/compiler-semantic/src/compilerIrTypeMemberEvidence.d.ts.map +1 -0
- package/dist/packages/compiler-semantic/src/compilerIrTypeMemberEvidence.js +63 -0
- package/dist/packages/compiler-semantic/src/compilerIrTypeMemberEvidence.js.map +1 -0
- package/dist/packages/compiler-semantic/src/compilerOperatorDomainEvidence.d.ts +4 -0
- package/dist/packages/compiler-semantic/src/compilerOperatorDomainEvidence.d.ts.map +1 -0
- package/dist/packages/compiler-semantic/src/compilerOperatorDomainEvidence.js +76 -0
- package/dist/packages/compiler-semantic/src/compilerOperatorDomainEvidence.js.map +1 -0
- package/dist/packages/compiler-semantic/src/compilerStaticNumericArithmetic.d.ts +7 -0
- package/dist/packages/compiler-semantic/src/compilerStaticNumericArithmetic.d.ts.map +1 -0
- package/dist/packages/compiler-semantic/src/compilerStaticNumericArithmetic.js +107 -0
- package/dist/packages/compiler-semantic/src/compilerStaticNumericArithmetic.js.map +1 -0
- package/dist/packages/compiler-semantic/src/compilerTypeScriptForInKeyEvidence.d.ts +4 -0
- package/dist/packages/compiler-semantic/src/compilerTypeScriptForInKeyEvidence.d.ts.map +1 -0
- package/dist/packages/compiler-semantic/src/compilerTypeScriptForInKeyEvidence.js +159 -0
- package/dist/packages/compiler-semantic/src/compilerTypeScriptForInKeyEvidence.js.map +1 -0
- package/dist/packages/compiler-semantic/src/compilerTypeScriptInvocationSemantics.d.ts +4 -0
- package/dist/packages/compiler-semantic/src/compilerTypeScriptInvocationSemantics.d.ts.map +1 -0
- package/dist/packages/compiler-semantic/src/compilerTypeScriptInvocationSemantics.js +31 -0
- package/dist/packages/compiler-semantic/src/compilerTypeScriptInvocationSemantics.js.map +1 -0
- package/dist/packages/compiler-semantic/src/compilerTypeScriptSyntacticTypeEvidence.d.ts +8 -0
- package/dist/packages/compiler-semantic/src/compilerTypeScriptSyntacticTypeEvidence.d.ts.map +1 -0
- package/dist/packages/compiler-semantic/src/compilerTypeScriptSyntacticTypeEvidence.js +83 -0
- package/dist/packages/compiler-semantic/src/compilerTypeScriptSyntacticTypeEvidence.js.map +1 -0
- package/dist/packages/compiler-semantic/src/index.d.ts +4 -0
- package/dist/packages/compiler-semantic/src/index.d.ts.map +1 -0
- package/dist/packages/compiler-semantic/src/index.js +4 -0
- package/dist/packages/compiler-semantic/src/index.js.map +1 -0
- package/dist/packages/compiler-semantic/src/typeScriptSemanticLowering.d.ts +6 -0
- package/dist/packages/compiler-semantic/src/typeScriptSemanticLowering.d.ts.map +1 -0
- package/dist/packages/compiler-semantic/src/typeScriptSemanticLowering.js +8158 -0
- package/dist/packages/compiler-semantic/src/typeScriptSemanticLowering.js.map +1 -0
- package/dist/packages/compiler-structural/src/compilerStructuralObjectCompatibility.d.ts +5 -0
- package/dist/packages/compiler-structural/src/compilerStructuralObjectCompatibility.d.ts.map +1 -0
- package/dist/packages/compiler-structural/src/compilerStructuralObjectCompatibility.js +500 -0
- package/dist/packages/compiler-structural/src/compilerStructuralObjectCompatibility.js.map +1 -0
- package/dist/packages/compiler-structural/src/compilerStructuralObjectCopySemantics.d.ts +3 -0
- package/dist/packages/compiler-structural/src/compilerStructuralObjectCopySemantics.d.ts.map +1 -0
- package/dist/packages/compiler-structural/src/compilerStructuralObjectCopySemantics.js +11 -0
- package/dist/packages/compiler-structural/src/compilerStructuralObjectCopySemantics.js.map +1 -0
- package/dist/packages/compiler-structural/src/compilerStructuralTypeAssignability.d.ts +4 -0
- package/dist/packages/compiler-structural/src/compilerStructuralTypeAssignability.d.ts.map +1 -0
- package/dist/packages/compiler-structural/src/compilerStructuralTypeAssignability.js +261 -0
- package/dist/packages/compiler-structural/src/compilerStructuralTypeAssignability.js.map +1 -0
- package/dist/packages/compiler-structural/src/compilerStructuralTypeShapeIdentity.d.ts +4 -0
- package/dist/packages/compiler-structural/src/compilerStructuralTypeShapeIdentity.d.ts.map +1 -0
- package/dist/packages/compiler-structural/src/compilerStructuralTypeShapeIdentity.js +168 -0
- package/dist/packages/compiler-structural/src/compilerStructuralTypeShapeIdentity.js.map +1 -0
- package/dist/packages/compiler-structural/src/compilerStructuralTypeShapeInventory.d.ts +3 -0
- package/dist/packages/compiler-structural/src/compilerStructuralTypeShapeInventory.d.ts.map +1 -0
- package/dist/packages/compiler-structural/src/compilerStructuralTypeShapeInventory.js +50 -0
- package/dist/packages/compiler-structural/src/compilerStructuralTypeShapeInventory.js.map +1 -0
- package/dist/packages/compiler-structural/src/compilerStructuralTypeSubstitution.d.ts +5 -0
- package/dist/packages/compiler-structural/src/compilerStructuralTypeSubstitution.d.ts.map +1 -0
- package/dist/packages/compiler-structural/src/compilerStructuralTypeSubstitution.js +224 -0
- package/dist/packages/compiler-structural/src/compilerStructuralTypeSubstitution.js.map +1 -0
- package/dist/packages/compiler-structural/src/compilerTypeValueIdentityAnalysis.d.ts +4 -0
- package/dist/packages/compiler-structural/src/compilerTypeValueIdentityAnalysis.d.ts.map +1 -0
- package/dist/packages/compiler-structural/src/compilerTypeValueIdentityAnalysis.js +592 -0
- package/dist/packages/compiler-structural/src/compilerTypeValueIdentityAnalysis.js.map +1 -0
- package/dist/packages/compiler-structural/src/index.d.ts +8 -0
- package/dist/packages/compiler-structural/src/index.d.ts.map +1 -0
- package/dist/packages/compiler-structural/src/index.js +8 -0
- package/dist/packages/compiler-structural/src/index.js.map +1 -0
- package/dist/packages/compiler-task/src/compilerAsyncStateMachine.d.ts +3 -0
- package/dist/packages/compiler-task/src/compilerAsyncStateMachine.d.ts.map +1 -0
- package/dist/packages/compiler-task/src/compilerAsyncStateMachine.js +785 -0
- package/dist/packages/compiler-task/src/compilerAsyncStateMachine.js.map +1 -0
- package/dist/packages/compiler-task/src/compilerAsyncTaskInventory.d.ts +3 -0
- package/dist/packages/compiler-task/src/compilerAsyncTaskInventory.d.ts.map +1 -0
- package/dist/packages/compiler-task/src/compilerAsyncTaskInventory.js +182 -0
- package/dist/packages/compiler-task/src/compilerAsyncTaskInventory.js.map +1 -0
- package/dist/packages/compiler-task/src/compilerTaskOperationSemantics.d.ts +4 -0
- package/dist/packages/compiler-task/src/compilerTaskOperationSemantics.d.ts.map +1 -0
- package/dist/packages/compiler-task/src/compilerTaskOperationSemantics.js +101 -0
- package/dist/packages/compiler-task/src/compilerTaskOperationSemantics.js.map +1 -0
- package/dist/packages/compiler-task/src/index.d.ts +4 -0
- package/dist/packages/compiler-task/src/index.d.ts.map +1 -0
- package/dist/packages/compiler-task/src/index.js +4 -0
- package/dist/packages/compiler-task/src/index.js.map +1 -0
- package/dist/packages/compiler-types/src/compilerAccessSemanticIntermediateRepresentation.d.ts +79 -0
- package/dist/packages/compiler-types/src/compilerAccessSemanticIntermediateRepresentation.d.ts.map +1 -0
- package/dist/packages/compiler-types/src/compilerAccessSemanticIntermediateRepresentation.js +2 -0
- package/dist/packages/compiler-types/src/compilerAccessSemanticIntermediateRepresentation.js.map +1 -0
- package/dist/packages/compiler-types/src/compilerAmbientMemberBindingContract.d.ts +87 -0
- package/dist/packages/compiler-types/src/compilerAmbientMemberBindingContract.d.ts.map +1 -0
- package/dist/packages/compiler-types/src/compilerAmbientMemberBindingContract.js +2 -0
- package/dist/packages/compiler-types/src/compilerAmbientMemberBindingContract.js.map +1 -0
- package/dist/packages/compiler-types/src/compilerAsyncStateMachineContract.d.ts +126 -0
- package/dist/packages/compiler-types/src/compilerAsyncStateMachineContract.d.ts.map +1 -0
- package/dist/packages/compiler-types/src/compilerAsyncStateMachineContract.js +2 -0
- package/dist/packages/compiler-types/src/compilerAsyncStateMachineContract.js.map +1 -0
- package/dist/packages/compiler-types/src/compilerAsyncTaskCompletionContract.d.ts +32 -0
- package/dist/packages/compiler-types/src/compilerAsyncTaskCompletionContract.d.ts.map +1 -0
- package/dist/packages/compiler-types/src/compilerAsyncTaskCompletionContract.js +2 -0
- package/dist/packages/compiler-types/src/compilerAsyncTaskCompletionContract.js.map +1 -0
- package/dist/packages/compiler-types/src/compilerAsyncTaskInventoryContract.d.ts +63 -0
- package/dist/packages/compiler-types/src/compilerAsyncTaskInventoryContract.d.ts.map +1 -0
- package/dist/packages/compiler-types/src/compilerAsyncTaskInventoryContract.js +2 -0
- package/dist/packages/compiler-types/src/compilerAsyncTaskInventoryContract.js.map +1 -0
- package/dist/packages/compiler-types/src/compilerBackendContract.d.ts +183 -0
- package/dist/packages/compiler-types/src/compilerBackendContract.d.ts.map +1 -0
- package/dist/packages/compiler-types/src/compilerBackendContract.js +2 -0
- package/dist/packages/compiler-types/src/compilerBackendContract.js.map +1 -0
- package/dist/packages/compiler-types/src/compilerBindingIntermediateRepresentation.d.ts +46 -0
- package/dist/packages/compiler-types/src/compilerBindingIntermediateRepresentation.d.ts.map +1 -0
- package/dist/packages/compiler-types/src/compilerBindingIntermediateRepresentation.js +2 -0
- package/dist/packages/compiler-types/src/compilerBindingIntermediateRepresentation.js.map +1 -0
- package/dist/packages/compiler-types/src/compilerBindingPatternIntermediateRepresentation.d.ts +43 -0
- package/dist/packages/compiler-types/src/compilerBindingPatternIntermediateRepresentation.d.ts.map +1 -0
- package/dist/packages/compiler-types/src/compilerBindingPatternIntermediateRepresentation.js +2 -0
- package/dist/packages/compiler-types/src/compilerBindingPatternIntermediateRepresentation.js.map +1 -0
- package/dist/packages/compiler-types/src/compilerCatchCompletionContract.d.ts +23 -0
- package/dist/packages/compiler-types/src/compilerCatchCompletionContract.d.ts.map +1 -0
- package/dist/packages/compiler-types/src/compilerCatchCompletionContract.js +2 -0
- package/dist/packages/compiler-types/src/compilerCatchCompletionContract.js.map +1 -0
- package/dist/packages/compiler-types/src/compilerClassInitializationContract.d.ts +30 -0
- package/dist/packages/compiler-types/src/compilerClassInitializationContract.d.ts.map +1 -0
- package/dist/packages/compiler-types/src/compilerClassInitializationContract.js +2 -0
- package/dist/packages/compiler-types/src/compilerClassInitializationContract.js.map +1 -0
- package/dist/packages/compiler-types/src/compilerClosureEvidenceContract.d.ts +60 -0
- package/dist/packages/compiler-types/src/compilerClosureEvidenceContract.d.ts.map +1 -0
- package/dist/packages/compiler-types/src/compilerClosureEvidenceContract.js +2 -0
- package/dist/packages/compiler-types/src/compilerClosureEvidenceContract.js.map +1 -0
- package/dist/packages/compiler-types/src/compilerCommandLineContract.d.ts +79 -0
- package/dist/packages/compiler-types/src/compilerCommandLineContract.d.ts.map +1 -0
- package/dist/packages/compiler-types/src/compilerCommandLineContract.js +2 -0
- package/dist/packages/compiler-types/src/compilerCommandLineContract.js.map +1 -0
- package/dist/packages/compiler-types/src/compilerCompletionContract.d.ts +25 -0
- package/dist/packages/compiler-types/src/compilerCompletionContract.d.ts.map +1 -0
- package/dist/packages/compiler-types/src/compilerCompletionContract.js +2 -0
- package/dist/packages/compiler-types/src/compilerCompletionContract.js.map +1 -0
- package/dist/packages/compiler-types/src/compilerCppClosureCaptureContract.d.ts +21 -0
- package/dist/packages/compiler-types/src/compilerCppClosureCaptureContract.d.ts.map +1 -0
- package/dist/packages/compiler-types/src/compilerCppClosureCaptureContract.js +2 -0
- package/dist/packages/compiler-types/src/compilerCppClosureCaptureContract.js.map +1 -0
- package/dist/packages/compiler-types/src/compilerCppReferenceRepresentationContract.d.ts +74 -0
- package/dist/packages/compiler-types/src/compilerCppReferenceRepresentationContract.d.ts.map +1 -0
- package/dist/packages/compiler-types/src/compilerCppReferenceRepresentationContract.js +2 -0
- package/dist/packages/compiler-types/src/compilerCppReferenceRepresentationContract.js.map +1 -0
- package/dist/packages/compiler-types/src/compilerDeclarationIntermediateRepresentation.d.ts +113 -0
- package/dist/packages/compiler-types/src/compilerDeclarationIntermediateRepresentation.d.ts.map +1 -0
- package/dist/packages/compiler-types/src/compilerDeclarationIntermediateRepresentation.js +2 -0
- package/dist/packages/compiler-types/src/compilerDeclarationIntermediateRepresentation.js.map +1 -0
- package/dist/packages/compiler-types/src/compilerDependentCallablePackContract.d.ts +11 -0
- package/dist/packages/compiler-types/src/compilerDependentCallablePackContract.d.ts.map +1 -0
- package/dist/packages/compiler-types/src/compilerDependentCallablePackContract.js +2 -0
- package/dist/packages/compiler-types/src/compilerDependentCallablePackContract.js.map +1 -0
- package/dist/packages/compiler-types/src/compilerDiagnosticContract.d.ts +11 -0
- package/dist/packages/compiler-types/src/compilerDiagnosticContract.d.ts.map +1 -0
- package/dist/packages/compiler-types/src/compilerDiagnosticContract.js +2 -0
- package/dist/packages/compiler-types/src/compilerDiagnosticContract.js.map +1 -0
- package/dist/packages/compiler-types/src/compilerEmittedSourceSyntaxContract.d.ts +28 -0
- package/dist/packages/compiler-types/src/compilerEmittedSourceSyntaxContract.d.ts.map +1 -0
- package/dist/packages/compiler-types/src/compilerEmittedSourceSyntaxContract.js +2 -0
- package/dist/packages/compiler-types/src/compilerEmittedSourceSyntaxContract.js.map +1 -0
- package/dist/packages/compiler-types/src/compilerExecutableIntermediateRepresentation.d.ts +343 -0
- package/dist/packages/compiler-types/src/compilerExecutableIntermediateRepresentation.d.ts.map +1 -0
- package/dist/packages/compiler-types/src/compilerExecutableIntermediateRepresentation.js +2 -0
- package/dist/packages/compiler-types/src/compilerExecutableIntermediateRepresentation.js.map +1 -0
- package/dist/packages/compiler-types/src/compilerFlightWorkspaceContract.d.ts +26 -0
- package/dist/packages/compiler-types/src/compilerFlightWorkspaceContract.d.ts.map +1 -0
- package/dist/packages/compiler-types/src/compilerFlightWorkspaceContract.js +2 -0
- package/dist/packages/compiler-types/src/compilerFlightWorkspaceContract.js.map +1 -0
- package/dist/packages/compiler-types/src/compilerHaxeTaskEmissionContract.d.ts +12 -0
- package/dist/packages/compiler-types/src/compilerHaxeTaskEmissionContract.d.ts.map +1 -0
- package/dist/packages/compiler-types/src/compilerHaxeTaskEmissionContract.js +2 -0
- package/dist/packages/compiler-types/src/compilerHaxeTaskEmissionContract.js.map +1 -0
- package/dist/packages/compiler-types/src/compilerHaxeTaskLoweringContract.d.ts +119 -0
- package/dist/packages/compiler-types/src/compilerHaxeTaskLoweringContract.d.ts.map +1 -0
- package/dist/packages/compiler-types/src/compilerHaxeTaskLoweringContract.js +2 -0
- package/dist/packages/compiler-types/src/compilerHaxeTaskLoweringContract.js.map +1 -0
- package/dist/packages/compiler-types/src/compilerHostEndpointContract.d.ts +27 -0
- package/dist/packages/compiler-types/src/compilerHostEndpointContract.d.ts.map +1 -0
- package/dist/packages/compiler-types/src/compilerHostEndpointContract.js +2 -0
- package/dist/packages/compiler-types/src/compilerHostEndpointContract.js.map +1 -0
- package/dist/packages/compiler-types/src/compilerInvariantContract.d.ts +7 -0
- package/dist/packages/compiler-types/src/compilerInvariantContract.d.ts.map +1 -0
- package/dist/packages/compiler-types/src/compilerInvariantContract.js +2 -0
- package/dist/packages/compiler-types/src/compilerInvariantContract.js.map +1 -0
- package/dist/packages/compiler-types/src/compilerInventoryContract.d.ts +186 -0
- package/dist/packages/compiler-types/src/compilerInventoryContract.d.ts.map +1 -0
- package/dist/packages/compiler-types/src/compilerInventoryContract.js +2 -0
- package/dist/packages/compiler-types/src/compilerInventoryContract.js.map +1 -0
- package/dist/packages/compiler-types/src/compilerIrValidationContract.d.ts +13 -0
- package/dist/packages/compiler-types/src/compilerIrValidationContract.d.ts.map +1 -0
- package/dist/packages/compiler-types/src/compilerIrValidationContract.js +2 -0
- package/dist/packages/compiler-types/src/compilerIrValidationContract.js.map +1 -0
- package/dist/packages/compiler-types/src/compilerLoweringContract.d.ts +32 -0
- package/dist/packages/compiler-types/src/compilerLoweringContract.d.ts.map +1 -0
- package/dist/packages/compiler-types/src/compilerLoweringContract.js +2 -0
- package/dist/packages/compiler-types/src/compilerLoweringContract.js.map +1 -0
- package/dist/packages/compiler-types/src/compilerModuleEvaluationContract.d.ts +84 -0
- package/dist/packages/compiler-types/src/compilerModuleEvaluationContract.d.ts.map +1 -0
- package/dist/packages/compiler-types/src/compilerModuleEvaluationContract.js +2 -0
- package/dist/packages/compiler-types/src/compilerModuleEvaluationContract.js.map +1 -0
- package/dist/packages/compiler-types/src/compilerModuleFacadeContract.d.ts +78 -0
- package/dist/packages/compiler-types/src/compilerModuleFacadeContract.d.ts.map +1 -0
- package/dist/packages/compiler-types/src/compilerModuleFacadeContract.js +2 -0
- package/dist/packages/compiler-types/src/compilerModuleFacadeContract.js.map +1 -0
- package/dist/packages/compiler-types/src/compilerModuleIntermediateRepresentation.d.ts +53 -0
- package/dist/packages/compiler-types/src/compilerModuleIntermediateRepresentation.d.ts.map +1 -0
- package/dist/packages/compiler-types/src/compilerModuleIntermediateRepresentation.js +2 -0
- package/dist/packages/compiler-types/src/compilerModuleIntermediateRepresentation.js.map +1 -0
- package/dist/packages/compiler-types/src/compilerModuleResolutionContract.d.ts +20 -0
- package/dist/packages/compiler-types/src/compilerModuleResolutionContract.d.ts.map +1 -0
- package/dist/packages/compiler-types/src/compilerModuleResolutionContract.js +2 -0
- package/dist/packages/compiler-types/src/compilerModuleResolutionContract.js.map +1 -0
- package/dist/packages/compiler-types/src/compilerOperatorIntermediateRepresentation.d.ts +5 -0
- package/dist/packages/compiler-types/src/compilerOperatorIntermediateRepresentation.d.ts.map +1 -0
- package/dist/packages/compiler-types/src/compilerOperatorIntermediateRepresentation.js +2 -0
- package/dist/packages/compiler-types/src/compilerOperatorIntermediateRepresentation.js.map +1 -0
- package/dist/packages/compiler-types/src/compilerOperatorSemanticIntermediateRepresentation.d.ts +34 -0
- package/dist/packages/compiler-types/src/compilerOperatorSemanticIntermediateRepresentation.d.ts.map +1 -0
- package/dist/packages/compiler-types/src/compilerOperatorSemanticIntermediateRepresentation.js +2 -0
- package/dist/packages/compiler-types/src/compilerOperatorSemanticIntermediateRepresentation.js.map +1 -0
- package/dist/packages/compiler-types/src/compilerOrchestrationContract.d.ts +43 -0
- package/dist/packages/compiler-types/src/compilerOrchestrationContract.d.ts.map +1 -0
- package/dist/packages/compiler-types/src/compilerOrchestrationContract.js +2 -0
- package/dist/packages/compiler-types/src/compilerOrchestrationContract.js.map +1 -0
- package/dist/packages/compiler-types/src/compilerPackageCheckContract.d.ts +96 -0
- package/dist/packages/compiler-types/src/compilerPackageCheckContract.d.ts.map +1 -0
- package/dist/packages/compiler-types/src/compilerPackageCheckContract.js +2 -0
- package/dist/packages/compiler-types/src/compilerPackageCheckContract.js.map +1 -0
- package/dist/packages/compiler-types/src/compilerPackageCompilationContract.d.ts +108 -0
- package/dist/packages/compiler-types/src/compilerPackageCompilationContract.d.ts.map +1 -0
- package/dist/packages/compiler-types/src/compilerPackageCompilationContract.js +2 -0
- package/dist/packages/compiler-types/src/compilerPackageCompilationContract.js.map +1 -0
- package/dist/packages/compiler-types/src/compilerRefusalClassificationContract.d.ts +3 -0
- package/dist/packages/compiler-types/src/compilerRefusalClassificationContract.d.ts.map +1 -0
- package/dist/packages/compiler-types/src/compilerRefusalClassificationContract.js +2 -0
- package/dist/packages/compiler-types/src/compilerRefusalClassificationContract.js.map +1 -0
- package/dist/packages/compiler-types/src/compilerRuntimeContract.d.ts +122 -0
- package/dist/packages/compiler-types/src/compilerRuntimeContract.d.ts.map +1 -0
- package/dist/packages/compiler-types/src/compilerRuntimeContract.js +2 -0
- package/dist/packages/compiler-types/src/compilerRuntimeContract.js.map +1 -0
- package/dist/packages/compiler-types/src/compilerRuntimeTaskCapabilityContract.d.ts +96 -0
- package/dist/packages/compiler-types/src/compilerRuntimeTaskCapabilityContract.d.ts.map +1 -0
- package/dist/packages/compiler-types/src/compilerRuntimeTaskCapabilityContract.js +2 -0
- package/dist/packages/compiler-types/src/compilerRuntimeTaskCapabilityContract.js.map +1 -0
- package/dist/packages/compiler-types/src/compilerRustOwnershipContract.d.ts +25 -0
- package/dist/packages/compiler-types/src/compilerRustOwnershipContract.d.ts.map +1 -0
- package/dist/packages/compiler-types/src/compilerRustOwnershipContract.js +2 -0
- package/dist/packages/compiler-types/src/compilerRustOwnershipContract.js.map +1 -0
- package/dist/packages/compiler-types/src/compilerSemanticPatchContract.d.ts +80 -0
- package/dist/packages/compiler-types/src/compilerSemanticPatchContract.d.ts.map +1 -0
- package/dist/packages/compiler-types/src/compilerSemanticPatchContract.js +2 -0
- package/dist/packages/compiler-types/src/compilerSemanticPatchContract.js.map +1 -0
- package/dist/packages/compiler-types/src/compilerSourceFingerprint.d.ts +2 -0
- package/dist/packages/compiler-types/src/compilerSourceFingerprint.d.ts.map +1 -0
- package/dist/packages/compiler-types/src/compilerSourceFingerprint.js +2 -0
- package/dist/packages/compiler-types/src/compilerSourceFingerprint.js.map +1 -0
- package/dist/packages/compiler-types/src/compilerSourceIdentity.d.ts +21 -0
- package/dist/packages/compiler-types/src/compilerSourceIdentity.d.ts.map +1 -0
- package/dist/packages/compiler-types/src/compilerSourceIdentity.js +2 -0
- package/dist/packages/compiler-types/src/compilerSourceIdentity.js.map +1 -0
- package/dist/packages/compiler-types/src/compilerStatementCompletionContract.d.ts +7 -0
- package/dist/packages/compiler-types/src/compilerStatementCompletionContract.d.ts.map +1 -0
- package/dist/packages/compiler-types/src/compilerStatementCompletionContract.js +2 -0
- package/dist/packages/compiler-types/src/compilerStatementCompletionContract.js.map +1 -0
- package/dist/packages/compiler-types/src/compilerStaticFactContract.d.ts +71 -0
- package/dist/packages/compiler-types/src/compilerStaticFactContract.d.ts.map +1 -0
- package/dist/packages/compiler-types/src/compilerStaticFactContract.js +2 -0
- package/dist/packages/compiler-types/src/compilerStaticFactContract.js.map +1 -0
- package/dist/packages/compiler-types/src/compilerStructuralObjectCompatibilityContract.d.ts +18 -0
- package/dist/packages/compiler-types/src/compilerStructuralObjectCompatibilityContract.d.ts.map +1 -0
- package/dist/packages/compiler-types/src/compilerStructuralObjectCompatibilityContract.js +2 -0
- package/dist/packages/compiler-types/src/compilerStructuralObjectCompatibilityContract.js.map +1 -0
- package/dist/packages/compiler-types/src/compilerStructuralTypeAssignabilityContract.d.ts +20 -0
- package/dist/packages/compiler-types/src/compilerStructuralTypeAssignabilityContract.d.ts.map +1 -0
- package/dist/packages/compiler-types/src/compilerStructuralTypeAssignabilityContract.js +2 -0
- package/dist/packages/compiler-types/src/compilerStructuralTypeAssignabilityContract.js.map +1 -0
- package/dist/packages/compiler-types/src/compilerStructuralTypeShapeContract.d.ts +22 -0
- package/dist/packages/compiler-types/src/compilerStructuralTypeShapeContract.d.ts.map +1 -0
- package/dist/packages/compiler-types/src/compilerStructuralTypeShapeContract.js +2 -0
- package/dist/packages/compiler-types/src/compilerStructuralTypeShapeContract.js.map +1 -0
- package/dist/packages/compiler-types/src/compilerStructuralTypeSubstitutionContract.d.ts +17 -0
- package/dist/packages/compiler-types/src/compilerStructuralTypeSubstitutionContract.d.ts.map +1 -0
- package/dist/packages/compiler-types/src/compilerStructuralTypeSubstitutionContract.js +2 -0
- package/dist/packages/compiler-types/src/compilerStructuralTypeSubstitutionContract.js.map +1 -0
- package/dist/packages/compiler-types/src/compilerTargetCompilationSmokeContract.d.ts +26 -0
- package/dist/packages/compiler-types/src/compilerTargetCompilationSmokeContract.d.ts.map +1 -0
- package/dist/packages/compiler-types/src/compilerTargetCompilationSmokeContract.js +2 -0
- package/dist/packages/compiler-types/src/compilerTargetCompilationSmokeContract.js.map +1 -0
- package/dist/packages/compiler-types/src/compilerTargetNamingContract.d.ts +27 -0
- package/dist/packages/compiler-types/src/compilerTargetNamingContract.d.ts.map +1 -0
- package/dist/packages/compiler-types/src/compilerTargetNamingContract.js +2 -0
- package/dist/packages/compiler-types/src/compilerTargetNamingContract.js.map +1 -0
- package/dist/packages/compiler-types/src/compilerTaskOperationSemanticsContract.d.ts +65 -0
- package/dist/packages/compiler-types/src/compilerTaskOperationSemanticsContract.d.ts.map +1 -0
- package/dist/packages/compiler-types/src/compilerTaskOperationSemanticsContract.js +2 -0
- package/dist/packages/compiler-types/src/compilerTaskOperationSemanticsContract.js.map +1 -0
- package/dist/packages/compiler-types/src/compilerTraversalObserverContract.d.ts +29 -0
- package/dist/packages/compiler-types/src/compilerTraversalObserverContract.d.ts.map +1 -0
- package/dist/packages/compiler-types/src/compilerTraversalObserverContract.js +2 -0
- package/dist/packages/compiler-types/src/compilerTraversalObserverContract.js.map +1 -0
- package/dist/packages/compiler-types/src/compilerTypeIntermediateRepresentation.d.ts +99 -0
- package/dist/packages/compiler-types/src/compilerTypeIntermediateRepresentation.d.ts.map +1 -0
- package/dist/packages/compiler-types/src/compilerTypeIntermediateRepresentation.js +2 -0
- package/dist/packages/compiler-types/src/compilerTypeIntermediateRepresentation.js.map +1 -0
- package/dist/packages/compiler-types/src/compilerTypeScriptContract.d.ts +39 -0
- package/dist/packages/compiler-types/src/compilerTypeScriptContract.d.ts.map +1 -0
- package/dist/packages/compiler-types/src/compilerTypeScriptContract.js +2 -0
- package/dist/packages/compiler-types/src/compilerTypeScriptContract.js.map +1 -0
- package/dist/packages/compiler-types/src/compilerTypeValueIdentityContract.d.ts +14 -0
- package/dist/packages/compiler-types/src/compilerTypeValueIdentityContract.d.ts.map +1 -0
- package/dist/packages/compiler-types/src/compilerTypeValueIdentityContract.js +2 -0
- package/dist/packages/compiler-types/src/compilerTypeValueIdentityContract.js.map +1 -0
- package/dist/packages/compiler-types/src/compilerValueCompletionContract.d.ts +46 -0
- package/dist/packages/compiler-types/src/compilerValueCompletionContract.d.ts.map +1 -0
- package/dist/packages/compiler-types/src/compilerValueCompletionContract.js +2 -0
- package/dist/packages/compiler-types/src/compilerValueCompletionContract.js.map +1 -0
- package/dist/packages/compiler-types/src/compilerWorkspaceSourceContract.d.ts +11 -0
- package/dist/packages/compiler-types/src/compilerWorkspaceSourceContract.d.ts.map +1 -0
- package/dist/packages/compiler-types/src/compilerWorkspaceSourceContract.js +12 -0
- package/dist/packages/compiler-types/src/compilerWorkspaceSourceContract.js.map +1 -0
- package/dist/packages/compiler-types/src/index.d.ts +60 -0
- package/dist/packages/compiler-types/src/index.d.ts.map +1 -0
- package/dist/packages/compiler-types/src/index.js +2 -0
- package/dist/packages/compiler-types/src/index.js.map +1 -0
- package/dist/packages/tool-compiler/src/index.d.ts +24 -0
- package/dist/packages/tool-compiler/src/index.d.ts.map +1 -0
- package/dist/packages/tool-compiler/src/index.js +23 -0
- package/dist/packages/tool-compiler/src/index.js.map +1 -0
- package/package.json +45 -0
|
@@ -0,0 +1,1062 @@
|
|
|
1
|
+
import { isDeepStrictEqual } from 'node:util';
|
|
2
|
+
import { compareTextCodeUnits, normalizePathPortable } from '../../compiler-canonical-form/src/index.js';
|
|
3
|
+
import { analyzeIrModuleTraversal } from '../../compiler-ir-traversal/src/index.js';
|
|
4
|
+
import { analyzeIrTypeStructuralAssignability, createIrTypeParameterSubstitutionPlan, isCompilerStructuralTypeSubstitutionFailure, resolveIrTypeStructuralSubstitution, } from '../../compiler-structural/src/index.js';
|
|
5
|
+
import { createCompilerLoweringFailure } from './compilerLoweringPass.js';
|
|
6
|
+
const compilerLoweringPassNameInterfaceInheritance = 'interface-inheritance';
|
|
7
|
+
export function createCompilerLoweringPassInterfaceInheritance(modules = [], resolution = compilerEmptyModuleResolutionPlan, options = {}) {
|
|
8
|
+
let moduleIndex;
|
|
9
|
+
return {
|
|
10
|
+
idempotent: true,
|
|
11
|
+
lowerIrModule(module) {
|
|
12
|
+
moduleIndex ??= createInterfaceInheritanceModuleIndex(modules, resolution ?? compilerEmptyModuleResolutionPlan);
|
|
13
|
+
return lowerIrModuleInterfaceInheritance(module, moduleIndex, options);
|
|
14
|
+
},
|
|
15
|
+
name: compilerLoweringPassNameInterfaceInheritance,
|
|
16
|
+
runsAfter: [],
|
|
17
|
+
verifyIrModule(module) {
|
|
18
|
+
let inherited = false;
|
|
19
|
+
analyzeIrModuleTraversal(module, {
|
|
20
|
+
declaration(declaration) {
|
|
21
|
+
if (declaration.kind === 'interface' && declaration.extends.length > 0)
|
|
22
|
+
inherited = true;
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
return inherited
|
|
26
|
+
? {
|
|
27
|
+
kind: 'invalid',
|
|
28
|
+
reason: 'interface inheritance remains after structural flattening',
|
|
29
|
+
}
|
|
30
|
+
: { kind: 'valid' };
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
function createInterfaceInheritanceModuleIndex(modules, resolution) {
|
|
35
|
+
const records = modules.map(createInterfaceInheritanceModuleRecord).sort(compareInterfaceInheritanceRecords);
|
|
36
|
+
if (records.some((record, index) => index > 0 && record.identity === records[index - 1].identity)) {
|
|
37
|
+
throw new TypeError('Interface inheritance module set contains a duplicate module identity');
|
|
38
|
+
}
|
|
39
|
+
const declarationModulesByBindingId = new Map();
|
|
40
|
+
const importModulesByBindingId = new Map();
|
|
41
|
+
const modulesByPackageSource = new Map();
|
|
42
|
+
const valueModulesByName = new Map();
|
|
43
|
+
for (const record of records) {
|
|
44
|
+
addInterfaceInheritanceModuleIndexEntry(modulesByPackageSource, `${record.module.packageName}\0${record.source}`, record);
|
|
45
|
+
for (const bindingId of record.declarations.keys()) {
|
|
46
|
+
addInterfaceInheritanceModuleIndexEntry(declarationModulesByBindingId, bindingId, record);
|
|
47
|
+
}
|
|
48
|
+
for (const bindingId of record.importsByBindingId.keys()) {
|
|
49
|
+
addInterfaceInheritanceModuleIndexEntry(importModulesByBindingId, bindingId, record);
|
|
50
|
+
}
|
|
51
|
+
const valueNames = new Set(record.module.declarations.flatMap((declaration) => declaration.kind === 'variable' && 'binding' in declaration ? [declaration.binding.name] : []));
|
|
52
|
+
for (const imported of record.module.imports) {
|
|
53
|
+
for (const binding of imported.bindings)
|
|
54
|
+
valueNames.add(binding.binding.name);
|
|
55
|
+
}
|
|
56
|
+
for (const name of valueNames)
|
|
57
|
+
addInterfaceInheritanceModuleIndexEntry(valueModulesByName, name, record);
|
|
58
|
+
}
|
|
59
|
+
return {
|
|
60
|
+
declarationModulesByBindingId,
|
|
61
|
+
importModulesByBindingId,
|
|
62
|
+
modulesByIdentity: new Map(records.map((record) => [record.identity, record])),
|
|
63
|
+
modulesByPackageSource,
|
|
64
|
+
resolutionTargetsBySpecifier: createInterfaceInheritanceResolutionTargets(resolution),
|
|
65
|
+
valueModulesByName,
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
function lowerIrModuleInterfaceInheritance(module, moduleIndex, options) {
|
|
69
|
+
const moduleSet = createInterfaceInheritanceModuleSet(module, moduleIndex);
|
|
70
|
+
const subject = getInterfaceInheritanceModuleRecord(module, moduleSet);
|
|
71
|
+
if (!subject)
|
|
72
|
+
throw new TypeError('Interface inheritance subject must belong to the explicit module set');
|
|
73
|
+
const context = {
|
|
74
|
+
importedTypeBindings: new Map(),
|
|
75
|
+
imports: module.imports.map((imported) => ({
|
|
76
|
+
...imported,
|
|
77
|
+
bindings: [...imported.bindings],
|
|
78
|
+
})),
|
|
79
|
+
module: subject,
|
|
80
|
+
moduleSet,
|
|
81
|
+
options,
|
|
82
|
+
subject: module,
|
|
83
|
+
};
|
|
84
|
+
return {
|
|
85
|
+
...module,
|
|
86
|
+
declarations: module.declarations.map((declaration) => declaration.kind === 'interface' ? lowerIrInterfaceDeclarationInheritance(declaration, context) : declaration),
|
|
87
|
+
imports: context.imports,
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
function lowerIrInterfaceDeclarationInheritance(declaration, context) {
|
|
91
|
+
const inherited = declaration.extends.length > 0;
|
|
92
|
+
const properties = getIrInterfaceDeclarationPropertiesFlattened(getInterfaceInheritanceDeclarationLocation(declaration, context.module), createIrTypeParameterSubstitutionPlan([], []), new Set(), context);
|
|
93
|
+
return {
|
|
94
|
+
...declaration,
|
|
95
|
+
extends: [],
|
|
96
|
+
properties: inherited
|
|
97
|
+
? properties.map((property, index) => rebindIrInterfacePropertyTypeParameters(property, declaration, index, context))
|
|
98
|
+
: properties,
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
function getIrInterfaceDeclarationPropertiesFlattened(location, substitutions, ancestors, context) {
|
|
102
|
+
const declaration = location.declaration;
|
|
103
|
+
if (ancestors.has(location.identity)) {
|
|
104
|
+
failIrInterfaceInheritanceLowering(context.subject, `interface ${declaration.binding.name} has cyclic structural inheritance`);
|
|
105
|
+
}
|
|
106
|
+
const nextAncestors = new Set(ancestors).add(location.identity);
|
|
107
|
+
if (declaration.kind === 'class') {
|
|
108
|
+
return getIrInterfaceHeritageClassPropertiesFlattened(location, nextAncestors, substitutions, context);
|
|
109
|
+
}
|
|
110
|
+
if (declaration.kind === 'typeAlias') {
|
|
111
|
+
return getIrInterfaceHeritageTypePropertiesFlattened(resolveIrTypeStructuralSubstitution(declaration.type, substitutions), location, nextAncestors, context);
|
|
112
|
+
}
|
|
113
|
+
const properties = [];
|
|
114
|
+
for (const reference of declaration.extends) {
|
|
115
|
+
const utilityProperties = getIrInterfaceUtilityHeritagePropertiesFlattened(reference, location, nextAncestors, substitutions, context);
|
|
116
|
+
if (utilityProperties) {
|
|
117
|
+
for (const property of utilityProperties) {
|
|
118
|
+
addIrInterfacePropertyFlattened(property, declaration, properties, context);
|
|
119
|
+
}
|
|
120
|
+
continue;
|
|
121
|
+
}
|
|
122
|
+
const base = getIrInterfaceDeclarationBase(reference, location, context);
|
|
123
|
+
const baseSubstitutions = getIrInterfaceTypeSubstitutionPlan(reference, base.declaration, substitutions, context);
|
|
124
|
+
for (const property of getIrInterfaceDeclarationPropertiesFlattened(base, baseSubstitutions, nextAncestors, context)) {
|
|
125
|
+
addIrInterfacePropertyFlattened(property, declaration, properties, context);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
for (const property of declaration.properties) {
|
|
129
|
+
addIrInterfacePropertyFlattened({
|
|
130
|
+
...property,
|
|
131
|
+
type: resolveIrTypeStructuralSubstitution(property.type, substitutions),
|
|
132
|
+
}, declaration, properties, context, true);
|
|
133
|
+
}
|
|
134
|
+
return properties;
|
|
135
|
+
}
|
|
136
|
+
function getIrInterfaceUtilityHeritagePropertiesFlattened(reference, location, ancestors, substitutions, context) {
|
|
137
|
+
// A backend may intentionally represent a direct ambient base through its host ABI rather than
|
|
138
|
+
// copying a platform declaration into the portable structural surface. This is opt-in because
|
|
139
|
+
// erasing an unknown base without a target-owned representation would lose its contract.
|
|
140
|
+
if (reference.reference.kind === 'ambient' &&
|
|
141
|
+
location.declaration.kind === 'interface' &&
|
|
142
|
+
context.options.eraseAmbientHeritage?.(reference, location.declaration)) {
|
|
143
|
+
return [];
|
|
144
|
+
}
|
|
145
|
+
// Semantic lowering has already materialized a successfully lowered ReturnType heritage into the
|
|
146
|
+
// interface's own property list. There is no callable type left to resolve at this structural pass,
|
|
147
|
+
// and retaining the ambient utility edge would turn complete evidence back into a nonlocal refusal.
|
|
148
|
+
if (reference.reference.kind === 'ambient' && reference.reference.name === 'ReturnType')
|
|
149
|
+
return [];
|
|
150
|
+
if (location.declaration.kind === 'interface' &&
|
|
151
|
+
context.options.eraseAmbientUtilityHeritage?.(reference, location.declaration) &&
|
|
152
|
+
isIrInterfaceAmbientPickHeritageFullyMaterialized(reference, location, substitutions, context)) {
|
|
153
|
+
return [];
|
|
154
|
+
}
|
|
155
|
+
if (reference.reference.kind !== 'ambient')
|
|
156
|
+
return undefined;
|
|
157
|
+
const utility = reference.reference.name;
|
|
158
|
+
if (!['Omit', 'Partial', 'Pick', 'Readonly', 'Required'].includes(utility))
|
|
159
|
+
return undefined;
|
|
160
|
+
const expectedArguments = utility === 'Omit' || utility === 'Pick' ? 2 : 1;
|
|
161
|
+
if (reference.typeArguments.length !== expectedArguments) {
|
|
162
|
+
return failIrInterfaceInheritanceLowering(context.subject, `interface ${location.declaration.binding.name} inherits ${utility} with invalid type argument count`);
|
|
163
|
+
}
|
|
164
|
+
const target = resolveIrTypeStructuralSubstitution(reference.typeArguments[0], substitutions);
|
|
165
|
+
const properties = getIrInterfaceHeritageTypePropertiesFlattened(target, location, ancestors, context);
|
|
166
|
+
if (utility === 'Partial')
|
|
167
|
+
return properties.map((property) => ({ ...property, optional: true }));
|
|
168
|
+
if (utility === 'Readonly')
|
|
169
|
+
return properties.map((property) => ({ ...property, readonly: true }));
|
|
170
|
+
if (utility === 'Required')
|
|
171
|
+
return properties.map((property) => ({ ...property, optional: false }));
|
|
172
|
+
const keys = getIrInterfaceUtilityHeritageKeys(resolveIrTypeStructuralSubstitution(reference.typeArguments[1], substitutions), location, context);
|
|
173
|
+
return properties.filter((property) => (utility === 'Pick') === keys.has(property.name));
|
|
174
|
+
}
|
|
175
|
+
function isIrInterfaceAmbientPickHeritageFullyMaterialized(reference, location, substitutions, context) {
|
|
176
|
+
if (location.declaration.kind !== 'interface' ||
|
|
177
|
+
reference.reference.kind !== 'ambient' ||
|
|
178
|
+
reference.reference.name !== 'Pick' ||
|
|
179
|
+
reference.typeArguments.length !== 2) {
|
|
180
|
+
return false;
|
|
181
|
+
}
|
|
182
|
+
const keys = getIrInterfaceUtilityHeritageKeys(resolveIrTypeStructuralSubstitution(reference.typeArguments[1], substitutions), location, context);
|
|
183
|
+
const materialized = new Set(location.declaration.properties.map((property) => property.name));
|
|
184
|
+
return [...keys].every((key) => materialized.has(key));
|
|
185
|
+
}
|
|
186
|
+
function getIrInterfaceUtilityHeritageKeys(type, location, context) {
|
|
187
|
+
const resolved = resolveIrTypeInterfaceInheritance(type, location.module, context, new Set());
|
|
188
|
+
const members = resolved.kind === 'union' ? resolved.types : [resolved];
|
|
189
|
+
const keys = new Set();
|
|
190
|
+
for (const member of members) {
|
|
191
|
+
if (member.kind === 'never')
|
|
192
|
+
continue;
|
|
193
|
+
if (member.kind !== 'literal' || typeof member.value !== 'string') {
|
|
194
|
+
return failIrInterfaceInheritanceLowering(context.subject, `interface ${location.declaration.binding.name} inherits utility with nonliteral property keys`);
|
|
195
|
+
}
|
|
196
|
+
keys.add(member.value);
|
|
197
|
+
}
|
|
198
|
+
return keys;
|
|
199
|
+
}
|
|
200
|
+
function getIrInterfaceHeritageClassPropertiesFlattened(location, ancestors, substitutions, context) {
|
|
201
|
+
const declaration = location.declaration;
|
|
202
|
+
if (declaration.kind !== 'class')
|
|
203
|
+
throw new TypeError('Class heritage location must contain a class');
|
|
204
|
+
const properties = [];
|
|
205
|
+
if (declaration.extends) {
|
|
206
|
+
const base = getIrInterfaceDeclarationBase(declaration.extends, location, context);
|
|
207
|
+
const baseSubstitutions = getIrInterfaceTypeSubstitutionPlan(declaration.extends, base.declaration, substitutions, context);
|
|
208
|
+
for (const property of getIrInterfaceDeclarationPropertiesFlattened(base, baseSubstitutions, ancestors, context)) {
|
|
209
|
+
addIrInterfacePropertyFlattened(property, declaration, properties, context);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
for (const field of declaration.fields) {
|
|
213
|
+
if (field.static)
|
|
214
|
+
continue;
|
|
215
|
+
if (field.visibility !== 'public' || field.branded) {
|
|
216
|
+
return failIrInterfaceInheritanceLowering(context.subject, `class ${declaration.binding.name} heritage has nominal field ${field.name}`);
|
|
217
|
+
}
|
|
218
|
+
addIrInterfacePropertyFlattened({
|
|
219
|
+
name: field.name,
|
|
220
|
+
optional: field.optional,
|
|
221
|
+
readonly: field.readonly,
|
|
222
|
+
type: resolveIrTypeStructuralSubstitution(field.type, substitutions),
|
|
223
|
+
}, declaration, properties, context);
|
|
224
|
+
}
|
|
225
|
+
for (const method of declaration.methods) {
|
|
226
|
+
if (method.static)
|
|
227
|
+
continue;
|
|
228
|
+
if (method.visibility !== 'public' || method.branded || method.accessor) {
|
|
229
|
+
return failIrInterfaceInheritanceLowering(context.subject, `class ${declaration.binding.name} heritage has unsupported method ${method.name}`);
|
|
230
|
+
}
|
|
231
|
+
const signatures = [...method.overloads, method].map((signature) => resolveIrTypeStructuralSubstitution(getIrInterfaceHeritageClassMethodType(signature), substitutions));
|
|
232
|
+
const [first, second, ...rest] = signatures;
|
|
233
|
+
addIrInterfacePropertyFlattened({
|
|
234
|
+
name: method.name,
|
|
235
|
+
optional: false,
|
|
236
|
+
readonly: true,
|
|
237
|
+
type: first && second ? { kind: 'intersection', types: [first, second, ...rest] } : first,
|
|
238
|
+
}, declaration, properties, context);
|
|
239
|
+
}
|
|
240
|
+
return properties;
|
|
241
|
+
}
|
|
242
|
+
function getIrInterfaceHeritageClassMethodType(signature) {
|
|
243
|
+
return {
|
|
244
|
+
kind: 'function',
|
|
245
|
+
parameters: signature.parameters.map((parameter) => {
|
|
246
|
+
const value = { name: parameter.binding.name, type: parameter.type };
|
|
247
|
+
if (parameter.rest)
|
|
248
|
+
return { ...value, optional: false, rest: true };
|
|
249
|
+
return parameter.optional
|
|
250
|
+
? { ...value, optional: true, rest: false }
|
|
251
|
+
: { ...value, optional: false, rest: false };
|
|
252
|
+
}),
|
|
253
|
+
returns: signature.returns,
|
|
254
|
+
typeParameters: signature.typeParameters,
|
|
255
|
+
};
|
|
256
|
+
}
|
|
257
|
+
function getIrInterfaceHeritageTypePropertiesFlattened(type, location, ancestors, context) {
|
|
258
|
+
if (type.kind === 'object')
|
|
259
|
+
return type.properties;
|
|
260
|
+
if (type.kind === 'named') {
|
|
261
|
+
const base = getIrInterfaceDeclarationBase(type, location, context);
|
|
262
|
+
const substitutions = getIrInterfaceTypeSubstitutionPlan(type, base.declaration, createIrTypeParameterSubstitutionPlan([], []), context);
|
|
263
|
+
return getIrInterfaceDeclarationPropertiesFlattened(base, substitutions, ancestors, context);
|
|
264
|
+
}
|
|
265
|
+
if (type.kind === 'intersection') {
|
|
266
|
+
const properties = [];
|
|
267
|
+
for (const member of type.types) {
|
|
268
|
+
for (const property of getIrInterfaceHeritageTypePropertiesFlattened(member, location, ancestors, context)) {
|
|
269
|
+
addIrInterfacePropertyFlattened(property, location.declaration, properties, context);
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
return properties;
|
|
273
|
+
}
|
|
274
|
+
return failIrInterfaceInheritanceLowering(context.subject, `heritage type alias ${location.declaration.binding.name} is not object-shaped`);
|
|
275
|
+
}
|
|
276
|
+
function getIrInterfaceDeclarationBase(reference, location, context) {
|
|
277
|
+
return getIrInterfaceDeclarationBaseFromModule(reference, location.module, location.declaration.binding.name, context);
|
|
278
|
+
}
|
|
279
|
+
function getIrInterfaceDeclarationBaseFromModule(reference, module, subjectName, context) {
|
|
280
|
+
if (reference.reference.kind !== 'binding') {
|
|
281
|
+
return failIrInterfaceInheritanceLowering(context.subject, `interface ${subjectName} inherits a nonlocal interface that cannot be structurally resolved`);
|
|
282
|
+
}
|
|
283
|
+
const bindingReference = reference.reference;
|
|
284
|
+
if (bindingReference.binding.kind !== 'import') {
|
|
285
|
+
if (bindingReference.path.length > 0) {
|
|
286
|
+
return failIrInterfaceInheritanceLowering(context.subject, `interface ${subjectName} inherits a nonlocal interface that cannot be structurally resolved`);
|
|
287
|
+
}
|
|
288
|
+
const base = module.declarations.get(bindingReference.binding.id);
|
|
289
|
+
if (base)
|
|
290
|
+
return base;
|
|
291
|
+
return failIrInterfaceInheritanceLowering(context.subject, `interface ${subjectName} inherits unavailable interface ${bindingReference.binding.name}`);
|
|
292
|
+
}
|
|
293
|
+
const imported = module.module.imports.flatMap((entry) => entry.bindings
|
|
294
|
+
.filter((candidate) => candidate.binding.id === bindingReference.binding.id)
|
|
295
|
+
.flatMap((candidate) => {
|
|
296
|
+
if (candidate.imported === '*' && bindingReference.path.length === 1) {
|
|
297
|
+
return [
|
|
298
|
+
{
|
|
299
|
+
exportName: bindingReference.path[0],
|
|
300
|
+
specifier: entry.specifier,
|
|
301
|
+
},
|
|
302
|
+
];
|
|
303
|
+
}
|
|
304
|
+
return bindingReference.path.length === 0 && candidate.imported !== '*'
|
|
305
|
+
? [{ exportName: candidate.imported, specifier: entry.specifier }]
|
|
306
|
+
: [];
|
|
307
|
+
}));
|
|
308
|
+
const bases = deduplicateInterfaceInheritanceDeclarationLocations(imported.flatMap(({ exportName, specifier }) => getInterfaceInheritanceSpecifierModules(module, specifier, context.moduleSet).flatMap((target) => getInterfaceInheritanceExportLocations(target, exportName, context.moduleSet, new Set()))));
|
|
309
|
+
if (bases.length === 1)
|
|
310
|
+
return bases[0];
|
|
311
|
+
if (bases.length > 1) {
|
|
312
|
+
return failIrInterfaceInheritanceLowering(context.subject, `interface ${subjectName} inherits ambiguous interface ${bindingReference.binding.name}`);
|
|
313
|
+
}
|
|
314
|
+
return failIrInterfaceInheritanceLowering(context.subject, `interface ${subjectName} inherits unavailable interface ${bindingReference.binding.name}`);
|
|
315
|
+
}
|
|
316
|
+
function getIrInterfaceTypeSubstitutionPlan(reference, declaration, outerSubstitutions, context) {
|
|
317
|
+
try {
|
|
318
|
+
return createIrTypeParameterSubstitutionPlan(declaration.typeParameters, reference.typeArguments.map((argument) => resolveIrTypeStructuralSubstitution(argument, outerSubstitutions)));
|
|
319
|
+
}
|
|
320
|
+
catch (error) {
|
|
321
|
+
if (isCompilerStructuralTypeSubstitutionFailure(error)) {
|
|
322
|
+
if (error.code === 'too-many-type-arguments') {
|
|
323
|
+
return failIrInterfaceInheritanceLowering(context.subject, `interface ${declaration.binding.name} receives too many heritage type arguments`);
|
|
324
|
+
}
|
|
325
|
+
if (error.code === 'missing-type-argument') {
|
|
326
|
+
const index = typeof error.path[1] === 'number' ? error.path[1] : -1;
|
|
327
|
+
const parameter = declaration.typeParameters[index];
|
|
328
|
+
return failIrInterfaceInheritanceLowering(context.subject, `interface ${declaration.binding.name} requires heritage type argument ${parameter?.binding.name ?? 'unknown'}`);
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
throw error;
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
function addIrInterfacePropertyFlattened(property, declaration, properties, context, directOverride = false) {
|
|
335
|
+
const existingIndex = properties.findIndex((candidate) => candidate.name === property.name);
|
|
336
|
+
if (existingIndex < 0) {
|
|
337
|
+
properties.push(property);
|
|
338
|
+
return;
|
|
339
|
+
}
|
|
340
|
+
const existing = properties[existingIndex];
|
|
341
|
+
const propertyType = resolveIrTypeInterfaceInheritance(property.type, context.module, context, new Set());
|
|
342
|
+
const existingType = resolveIrTypeInterfaceInheritance(existing.type, context.module, context, new Set());
|
|
343
|
+
const propertyToExisting = analyzeIrTypeStructuralAssignability(removeIrObjectPropertyReadonlyInterfaceInheritance(propertyType), removeIrObjectPropertyReadonlyInterfaceInheritance(existingType));
|
|
344
|
+
if ((!property.optional || existing.optional) &&
|
|
345
|
+
(propertyToExisting.status === 'compatible' ||
|
|
346
|
+
(directOverride && propertyToExisting.status === 'indeterminate') ||
|
|
347
|
+
(directOverride && isIrInterfaceMethodOverrideCompatible(propertyType, existingType)))) {
|
|
348
|
+
properties[existingIndex] = property;
|
|
349
|
+
return;
|
|
350
|
+
}
|
|
351
|
+
const existingToProperty = analyzeIrTypeStructuralAssignability(removeIrObjectPropertyReadonlyInterfaceInheritance(existingType), removeIrObjectPropertyReadonlyInterfaceInheritance(propertyType));
|
|
352
|
+
if ((!existing.optional || property.optional) && existingToProperty.status === 'compatible') {
|
|
353
|
+
return;
|
|
354
|
+
}
|
|
355
|
+
if (!isDeepStrictEqual(existing, property)) {
|
|
356
|
+
const diagnostic = propertyToExisting.diagnostics[0] ?? existingToProperty.diagnostics[0];
|
|
357
|
+
const detail = diagnostic ? ` (${diagnostic.code} at ${diagnostic.path.map(String).join('.') || 'type'})` : '';
|
|
358
|
+
failIrInterfaceInheritanceLowering(context.subject, `interface ${declaration.binding.name} inherits incompatible property ${property.name}${detail}`);
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
function removeIrObjectPropertyReadonlyInterfaceInheritance(type) {
|
|
362
|
+
switch (type.kind) {
|
|
363
|
+
case 'array':
|
|
364
|
+
return {
|
|
365
|
+
...type,
|
|
366
|
+
element: removeIrObjectPropertyReadonlyInterfaceInheritance(type.element),
|
|
367
|
+
};
|
|
368
|
+
case 'conditionalFacet':
|
|
369
|
+
return {
|
|
370
|
+
...type,
|
|
371
|
+
check: removeIrObjectPropertyReadonlyInterfaceInheritance(type.check),
|
|
372
|
+
facet: removeIrObjectPropertyReadonlyInterfaceInheritance(type.facet),
|
|
373
|
+
};
|
|
374
|
+
case 'function':
|
|
375
|
+
return {
|
|
376
|
+
...type,
|
|
377
|
+
parameters: type.parameters.map((parameter) => ({
|
|
378
|
+
...parameter,
|
|
379
|
+
type: removeIrObjectPropertyReadonlyInterfaceInheritance(parameter.type),
|
|
380
|
+
})),
|
|
381
|
+
returns: removeIrObjectPropertyReadonlyInterfaceInheritance(type.returns),
|
|
382
|
+
};
|
|
383
|
+
case 'indexedAccess':
|
|
384
|
+
return {
|
|
385
|
+
...type,
|
|
386
|
+
index: removeIrObjectPropertyReadonlyInterfaceInheritance(type.index),
|
|
387
|
+
object: removeIrObjectPropertyReadonlyInterfaceInheritance(type.object),
|
|
388
|
+
};
|
|
389
|
+
case 'intersection': {
|
|
390
|
+
const types = type.types.map(removeIrObjectPropertyReadonlyInterfaceInheritance);
|
|
391
|
+
return { ...type, types: [types[0], types[1], ...types.slice(2)] };
|
|
392
|
+
}
|
|
393
|
+
case 'keyof':
|
|
394
|
+
return {
|
|
395
|
+
...type,
|
|
396
|
+
type: removeIrObjectPropertyReadonlyInterfaceInheritance(type.type),
|
|
397
|
+
};
|
|
398
|
+
case 'named':
|
|
399
|
+
return {
|
|
400
|
+
...type,
|
|
401
|
+
typeArguments: type.typeArguments.map(removeIrObjectPropertyReadonlyInterfaceInheritance),
|
|
402
|
+
};
|
|
403
|
+
case 'object':
|
|
404
|
+
return {
|
|
405
|
+
...type,
|
|
406
|
+
properties: type.properties.map((property) => ({
|
|
407
|
+
...property,
|
|
408
|
+
readonly: false,
|
|
409
|
+
type: removeIrObjectPropertyReadonlyInterfaceInheritance(property.type),
|
|
410
|
+
})),
|
|
411
|
+
};
|
|
412
|
+
case 'tuple':
|
|
413
|
+
return {
|
|
414
|
+
...type,
|
|
415
|
+
elements: type.elements.map((element) => ({
|
|
416
|
+
...element,
|
|
417
|
+
type: removeIrObjectPropertyReadonlyInterfaceInheritance(element.type),
|
|
418
|
+
})),
|
|
419
|
+
};
|
|
420
|
+
case 'union': {
|
|
421
|
+
const types = type.types.map(removeIrObjectPropertyReadonlyInterfaceInheritance);
|
|
422
|
+
return { ...type, types: [types[0], types[1], ...types.slice(2)] };
|
|
423
|
+
}
|
|
424
|
+
case 'literal':
|
|
425
|
+
case 'never':
|
|
426
|
+
case 'null':
|
|
427
|
+
case 'primitive':
|
|
428
|
+
case 'typeOf':
|
|
429
|
+
case 'undefined':
|
|
430
|
+
case 'unknown':
|
|
431
|
+
return type;
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
function isIrInterfaceMethodOverrideCompatible(source, target) {
|
|
435
|
+
if (source.kind !== 'function' || target.kind !== 'function')
|
|
436
|
+
return false;
|
|
437
|
+
if (source.typeParameters.length !== target.typeParameters.length)
|
|
438
|
+
return false;
|
|
439
|
+
const sourceRequired = source.parameters.filter((parameter) => !parameter.optional && !parameter.rest).length;
|
|
440
|
+
const targetRequired = target.parameters.filter((parameter) => !parameter.optional && !parameter.rest).length;
|
|
441
|
+
if (sourceRequired !== targetRequired)
|
|
442
|
+
return false;
|
|
443
|
+
return analyzeIrTypeStructuralAssignability(source.returns, target.returns).status !== 'incompatible';
|
|
444
|
+
}
|
|
445
|
+
function resolveIrTypeInterfaceInheritance(type, module, context, declarations, expandStructures = true) {
|
|
446
|
+
switch (type.kind) {
|
|
447
|
+
case 'array':
|
|
448
|
+
return {
|
|
449
|
+
...type,
|
|
450
|
+
element: resolveIrTypeInterfaceInheritance(type.element, module, context, declarations, expandStructures),
|
|
451
|
+
};
|
|
452
|
+
case 'conditionalFacet':
|
|
453
|
+
return {
|
|
454
|
+
...type,
|
|
455
|
+
check: resolveIrTypeInterfaceInheritance(type.check, module, context, declarations, expandStructures),
|
|
456
|
+
facet: resolveIrTypeInterfaceInheritance(type.facet, module, context, declarations, false),
|
|
457
|
+
};
|
|
458
|
+
case 'function':
|
|
459
|
+
return {
|
|
460
|
+
...type,
|
|
461
|
+
parameters: type.parameters.map((parameter) => ({
|
|
462
|
+
...parameter,
|
|
463
|
+
type: resolveIrTypeInterfaceInheritance(parameter.type, module, context, declarations, expandStructures),
|
|
464
|
+
})),
|
|
465
|
+
returns: resolveIrTypeInterfaceInheritance(type.returns, module, context, declarations, expandStructures),
|
|
466
|
+
};
|
|
467
|
+
case 'indexedAccess':
|
|
468
|
+
return {
|
|
469
|
+
...type,
|
|
470
|
+
index: resolveIrTypeInterfaceInheritance(type.index, module, context, declarations, expandStructures),
|
|
471
|
+
object: resolveIrTypeInterfaceInheritance(type.object, module, context, declarations, expandStructures),
|
|
472
|
+
};
|
|
473
|
+
case 'intersection': {
|
|
474
|
+
const types = type.types.map((member) => resolveIrTypeInterfaceInheritance(member, module, context, declarations, expandStructures));
|
|
475
|
+
return { ...type, types: [types[0], types[1], ...types.slice(2)] };
|
|
476
|
+
}
|
|
477
|
+
case 'keyof':
|
|
478
|
+
return {
|
|
479
|
+
...type,
|
|
480
|
+
type: resolveIrTypeInterfaceInheritance(type.type, module, context, declarations, expandStructures),
|
|
481
|
+
};
|
|
482
|
+
case 'named': {
|
|
483
|
+
const location = getInterfaceInheritanceTypeDeclaration(type, module, context);
|
|
484
|
+
if (!location && type.reference.kind === 'binding' && type.reference.binding.space === 'value') {
|
|
485
|
+
const declaration = getInterfaceInheritanceValueDeclaration(type.reference, module, context);
|
|
486
|
+
if (declaration?.declarationKind === 'const' &&
|
|
487
|
+
declaration.initializer?.kind === 'literal' &&
|
|
488
|
+
declaration.initializer.value !== null) {
|
|
489
|
+
return { kind: 'literal', value: declaration.initializer.value };
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
if (!location || declarations.has(location.identity)) {
|
|
493
|
+
return {
|
|
494
|
+
...type,
|
|
495
|
+
typeArguments: type.typeArguments.map((argument) => resolveIrTypeInterfaceInheritance(argument, module, context, declarations, expandStructures)),
|
|
496
|
+
};
|
|
497
|
+
}
|
|
498
|
+
const substitutions = getIrInterfaceTypeSubstitutionPlan(type, location.declaration, createIrTypeParameterSubstitutionPlan([], []), context);
|
|
499
|
+
const nextDeclarations = new Set(declarations).add(location.identity);
|
|
500
|
+
if (location.declaration.kind === 'typeAlias') {
|
|
501
|
+
return resolveIrTypeInterfaceInheritance(resolveIrTypeStructuralSubstitution(location.declaration.type, substitutions), location.module, context, nextDeclarations, expandStructures);
|
|
502
|
+
}
|
|
503
|
+
if (!expandStructures) {
|
|
504
|
+
return {
|
|
505
|
+
...type,
|
|
506
|
+
reference: {
|
|
507
|
+
binding: location.declaration.binding,
|
|
508
|
+
kind: 'binding',
|
|
509
|
+
path: [],
|
|
510
|
+
},
|
|
511
|
+
typeArguments: type.typeArguments.map((argument) => resolveIrTypeInterfaceInheritance(argument, module, context, declarations, false)),
|
|
512
|
+
};
|
|
513
|
+
}
|
|
514
|
+
return {
|
|
515
|
+
kind: 'object',
|
|
516
|
+
properties: getIrInterfaceDeclarationPropertiesFlattened(location, substitutions, new Set(), context).map((property) => ({
|
|
517
|
+
...property,
|
|
518
|
+
type: resolveIrTypeInterfaceInheritance(property.type, location.module, context, nextDeclarations, false),
|
|
519
|
+
})),
|
|
520
|
+
};
|
|
521
|
+
}
|
|
522
|
+
case 'object':
|
|
523
|
+
return {
|
|
524
|
+
...type,
|
|
525
|
+
properties: type.properties.map((property) => ({
|
|
526
|
+
...property,
|
|
527
|
+
type: resolveIrTypeInterfaceInheritance(property.type, module, context, declarations, expandStructures),
|
|
528
|
+
})),
|
|
529
|
+
};
|
|
530
|
+
case 'tuple':
|
|
531
|
+
return {
|
|
532
|
+
...type,
|
|
533
|
+
elements: type.elements.map((element) => ({
|
|
534
|
+
...element,
|
|
535
|
+
type: resolveIrTypeInterfaceInheritance(element.type, module, context, declarations, expandStructures),
|
|
536
|
+
})),
|
|
537
|
+
};
|
|
538
|
+
case 'union': {
|
|
539
|
+
const types = type.types.map((member) => resolveIrTypeInterfaceInheritance(member, module, context, declarations, expandStructures));
|
|
540
|
+
return { ...type, types: [types[0], types[1], ...types.slice(2)] };
|
|
541
|
+
}
|
|
542
|
+
case 'literal':
|
|
543
|
+
case 'never':
|
|
544
|
+
case 'null':
|
|
545
|
+
case 'primitive':
|
|
546
|
+
return type;
|
|
547
|
+
case 'typeOf': {
|
|
548
|
+
const declaration = getInterfaceInheritanceValueDeclaration(type.reference, module, context);
|
|
549
|
+
return declaration?.declarationKind === 'const' &&
|
|
550
|
+
declaration.initializer?.kind === 'literal' &&
|
|
551
|
+
declaration.initializer.value !== null
|
|
552
|
+
? { kind: 'literal', value: declaration.initializer.value }
|
|
553
|
+
: type;
|
|
554
|
+
}
|
|
555
|
+
case 'undefined':
|
|
556
|
+
case 'unknown':
|
|
557
|
+
return type;
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
function getInterfaceInheritanceTypeDeclaration(type, module, context) {
|
|
561
|
+
if (type.reference.kind !== 'binding')
|
|
562
|
+
return undefined;
|
|
563
|
+
const reference = type.reference;
|
|
564
|
+
const origin = getInterfaceInheritanceBindingModule(reference.binding, context) ?? module;
|
|
565
|
+
const declaration = origin.declarations.get(reference.binding.id);
|
|
566
|
+
if (declaration)
|
|
567
|
+
return declaration;
|
|
568
|
+
if (reference.binding.space === 'value') {
|
|
569
|
+
const declarations = [...origin.declarations.values()].filter((candidate) => candidate.declaration.binding.name === reference.binding.name);
|
|
570
|
+
if (declarations.length === 1)
|
|
571
|
+
return declarations[0];
|
|
572
|
+
}
|
|
573
|
+
if (origin.module.imports.some((imported) => imported.bindings.some(({ binding }) => binding.id === reference.binding.id))) {
|
|
574
|
+
const imported = origin.module.imports.flatMap((entry) => entry.bindings
|
|
575
|
+
.filter((candidate) => candidate.binding.id === reference.binding.id)
|
|
576
|
+
.flatMap((candidate) => {
|
|
577
|
+
if (candidate.imported === '*' && reference.path.length === 1) {
|
|
578
|
+
return [{ exportName: reference.path[0], specifier: entry.specifier }];
|
|
579
|
+
}
|
|
580
|
+
return reference.path.length === 0 && candidate.imported !== '*'
|
|
581
|
+
? [{ exportName: candidate.imported, specifier: entry.specifier }]
|
|
582
|
+
: [];
|
|
583
|
+
}));
|
|
584
|
+
const locations = deduplicateInterfaceInheritanceDeclarationLocations(imported.flatMap(({ exportName, specifier }) => getInterfaceInheritanceSpecifierModules(origin, specifier, context.moduleSet).flatMap((target) => getInterfaceInheritanceExportLocations(target, exportName, context.moduleSet, new Set()))));
|
|
585
|
+
return locations.length === 1 ? locations[0] : undefined;
|
|
586
|
+
}
|
|
587
|
+
return undefined;
|
|
588
|
+
}
|
|
589
|
+
function getInterfaceInheritanceValueDeclaration(reference, module, context) {
|
|
590
|
+
const origins = reference.kind === 'binding'
|
|
591
|
+
? [getInterfaceInheritanceBindingModule(reference.binding, context) ?? module]
|
|
592
|
+
: getInterfaceInheritanceAdjustedModuleRecords(context.moduleSet.valueModulesByName.get(reference.name) ?? [], context.moduleSet, hasInterfaceInheritanceModuleValueName(context.moduleSet.subject, reference.name));
|
|
593
|
+
const declarations = new Map();
|
|
594
|
+
for (const origin of origins) {
|
|
595
|
+
const local = origin.module.declarations.find((declaration) => declaration.kind === 'variable' &&
|
|
596
|
+
'binding' in declaration &&
|
|
597
|
+
(reference.kind === 'binding'
|
|
598
|
+
? declaration.binding.id === reference.binding.id
|
|
599
|
+
: declaration.binding.name === reference.name));
|
|
600
|
+
if (local)
|
|
601
|
+
declarations.set(`${origin.identity}\0${local.binding.id}`, local);
|
|
602
|
+
for (const imported of origin.module.imports) {
|
|
603
|
+
const candidate = imported.bindings.find(({ binding }) => reference.kind === 'binding' ? binding.id === reference.binding.id : binding.name === reference.name);
|
|
604
|
+
if (!candidate)
|
|
605
|
+
continue;
|
|
606
|
+
const exportName = candidate.imported === '*' && reference.kind === 'binding' ? reference.path[0] : candidate.imported;
|
|
607
|
+
if (!exportName)
|
|
608
|
+
continue;
|
|
609
|
+
for (const target of getInterfaceInheritanceSpecifierModules(origin, imported.specifier, context.moduleSet)) {
|
|
610
|
+
const declaration = target.module.declarations.find((item) => {
|
|
611
|
+
if (item.kind !== 'variable' || !('binding' in item))
|
|
612
|
+
return false;
|
|
613
|
+
return ((item.exported && item.binding.name === exportName) ||
|
|
614
|
+
target.module.exports.some((exported) => exported.kind === 'local' &&
|
|
615
|
+
exported.exported === exportName &&
|
|
616
|
+
exported.binding.id === item.binding.id));
|
|
617
|
+
});
|
|
618
|
+
if (declaration)
|
|
619
|
+
declarations.set(`${target.identity}\0${declaration.binding.id}`, declaration);
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
return declarations.size === 1 ? declarations.values().next().value : undefined;
|
|
624
|
+
}
|
|
625
|
+
function getInterfaceInheritanceBindingModule(binding, context) {
|
|
626
|
+
const source = normalizePathPortable(binding.source);
|
|
627
|
+
const key = `${binding.packageName}\0${source}`;
|
|
628
|
+
return getInterfaceInheritanceAdjustedModuleRecords(context.moduleSet.modulesByPackageSource.get(key) ?? [], context.moduleSet, context.moduleSet.subject.module.packageName === binding.packageName && context.moduleSet.subject.source === source)[0];
|
|
629
|
+
}
|
|
630
|
+
function addInterfaceInheritanceModuleIndexEntry(index, key, record) {
|
|
631
|
+
const entries = index.get(key) ?? [];
|
|
632
|
+
entries.push(record);
|
|
633
|
+
index.set(key, entries);
|
|
634
|
+
}
|
|
635
|
+
function createInterfaceInheritanceResolutionTargets(resolution) {
|
|
636
|
+
const targets = new Map();
|
|
637
|
+
for (const edge of resolution.edges) {
|
|
638
|
+
const entry = targets.get(edge.specifier) ?? {
|
|
639
|
+
byImporter: new Map(),
|
|
640
|
+
fallback: new Set(),
|
|
641
|
+
};
|
|
642
|
+
const target = `${edge.target.packageName}\0${normalizePathPortable(edge.target.source)}`;
|
|
643
|
+
if (edge.importer) {
|
|
644
|
+
const importer = getInterfaceInheritanceModuleIdentity(edge.importer);
|
|
645
|
+
const exact = entry.byImporter.get(importer) ?? new Set();
|
|
646
|
+
exact.add(target);
|
|
647
|
+
entry.byImporter.set(importer, exact);
|
|
648
|
+
}
|
|
649
|
+
else {
|
|
650
|
+
entry.fallback.add(target);
|
|
651
|
+
}
|
|
652
|
+
targets.set(edge.specifier, entry);
|
|
653
|
+
}
|
|
654
|
+
return new Map([...targets].map(([specifier, entry]) => [
|
|
655
|
+
specifier,
|
|
656
|
+
{
|
|
657
|
+
byImporter: new Map([...entry.byImporter].map(([importer, exact]) => [importer, [...exact].sort(compareTextCodeUnits)])),
|
|
658
|
+
fallback: [...entry.fallback].sort(compareTextCodeUnits),
|
|
659
|
+
},
|
|
660
|
+
]));
|
|
661
|
+
}
|
|
662
|
+
function createInterfaceInheritanceModuleSet(subject, moduleIndex) {
|
|
663
|
+
const subjectIdentity = getInterfaceInheritanceModuleIdentity(subject);
|
|
664
|
+
const existing = moduleIndex.modulesByIdentity.get(subjectIdentity);
|
|
665
|
+
const subjectRecord = existing?.module === subject ? existing : createInterfaceInheritanceModuleRecord(subject);
|
|
666
|
+
return { ...moduleIndex, subject: subjectRecord };
|
|
667
|
+
}
|
|
668
|
+
function createInterfaceInheritanceModuleRecord(module) {
|
|
669
|
+
const identity = getInterfaceInheritanceModuleIdentity(module);
|
|
670
|
+
const record = {
|
|
671
|
+
declarations: new Map(),
|
|
672
|
+
identity,
|
|
673
|
+
importsByBindingId: new Map(),
|
|
674
|
+
module,
|
|
675
|
+
source: normalizePathPortable(module.source),
|
|
676
|
+
};
|
|
677
|
+
for (const declaration of module.declarations) {
|
|
678
|
+
if (declaration.kind !== 'class' && declaration.kind !== 'interface' && declaration.kind !== 'typeAlias')
|
|
679
|
+
continue;
|
|
680
|
+
if (record.declarations.has(declaration.binding.id)) {
|
|
681
|
+
throw new TypeError('Interface inheritance module contains a duplicate structural declaration identity');
|
|
682
|
+
}
|
|
683
|
+
record.declarations.set(declaration.binding.id, {
|
|
684
|
+
declaration,
|
|
685
|
+
identity: `${identity}\0${declaration.binding.id}`,
|
|
686
|
+
module: record,
|
|
687
|
+
});
|
|
688
|
+
}
|
|
689
|
+
for (const imported of module.imports) {
|
|
690
|
+
for (const binding of imported.bindings) {
|
|
691
|
+
const entries = record.importsByBindingId.get(binding.binding.id) ?? [];
|
|
692
|
+
entries.push({
|
|
693
|
+
imported: binding.imported,
|
|
694
|
+
specifier: imported.specifier,
|
|
695
|
+
});
|
|
696
|
+
record.importsByBindingId.set(binding.binding.id, entries);
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
return record;
|
|
700
|
+
}
|
|
701
|
+
function getInterfaceInheritanceAdjustedModuleRecords(records, moduleSet, includeSubject) {
|
|
702
|
+
const adjusted = new Map(records.map((record) => [
|
|
703
|
+
record.identity,
|
|
704
|
+
record.identity === moduleSet.subject.identity ? moduleSet.subject : record,
|
|
705
|
+
]));
|
|
706
|
+
if (includeSubject)
|
|
707
|
+
adjusted.set(moduleSet.subject.identity, moduleSet.subject);
|
|
708
|
+
return [...adjusted.values()].sort(compareInterfaceInheritanceRecords);
|
|
709
|
+
}
|
|
710
|
+
function getInterfaceInheritanceModuleRecord(module, moduleSet) {
|
|
711
|
+
const identity = getInterfaceInheritanceModuleIdentity(module);
|
|
712
|
+
if (moduleSet.subject.identity === identity)
|
|
713
|
+
return moduleSet.subject;
|
|
714
|
+
return moduleSet.modulesByIdentity.get(identity);
|
|
715
|
+
}
|
|
716
|
+
function hasInterfaceInheritanceModuleValueName(module, name) {
|
|
717
|
+
return (module.module.declarations.some((declaration) => declaration.kind === 'variable' && 'binding' in declaration && declaration.binding.name === name) || module.module.imports.some((imported) => imported.bindings.some((binding) => binding.binding.name === name)));
|
|
718
|
+
}
|
|
719
|
+
function getInterfaceInheritanceDeclarationLocation(declaration, module) {
|
|
720
|
+
const location = module.declarations.get(declaration.binding.id);
|
|
721
|
+
if (!location || location.declaration.kind !== 'interface') {
|
|
722
|
+
throw new TypeError('Interface declaration must belong to its lowering module');
|
|
723
|
+
}
|
|
724
|
+
return location;
|
|
725
|
+
}
|
|
726
|
+
function getInterfaceInheritanceExportLocations(module, exportName, moduleSet, seen) {
|
|
727
|
+
const query = `${module.identity}\0${exportName}`;
|
|
728
|
+
if (seen.has(query))
|
|
729
|
+
return [];
|
|
730
|
+
const nextSeen = new Set(seen).add(query);
|
|
731
|
+
const locations = [...module.declarations.values()].filter((location) => location.declaration.exported && location.declaration.binding.name === exportName);
|
|
732
|
+
for (const exported of module.module.exports) {
|
|
733
|
+
if (exported.kind === 'local' && exported.exported === exportName) {
|
|
734
|
+
const location = module.declarations.get(exported.binding.id);
|
|
735
|
+
if (location)
|
|
736
|
+
locations.push(location);
|
|
737
|
+
}
|
|
738
|
+
if (exported.kind === 'reexport' && exported.exported === exportName) {
|
|
739
|
+
for (const target of getInterfaceInheritanceSpecifierModules(module, exported.specifier, moduleSet)) {
|
|
740
|
+
locations.push(...getInterfaceInheritanceExportLocations(target, exported.imported, moduleSet, nextSeen));
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
if (exported.kind === 'all' && exportName !== 'default') {
|
|
744
|
+
for (const target of getInterfaceInheritanceSpecifierModules(module, exported.specifier, moduleSet)) {
|
|
745
|
+
locations.push(...getInterfaceInheritanceExportLocations(target, exportName, moduleSet, nextSeen));
|
|
746
|
+
}
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
return deduplicateInterfaceInheritanceDeclarationLocations(locations);
|
|
750
|
+
}
|
|
751
|
+
function getInterfaceInheritanceSpecifierModules(from, specifier, moduleSet) {
|
|
752
|
+
const candidates = getInterfaceInheritanceSpecifierSourceCandidates(from.source, specifier);
|
|
753
|
+
const indexedTargets = moduleSet.resolutionTargetsBySpecifier.get(specifier);
|
|
754
|
+
const exactTargets = indexedTargets?.byImporter.get(from.identity);
|
|
755
|
+
const resolutionTargets = exactTargets && exactTargets.length > 0 ? exactTargets : (indexedTargets?.fallback ?? []);
|
|
756
|
+
const modulesByIdentity = new Map();
|
|
757
|
+
for (const source of candidates) {
|
|
758
|
+
for (const candidate of moduleSet.modulesByPackageSource.get(`${from.module.packageName}\0${source}`) ?? []) {
|
|
759
|
+
modulesByIdentity.set(candidate.identity, candidate);
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
for (const target of resolutionTargets) {
|
|
763
|
+
for (const candidate of moduleSet.modulesByPackageSource.get(target) ?? []) {
|
|
764
|
+
modulesByIdentity.set(candidate.identity, candidate);
|
|
765
|
+
}
|
|
766
|
+
}
|
|
767
|
+
return getInterfaceInheritanceAdjustedModuleRecords([...modulesByIdentity.values()], moduleSet, (from.module.packageName === moduleSet.subject.module.packageName && candidates.has(moduleSet.subject.source)) ||
|
|
768
|
+
resolutionTargets.includes(`${moduleSet.subject.module.packageName}\0${moduleSet.subject.source}`));
|
|
769
|
+
}
|
|
770
|
+
function getInterfaceInheritanceSpecifierSourceCandidates(source, specifier) {
|
|
771
|
+
const normalized = normalizePathPortable(specifier);
|
|
772
|
+
if (normalized !== '.' && normalized !== '..' && !normalized.startsWith('./') && !normalized.startsWith('../')) {
|
|
773
|
+
return new Set();
|
|
774
|
+
}
|
|
775
|
+
const parts = source.split('/');
|
|
776
|
+
parts.pop();
|
|
777
|
+
for (const part of normalized.split('/')) {
|
|
778
|
+
if (part === '' || part === '.')
|
|
779
|
+
continue;
|
|
780
|
+
if (part === '..') {
|
|
781
|
+
if (parts.length === 0)
|
|
782
|
+
return new Set();
|
|
783
|
+
parts.pop();
|
|
784
|
+
}
|
|
785
|
+
else {
|
|
786
|
+
parts.push(part);
|
|
787
|
+
}
|
|
788
|
+
}
|
|
789
|
+
const resolved = parts.join('/');
|
|
790
|
+
const candidates = new Set([resolved]);
|
|
791
|
+
for (const [emitted, sourceExtension] of [
|
|
792
|
+
['.cjs', '.cts'],
|
|
793
|
+
['.js', '.ts'],
|
|
794
|
+
['.jsx', '.tsx'],
|
|
795
|
+
['.mjs', '.mts'],
|
|
796
|
+
]) {
|
|
797
|
+
if (resolved.endsWith(emitted))
|
|
798
|
+
candidates.add(`${resolved.slice(0, -emitted.length)}${sourceExtension}`);
|
|
799
|
+
}
|
|
800
|
+
if (!/\.[^/]+$/u.test(resolved)) {
|
|
801
|
+
candidates.add(`${resolved}.ts`);
|
|
802
|
+
candidates.add(`${resolved}/index.ts`);
|
|
803
|
+
}
|
|
804
|
+
return candidates;
|
|
805
|
+
}
|
|
806
|
+
function deduplicateInterfaceInheritanceDeclarationLocations(locations) {
|
|
807
|
+
return [...new Map(locations.map((location) => [location.identity, location])).values()].sort((left, right) => compareTextCodeUnits(left.identity, right.identity));
|
|
808
|
+
}
|
|
809
|
+
function compareInterfaceInheritanceRecords(left, right) {
|
|
810
|
+
return compareTextCodeUnits(left.identity, right.identity);
|
|
811
|
+
}
|
|
812
|
+
function getInterfaceInheritanceModuleIdentity(identity) {
|
|
813
|
+
return `${identity.packageName}\0${normalizePathPortable(identity.source)}\0${identity.name}`;
|
|
814
|
+
}
|
|
815
|
+
function rebindIrInterfacePropertyTypeParameters(property, declaration, propertyIndex, context) {
|
|
816
|
+
return {
|
|
817
|
+
...property,
|
|
818
|
+
type: rebindIrTypeInterfaceInheritance(property.type, declaration, `properties[${String(propertyIndex)}].type`, new Map(), context),
|
|
819
|
+
};
|
|
820
|
+
}
|
|
821
|
+
function rebindIrTypeInterfaceInheritance(type, declaration, path, bindings, context) {
|
|
822
|
+
switch (type.kind) {
|
|
823
|
+
case 'array':
|
|
824
|
+
return {
|
|
825
|
+
...type,
|
|
826
|
+
element: rebindIrTypeInterfaceInheritance(type.element, declaration, `${path}.element`, bindings, context),
|
|
827
|
+
};
|
|
828
|
+
case 'conditionalFacet':
|
|
829
|
+
return {
|
|
830
|
+
...type,
|
|
831
|
+
check: rebindIrTypeInterfaceInheritance(type.check, declaration, `${path}.check`, bindings, context),
|
|
832
|
+
facet: rebindIrTypeInterfaceInheritance(type.facet, declaration, `${path}.facet`, bindings, context),
|
|
833
|
+
};
|
|
834
|
+
case 'function': {
|
|
835
|
+
const nestedBindings = new Map(bindings);
|
|
836
|
+
const typeParameters = type.typeParameters.map((parameter, index) => {
|
|
837
|
+
const binding = {
|
|
838
|
+
...parameter.binding,
|
|
839
|
+
id: `${parameter.binding.id}:interface-inheritance:${JSON.stringify([declaration.binding.id, path, index])}`,
|
|
840
|
+
};
|
|
841
|
+
nestedBindings.set(parameter.binding.id, binding);
|
|
842
|
+
return { ...parameter, binding };
|
|
843
|
+
});
|
|
844
|
+
return {
|
|
845
|
+
...type,
|
|
846
|
+
parameters: type.parameters.map((parameter, index) => ({
|
|
847
|
+
...parameter,
|
|
848
|
+
type: rebindIrTypeInterfaceInheritance(parameter.type, declaration, `${path}.parameters[${String(index)}].type`, nestedBindings, context),
|
|
849
|
+
})),
|
|
850
|
+
returns: rebindIrTypeInterfaceInheritance(type.returns, declaration, `${path}.returns`, nestedBindings, context),
|
|
851
|
+
typeParameters: typeParameters.map((parameter, index) => ({
|
|
852
|
+
...parameter,
|
|
853
|
+
...(parameter.constraint
|
|
854
|
+
? {
|
|
855
|
+
constraint: rebindIrTypeInterfaceInheritance(parameter.constraint, declaration, `${path}.typeParameters[${String(index)}].constraint`, nestedBindings, context),
|
|
856
|
+
}
|
|
857
|
+
: {}),
|
|
858
|
+
...(parameter.default
|
|
859
|
+
? {
|
|
860
|
+
default: rebindIrTypeInterfaceInheritance(parameter.default, declaration, `${path}.typeParameters[${String(index)}].default`, nestedBindings, context),
|
|
861
|
+
}
|
|
862
|
+
: {}),
|
|
863
|
+
})),
|
|
864
|
+
};
|
|
865
|
+
}
|
|
866
|
+
case 'indexedAccess':
|
|
867
|
+
return {
|
|
868
|
+
...type,
|
|
869
|
+
index: rebindIrTypeInterfaceInheritance(type.index, declaration, `${path}.index`, bindings, context),
|
|
870
|
+
object: rebindIrTypeInterfaceInheritance(type.object, declaration, `${path}.object`, bindings, context),
|
|
871
|
+
};
|
|
872
|
+
case 'intersection': {
|
|
873
|
+
const types = type.types.map((member, index) => rebindIrTypeInterfaceInheritance(member, declaration, `${path}.types[${String(index)}]`, bindings, context));
|
|
874
|
+
return { ...type, types: [types[0], types[1], ...types.slice(2)] };
|
|
875
|
+
}
|
|
876
|
+
case 'keyof':
|
|
877
|
+
return {
|
|
878
|
+
...type,
|
|
879
|
+
type: rebindIrTypeInterfaceInheritance(type.type, declaration, `${path}.type`, bindings, context),
|
|
880
|
+
};
|
|
881
|
+
case 'named': {
|
|
882
|
+
const binding = type.reference.kind === 'binding' ? bindings.get(type.reference.binding.id) : undefined;
|
|
883
|
+
const reference = type.reference.kind === 'binding' && binding
|
|
884
|
+
? { ...type.reference, binding }
|
|
885
|
+
: rebindIrInterfaceInheritedTypeReference(type.reference, declaration, context);
|
|
886
|
+
return {
|
|
887
|
+
...type,
|
|
888
|
+
reference,
|
|
889
|
+
typeArguments: type.typeArguments.map((argument, index) => rebindIrTypeInterfaceInheritance(argument, declaration, `${path}.typeArguments[${String(index)}]`, bindings, context)),
|
|
890
|
+
};
|
|
891
|
+
}
|
|
892
|
+
case 'object':
|
|
893
|
+
return {
|
|
894
|
+
...type,
|
|
895
|
+
properties: type.properties.map((property, index) => ({
|
|
896
|
+
...property,
|
|
897
|
+
type: rebindIrTypeInterfaceInheritance(property.type, declaration, `${path}.properties[${String(index)}].type`, bindings, context),
|
|
898
|
+
})),
|
|
899
|
+
};
|
|
900
|
+
case 'tuple':
|
|
901
|
+
return {
|
|
902
|
+
...type,
|
|
903
|
+
elements: type.elements.map((element, index) => ({
|
|
904
|
+
...element,
|
|
905
|
+
type: rebindIrTypeInterfaceInheritance(element.type, declaration, `${path}.elements[${String(index)}].type`, bindings, context),
|
|
906
|
+
})),
|
|
907
|
+
};
|
|
908
|
+
case 'union': {
|
|
909
|
+
const types = type.types.map((member, index) => rebindIrTypeInterfaceInheritance(member, declaration, `${path}.types[${String(index)}]`, bindings, context));
|
|
910
|
+
return { ...type, types: [types[0], types[1], ...types.slice(2)] };
|
|
911
|
+
}
|
|
912
|
+
case 'literal':
|
|
913
|
+
case 'never':
|
|
914
|
+
case 'null':
|
|
915
|
+
case 'primitive':
|
|
916
|
+
case 'undefined':
|
|
917
|
+
case 'unknown':
|
|
918
|
+
return type;
|
|
919
|
+
case 'typeOf':
|
|
920
|
+
return resolveIrTypeInterfaceInheritance(type, context.module, context, new Set());
|
|
921
|
+
}
|
|
922
|
+
}
|
|
923
|
+
function rebindIrInterfaceInheritedTypeReference(reference, declaration, context) {
|
|
924
|
+
if (reference.kind !== 'binding' ||
|
|
925
|
+
(reference.binding.packageName === context.subject.packageName &&
|
|
926
|
+
reference.binding.source === context.subject.source)) {
|
|
927
|
+
return reference;
|
|
928
|
+
}
|
|
929
|
+
const imported = getInterfaceInheritanceTypeImport(reference, context);
|
|
930
|
+
const key = `${reference.binding.id}\0${imported.imported}`;
|
|
931
|
+
let binding = context.importedTypeBindings.get(key);
|
|
932
|
+
if (!binding) {
|
|
933
|
+
binding = {
|
|
934
|
+
column: declaration.binding.column,
|
|
935
|
+
fingerprint: declaration.binding.fingerprint,
|
|
936
|
+
id: `type-binding:${JSON.stringify([
|
|
937
|
+
context.subject.packageName,
|
|
938
|
+
context.subject.source,
|
|
939
|
+
'interface-inheritance',
|
|
940
|
+
reference.binding.id,
|
|
941
|
+
imported.imported,
|
|
942
|
+
])}`,
|
|
943
|
+
kind: 'import',
|
|
944
|
+
line: declaration.binding.line,
|
|
945
|
+
name: reference.binding.name,
|
|
946
|
+
packageName: context.subject.packageName,
|
|
947
|
+
scope: 'module',
|
|
948
|
+
source: context.subject.source,
|
|
949
|
+
space: 'type',
|
|
950
|
+
};
|
|
951
|
+
context.importedTypeBindings.set(key, binding);
|
|
952
|
+
addInterfaceInheritanceTypeImport(binding, imported, context);
|
|
953
|
+
}
|
|
954
|
+
return { binding, kind: 'binding', path: imported.path };
|
|
955
|
+
}
|
|
956
|
+
function getInterfaceInheritanceTypeImport(reference, context) {
|
|
957
|
+
const indexedModules = new Map();
|
|
958
|
+
for (const module of context.moduleSet.declarationModulesByBindingId.get(reference.binding.id) ?? []) {
|
|
959
|
+
indexedModules.set(module.identity, module);
|
|
960
|
+
}
|
|
961
|
+
for (const module of context.moduleSet.importModulesByBindingId.get(reference.binding.id) ?? []) {
|
|
962
|
+
indexedModules.set(module.identity, module);
|
|
963
|
+
}
|
|
964
|
+
const subjectHasBinding = context.moduleSet.subject.declarations.has(reference.binding.id) ||
|
|
965
|
+
context.moduleSet.subject.importsByBindingId.has(reference.binding.id);
|
|
966
|
+
for (const module of getInterfaceInheritanceAdjustedModuleRecords([...indexedModules.values()], context.moduleSet, subjectHasBinding)) {
|
|
967
|
+
const declaration = module.declarations.get(reference.binding.id);
|
|
968
|
+
if (declaration) {
|
|
969
|
+
return {
|
|
970
|
+
imported: declaration.declaration.binding.name,
|
|
971
|
+
path: reference.path,
|
|
972
|
+
target: module,
|
|
973
|
+
};
|
|
974
|
+
}
|
|
975
|
+
for (const candidate of module.importsByBindingId.get(reference.binding.id) ?? []) {
|
|
976
|
+
const targets = getInterfaceInheritanceSpecifierModules(module, candidate.specifier, context.moduleSet);
|
|
977
|
+
if (targets.length !== 1) {
|
|
978
|
+
return failIrInterfaceInheritanceLowering(context.subject, `inherited type ${reference.binding.name} does not resolve to one module`);
|
|
979
|
+
}
|
|
980
|
+
if (candidate.imported === '*') {
|
|
981
|
+
const [name, ...remainingPath] = reference.path;
|
|
982
|
+
if (!name) {
|
|
983
|
+
return failIrInterfaceInheritanceLowering(context.subject, `inherited namespace type ${reference.binding.name} has no exported member path`);
|
|
984
|
+
}
|
|
985
|
+
return { imported: name, path: remainingPath, target: targets[0] };
|
|
986
|
+
}
|
|
987
|
+
return {
|
|
988
|
+
imported: candidate.imported,
|
|
989
|
+
path: reference.path,
|
|
990
|
+
target: targets[0],
|
|
991
|
+
};
|
|
992
|
+
}
|
|
993
|
+
}
|
|
994
|
+
return failIrInterfaceInheritanceLowering(context.subject, `inherited type ${reference.binding.name} has no source module introduction`);
|
|
995
|
+
}
|
|
996
|
+
function addInterfaceInheritanceTypeImport(binding, imported, context) {
|
|
997
|
+
const specifier = imported.target.module.packageName === context.subject.packageName
|
|
998
|
+
? getInterfaceInheritanceRelativeSpecifier(context.subject.source, imported.target.source)
|
|
999
|
+
: getInterfaceInheritanceAuthoredCrossPackageSpecifier(imported, context);
|
|
1000
|
+
if (!specifier) {
|
|
1001
|
+
failIrInterfaceInheritanceLowering(context.subject, `inherited type ${imported.imported} requires one authored cross-package import route`);
|
|
1002
|
+
}
|
|
1003
|
+
const index = context.imports.findIndex((candidate) => candidate.specifier === specifier);
|
|
1004
|
+
const importBinding = {
|
|
1005
|
+
binding,
|
|
1006
|
+
imported: imported.imported,
|
|
1007
|
+
typeOnly: true,
|
|
1008
|
+
};
|
|
1009
|
+
if (index < 0) {
|
|
1010
|
+
context.imports.push({
|
|
1011
|
+
bindings: [importBinding],
|
|
1012
|
+
specifier,
|
|
1013
|
+
typeOnly: true,
|
|
1014
|
+
});
|
|
1015
|
+
return;
|
|
1016
|
+
}
|
|
1017
|
+
const existing = context.imports[index];
|
|
1018
|
+
context.imports[index] = {
|
|
1019
|
+
...existing,
|
|
1020
|
+
bindings: [...existing.bindings, importBinding],
|
|
1021
|
+
};
|
|
1022
|
+
}
|
|
1023
|
+
// A compiler cannot invent a package subpath, but it can reuse an authored request whose export
|
|
1024
|
+
// graph already exposes the inherited leaf type. This is the same provenance boundary the source
|
|
1025
|
+
// used for its base interface and keeps a contract-barrel import stable across package layouts.
|
|
1026
|
+
function getInterfaceInheritanceAuthoredCrossPackageSpecifier(imported, context) {
|
|
1027
|
+
const routes = new Set();
|
|
1028
|
+
for (const request of context.subject.imports) {
|
|
1029
|
+
for (const target of getInterfaceInheritanceSpecifierModules(context.module, request.specifier, context.moduleSet)) {
|
|
1030
|
+
const reachesImportedTarget = getInterfaceInheritanceExportLocations(target, imported.imported, context.moduleSet, new Set()).some((location) => location.module.identity === imported.target.identity &&
|
|
1031
|
+
location.declaration.binding.name === imported.imported);
|
|
1032
|
+
if (reachesImportedTarget)
|
|
1033
|
+
routes.add(request.specifier);
|
|
1034
|
+
}
|
|
1035
|
+
}
|
|
1036
|
+
return routes.size === 1 ? [...routes][0] : undefined;
|
|
1037
|
+
}
|
|
1038
|
+
function getInterfaceInheritanceRelativeSpecifier(fromSource, targetSource) {
|
|
1039
|
+
const from = normalizePathPortable(fromSource).split('/');
|
|
1040
|
+
const target = normalizePathPortable(targetSource).split('/');
|
|
1041
|
+
from.pop();
|
|
1042
|
+
target[target.length - 1] = target
|
|
1043
|
+
.at(-1)
|
|
1044
|
+
.replace(/\.cts$/u, '.cjs')
|
|
1045
|
+
.replace(/\.mts$/u, '.mjs')
|
|
1046
|
+
.replace(/\.tsx$/u, '.jsx')
|
|
1047
|
+
.replace(/\.ts$/u, '.js');
|
|
1048
|
+
while (from[0] !== undefined && from[0] === target[0]) {
|
|
1049
|
+
from.shift();
|
|
1050
|
+
target.shift();
|
|
1051
|
+
}
|
|
1052
|
+
const relative = [...from.map(() => '..'), ...target].join('/');
|
|
1053
|
+
return relative.startsWith('.') ? relative : `./${relative}`;
|
|
1054
|
+
}
|
|
1055
|
+
function failIrInterfaceInheritanceLowering(module, message) {
|
|
1056
|
+
throw createCompilerLoweringFailure('unsupported-ir', compilerLoweringPassNameInterfaceInheritance, module, message);
|
|
1057
|
+
}
|
|
1058
|
+
const compilerEmptyModuleResolutionPlan = Object.freeze({
|
|
1059
|
+
edges: Object.freeze([]),
|
|
1060
|
+
schema: 'flight-compiler-module-resolution/1',
|
|
1061
|
+
});
|
|
1062
|
+
//# sourceMappingURL=compilerInterfaceInheritanceLowering.js.map
|