@alloy-js/csharp 0.23.0-dev.1 → 0.23.0-dev.10
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/CHANGELOG.md +1 -14
- package/dist/dev/scripts/components/library-interface.js +67 -0
- package/dist/dev/scripts/components/library-interface.js.map +1 -0
- package/dist/dev/scripts/components/namespace-directory.js +160 -0
- package/dist/dev/scripts/components/namespace-directory.js.map +1 -0
- package/dist/dev/scripts/generate-builtins.js +45 -0
- package/dist/dev/scripts/generate-builtins.js.map +1 -0
- package/dist/dev/scripts/process-docfx.js +316 -0
- package/dist/dev/scripts/process-docfx.js.map +1 -0
- package/dist/dev/src/access.js +73 -0
- package/dist/dev/src/access.js.map +1 -0
- package/dist/dev/src/access.test.js +43 -0
- package/dist/dev/src/access.test.js.map +1 -0
- package/dist/dev/src/builtins/Microsoft/CSharp/RuntimeBinder/index.js +23 -0
- package/dist/dev/src/builtins/Microsoft/CSharp/RuntimeBinder/index.js.map +1 -0
- package/dist/dev/src/builtins/Microsoft/CSharp/index.js +5 -0
- package/dist/dev/src/builtins/Microsoft/CSharp/index.js.map +1 -0
- package/dist/dev/src/builtins/Microsoft/VisualBasic/FileIO/index.js +473 -0
- package/dist/dev/src/builtins/Microsoft/VisualBasic/FileIO/index.js.map +1 -0
- package/dist/dev/src/builtins/Microsoft/VisualBasic/index.js +2534 -0
- package/dist/dev/src/builtins/Microsoft/VisualBasic/index.js.map +1 -0
- package/dist/dev/src/builtins/Microsoft/Win32/SafeHandles/index.js +320 -0
- package/dist/dev/src/builtins/Microsoft/Win32/SafeHandles/index.js.map +1 -0
- package/dist/dev/src/builtins/Microsoft/Win32/index.js +362 -0
- package/dist/dev/src/builtins/Microsoft/Win32/index.js.map +1 -0
- package/dist/dev/src/builtins/Microsoft/index.js +7 -0
- package/dist/dev/src/builtins/Microsoft/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Buffers/Binary/index.js +536 -0
- package/dist/dev/src/builtins/System/Buffers/Binary/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Buffers/Text/index.js +144 -0
- package/dist/dev/src/builtins/System/Buffers/Text/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Buffers/index.js +605 -0
- package/dist/dev/src/builtins/System/Buffers/index.js.map +1 -0
- package/dist/dev/src/builtins/System/CodeDom/Compiler/index.js +131 -0
- package/dist/dev/src/builtins/System/CodeDom/Compiler/index.js.map +1 -0
- package/dist/dev/src/builtins/System/CodeDom/index.js +5 -0
- package/dist/dev/src/builtins/System/CodeDom/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Collections/Concurrent/index.js +399 -0
- package/dist/dev/src/builtins/System/Collections/Concurrent/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Collections/Frozen/index.js +88 -0
- package/dist/dev/src/builtins/System/Collections/Frozen/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Collections/Generic/index.js +978 -0
- package/dist/dev/src/builtins/System/Collections/Generic/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Collections/Immutable/index.js +1049 -0
- package/dist/dev/src/builtins/System/Collections/Immutable/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Collections/ObjectModel/index.js +394 -0
- package/dist/dev/src/builtins/System/Collections/ObjectModel/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Collections/Specialized/index.js +716 -0
- package/dist/dev/src/builtins/System/Collections/Specialized/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Collections/index.js +1355 -0
- package/dist/dev/src/builtins/System/Collections/index.js.map +1 -0
- package/dist/dev/src/builtins/System/ComponentModel/DataAnnotations/Schema/index.js +143 -0
- package/dist/dev/src/builtins/System/ComponentModel/DataAnnotations/Schema/index.js.map +1 -0
- package/dist/dev/src/builtins/System/ComponentModel/DataAnnotations/index.js +1237 -0
- package/dist/dev/src/builtins/System/ComponentModel/DataAnnotations/index.js.map +1 -0
- package/dist/dev/src/builtins/System/ComponentModel/Design/Serialization/index.js +535 -0
- package/dist/dev/src/builtins/System/ComponentModel/Design/Serialization/index.js.map +1 -0
- package/dist/dev/src/builtins/System/ComponentModel/Design/index.js +2008 -0
- package/dist/dev/src/builtins/System/ComponentModel/Design/index.js.map +1 -0
- package/dist/dev/src/builtins/System/ComponentModel/index.js +6649 -0
- package/dist/dev/src/builtins/System/ComponentModel/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Configuration/Assemblies/index.js +69 -0
- package/dist/dev/src/builtins/System/Configuration/Assemblies/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Configuration/index.js +5 -0
- package/dist/dev/src/builtins/System/Configuration/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Data/Common/index.js +3279 -0
- package/dist/dev/src/builtins/System/Data/Common/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Data/SqlTypes/index.js +2655 -0
- package/dist/dev/src/builtins/System/Data/SqlTypes/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Data/index.js +4504 -0
- package/dist/dev/src/builtins/System/Data/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Diagnostics/CodeAnalysis/index.js +705 -0
- package/dist/dev/src/builtins/System/Diagnostics/CodeAnalysis/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Diagnostics/Contracts/index.js +309 -0
- package/dist/dev/src/builtins/System/Diagnostics/Contracts/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Diagnostics/Metrics/index.js +323 -0
- package/dist/dev/src/builtins/System/Diagnostics/Metrics/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Diagnostics/SymbolStore/index.js +610 -0
- package/dist/dev/src/builtins/System/Diagnostics/SymbolStore/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Diagnostics/Tracing/index.js +954 -0
- package/dist/dev/src/builtins/System/Diagnostics/Tracing/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Diagnostics/index.js +3826 -0
- package/dist/dev/src/builtins/System/Diagnostics/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Drawing/index.js +3305 -0
- package/dist/dev/src/builtins/System/Drawing/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Dynamic/index.js +795 -0
- package/dist/dev/src/builtins/System/Dynamic/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Formats/Asn1/index.js +843 -0
- package/dist/dev/src/builtins/System/Formats/Asn1/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Formats/Tar/index.js +436 -0
- package/dist/dev/src/builtins/System/Formats/Tar/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Formats/index.js +6 -0
- package/dist/dev/src/builtins/System/Formats/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Globalization/index.js +3848 -0
- package/dist/dev/src/builtins/System/Globalization/index.js.map +1 -0
- package/dist/dev/src/builtins/System/IO/Compression/index.js +894 -0
- package/dist/dev/src/builtins/System/IO/Compression/index.js.map +1 -0
- package/dist/dev/src/builtins/System/IO/Enumeration/index.js +218 -0
- package/dist/dev/src/builtins/System/IO/Enumeration/index.js.map +1 -0
- package/dist/dev/src/builtins/System/IO/IsolatedStorage/index.js +495 -0
- package/dist/dev/src/builtins/System/IO/IsolatedStorage/index.js.map +1 -0
- package/dist/dev/src/builtins/System/IO/MemoryMappedFiles/index.js +251 -0
- package/dist/dev/src/builtins/System/IO/MemoryMappedFiles/index.js.map +1 -0
- package/dist/dev/src/builtins/System/IO/Pipelines/index.js +415 -0
- package/dist/dev/src/builtins/System/IO/Pipelines/index.js.map +1 -0
- package/dist/dev/src/builtins/System/IO/Pipes/index.js +723 -0
- package/dist/dev/src/builtins/System/IO/Pipes/index.js.map +1 -0
- package/dist/dev/src/builtins/System/IO/index.js +3713 -0
- package/dist/dev/src/builtins/System/IO/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Linq/Expressions/index.js +2253 -0
- package/dist/dev/src/builtins/System/Linq/Expressions/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Linq/index.js +275 -0
- package/dist/dev/src/builtins/System/Linq/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Net/Cache/index.js +217 -0
- package/dist/dev/src/builtins/System/Net/Cache/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Net/Http/Headers/index.js +1668 -0
- package/dist/dev/src/builtins/System/Net/Http/Headers/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Net/Http/Json/index.js +72 -0
- package/dist/dev/src/builtins/System/Net/Http/Json/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Net/Http/Metrics/index.js +40 -0
- package/dist/dev/src/builtins/System/Net/Http/Metrics/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Net/Http/index.js +1458 -0
- package/dist/dev/src/builtins/System/Net/Http/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Net/Mail/index.js +871 -0
- package/dist/dev/src/builtins/System/Net/Mail/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Net/Mime/index.js +500 -0
- package/dist/dev/src/builtins/System/Net/Mime/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Net/NetworkInformation/index.js +2776 -0
- package/dist/dev/src/builtins/System/Net/NetworkInformation/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Net/Quic/index.js +635 -0
- package/dist/dev/src/builtins/System/Net/Quic/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Net/Security/index.js +1432 -0
- package/dist/dev/src/builtins/System/Net/Security/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Net/Sockets/index.js +3095 -0
- package/dist/dev/src/builtins/System/Net/Sockets/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Net/WebSockets/index.js +876 -0
- package/dist/dev/src/builtins/System/Net/WebSockets/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Net/index.js +5481 -0
- package/dist/dev/src/builtins/System/Net/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Numerics/index.js +3425 -0
- package/dist/dev/src/builtins/System/Numerics/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Reflection/Emit/index.js +4293 -0
- package/dist/dev/src/builtins/System/Reflection/Emit/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Reflection/Metadata/Ecma335/index.js +2218 -0
- package/dist/dev/src/builtins/System/Reflection/Metadata/Ecma335/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Reflection/Metadata/index.js +6045 -0
- package/dist/dev/src/builtins/System/Reflection/Metadata/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Reflection/PortableExecutable/index.js +2020 -0
- package/dist/dev/src/builtins/System/Reflection/PortableExecutable/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Reflection/index.js +5244 -0
- package/dist/dev/src/builtins/System/Reflection/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Resources/index.js +289 -0
- package/dist/dev/src/builtins/System/Resources/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Runtime/CompilerServices/index.js +1896 -0
- package/dist/dev/src/builtins/System/Runtime/CompilerServices/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Runtime/ConstrainedExecution/index.js +103 -0
- package/dist/dev/src/builtins/System/Runtime/ConstrainedExecution/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Runtime/ExceptionServices/index.js +62 -0
- package/dist/dev/src/builtins/System/Runtime/ExceptionServices/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Runtime/InteropServices/ComTypes/index.js +67 -0
- package/dist/dev/src/builtins/System/Runtime/InteropServices/ComTypes/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Runtime/InteropServices/JavaScript/index.js +210 -0
- package/dist/dev/src/builtins/System/Runtime/InteropServices/JavaScript/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Runtime/InteropServices/Marshalling/index.js +1012 -0
- package/dist/dev/src/builtins/System/Runtime/InteropServices/Marshalling/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Runtime/InteropServices/ObjectiveC/index.js +79 -0
- package/dist/dev/src/builtins/System/Runtime/InteropServices/ObjectiveC/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Runtime/InteropServices/Swift/index.js +49 -0
- package/dist/dev/src/builtins/System/Runtime/InteropServices/Swift/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Runtime/InteropServices/index.js +3626 -0
- package/dist/dev/src/builtins/System/Runtime/InteropServices/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Runtime/Intrinsics/Arm/index.js +1297 -0
- package/dist/dev/src/builtins/System/Runtime/Intrinsics/Arm/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Runtime/Intrinsics/Wasm/index.js +338 -0
- package/dist/dev/src/builtins/System/Runtime/Intrinsics/Wasm/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Runtime/Intrinsics/X86/index.js +1372 -0
- package/dist/dev/src/builtins/System/Runtime/Intrinsics/X86/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Runtime/Intrinsics/index.js +273 -0
- package/dist/dev/src/builtins/System/Runtime/Intrinsics/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Runtime/Loader/index.js +140 -0
- package/dist/dev/src/builtins/System/Runtime/Loader/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Runtime/Remoting/index.js +18 -0
- package/dist/dev/src/builtins/System/Runtime/Remoting/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Runtime/Serialization/DataContracts/index.js +265 -0
- package/dist/dev/src/builtins/System/Runtime/Serialization/DataContracts/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Runtime/Serialization/Formatters/Binary/index.js +61 -0
- package/dist/dev/src/builtins/System/Runtime/Serialization/Formatters/Binary/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Runtime/Serialization/Formatters/index.js +83 -0
- package/dist/dev/src/builtins/System/Runtime/Serialization/Formatters/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Runtime/Serialization/Json/index.js +192 -0
- package/dist/dev/src/builtins/System/Runtime/Serialization/Json/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Runtime/Serialization/index.js +1611 -0
- package/dist/dev/src/builtins/System/Runtime/Serialization/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Runtime/Versioning/index.js +336 -0
- package/dist/dev/src/builtins/System/Runtime/Versioning/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Runtime/index.js +245 -0
- package/dist/dev/src/builtins/System/Runtime/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Security/AccessControl/index.js +2343 -0
- package/dist/dev/src/builtins/System/Security/AccessControl/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Security/Authentication/ExtendedProtection/index.js +169 -0
- package/dist/dev/src/builtins/System/Security/Authentication/ExtendedProtection/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Security/Authentication/index.js +212 -0
- package/dist/dev/src/builtins/System/Security/Authentication/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Security/Claims/index.js +844 -0
- package/dist/dev/src/builtins/System/Security/Claims/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Security/Cryptography/X509Certificates/index.js +2633 -0
- package/dist/dev/src/builtins/System/Security/Cryptography/X509Certificates/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Security/Cryptography/index.js +6673 -0
- package/dist/dev/src/builtins/System/Security/Cryptography/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Security/Permissions/index.js +325 -0
- package/dist/dev/src/builtins/System/Security/Permissions/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Security/Policy/index.js +101 -0
- package/dist/dev/src/builtins/System/Security/Policy/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Security/Principal/index.js +1338 -0
- package/dist/dev/src/builtins/System/Security/Principal/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Security/index.js +672 -0
- package/dist/dev/src/builtins/System/Security/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Text/Encodings/Web/index.js +162 -0
- package/dist/dev/src/builtins/System/Text/Encodings/Web/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Text/Encodings/index.js +5 -0
- package/dist/dev/src/builtins/System/Text/Encodings/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Text/Json/Nodes/index.js +250 -0
- package/dist/dev/src/builtins/System/Text/Json/Nodes/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Text/Json/Schema/index.js +78 -0
- package/dist/dev/src/builtins/System/Text/Json/Schema/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Text/Json/Serialization/Metadata/index.js +328 -0
- package/dist/dev/src/builtins/System/Text/Json/Serialization/Metadata/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Text/Json/Serialization/index.js +840 -0
- package/dist/dev/src/builtins/System/Text/Json/Serialization/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Text/Json/index.js +1185 -0
- package/dist/dev/src/builtins/System/Text/Json/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Text/RegularExpressions/index.js +732 -0
- package/dist/dev/src/builtins/System/Text/RegularExpressions/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Text/Unicode/index.js +1199 -0
- package/dist/dev/src/builtins/System/Text/Unicode/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Text/index.js +1748 -0
- package/dist/dev/src/builtins/System/Text/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Threading/Channels/index.js +229 -0
- package/dist/dev/src/builtins/System/Threading/Channels/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Threading/Tasks/Dataflow/index.js +676 -0
- package/dist/dev/src/builtins/System/Threading/Tasks/Dataflow/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Threading/Tasks/Sources/index.js +117 -0
- package/dist/dev/src/builtins/System/Threading/Tasks/Sources/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Threading/Tasks/index.js +721 -0
- package/dist/dev/src/builtins/System/Threading/Tasks/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Threading/index.js +2292 -0
- package/dist/dev/src/builtins/System/Threading/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Timers/index.js +129 -0
- package/dist/dev/src/builtins/System/Timers/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Transactions/index.js +727 -0
- package/dist/dev/src/builtins/System/Transactions/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Web/index.js +84 -0
- package/dist/dev/src/builtins/System/Web/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Windows/Input/index.js +18 -0
- package/dist/dev/src/builtins/System/Windows/Input/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Windows/Markup/index.js +28 -0
- package/dist/dev/src/builtins/System/Windows/Markup/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Windows/index.js +6 -0
- package/dist/dev/src/builtins/System/Windows/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Xml/Linq/index.js +1086 -0
- package/dist/dev/src/builtins/System/Xml/Linq/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Xml/Resolvers/index.js +86 -0
- package/dist/dev/src/builtins/System/Xml/Resolvers/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Xml/Schema/index.js +2993 -0
- package/dist/dev/src/builtins/System/Xml/Schema/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Xml/Serialization/index.js +2356 -0
- package/dist/dev/src/builtins/System/Xml/Serialization/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Xml/XPath/index.js +917 -0
- package/dist/dev/src/builtins/System/Xml/XPath/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Xml/Xsl/index.js +315 -0
- package/dist/dev/src/builtins/System/Xml/Xsl/index.js.map +1 -0
- package/dist/dev/src/builtins/System/Xml/index.js +5736 -0
- package/dist/dev/src/builtins/System/Xml/index.js.map +1 -0
- package/dist/dev/src/builtins/System/index.js +14587 -0
- package/dist/dev/src/builtins/System/index.js.map +1 -0
- package/dist/dev/src/builtins/index.js +3 -0
- package/dist/dev/src/builtins/index.js.map +1 -0
- package/dist/dev/src/components/Declaration.js +9 -0
- package/dist/dev/src/components/Declaration.js.map +1 -0
- package/dist/dev/src/components/Name.js +12 -0
- package/dist/dev/src/components/Name.js.map +1 -0
- package/dist/dev/src/components/Reference.js +13 -0
- package/dist/dev/src/components/Reference.js.map +1 -0
- package/dist/dev/src/components/access-expression/access-expression.js +288 -0
- package/dist/dev/src/components/access-expression/access-expression.js.map +1 -0
- package/dist/dev/src/components/access-expression/access-expression.test.js +608 -0
- package/dist/dev/src/components/access-expression/access-expression.test.js.map +1 -0
- package/dist/dev/src/components/access-expression/part-descriptors.js +14 -0
- package/dist/dev/src/components/access-expression/part-descriptors.js.map +1 -0
- package/dist/dev/src/components/attributes/attributes.js +113 -0
- package/dist/dev/src/components/attributes/attributes.js.map +1 -0
- package/dist/dev/src/components/attributes/attributes.test.js +201 -0
- package/dist/dev/src/components/attributes/attributes.test.js.map +1 -0
- package/dist/dev/src/components/class/declaration.js +123 -0
- package/dist/dev/src/components/class/declaration.js.map +1 -0
- package/dist/dev/src/components/class/declaration.test.js +893 -0
- package/dist/dev/src/components/class/declaration.test.js.map +1 -0
- package/dist/dev/src/components/constructor/constructor.js +129 -0
- package/dist/dev/src/components/constructor/constructor.js.map +1 -0
- package/dist/dev/src/components/constructor/constructor.test.js +228 -0
- package/dist/dev/src/components/constructor/constructor.test.js.map +1 -0
- package/dist/dev/src/components/csproj-file/csproj-file.js +32 -0
- package/dist/dev/src/components/csproj-file/csproj-file.js.map +1 -0
- package/dist/dev/src/components/csproj-file/csproj-file.test.js +70 -0
- package/dist/dev/src/components/csproj-file/csproj-file.test.js.map +1 -0
- package/dist/dev/src/components/doc/comment.js +129 -0
- package/dist/dev/src/components/doc/comment.js.map +1 -0
- package/dist/dev/src/components/doc/comment.test.js +577 -0
- package/dist/dev/src/components/doc/comment.test.js.map +1 -0
- package/dist/dev/src/components/doc/from-markdown.js +83 -0
- package/dist/dev/src/components/doc/from-markdown.js.map +1 -0
- package/dist/dev/src/components/doc/from-markdown.test.js +112 -0
- package/dist/dev/src/components/doc/from-markdown.test.js.map +1 -0
- package/dist/dev/src/components/enum/declaration.js +80 -0
- package/dist/dev/src/components/enum/declaration.js.map +1 -0
- package/dist/dev/src/components/enum/declaration.ref.test.js +221 -0
- package/dist/dev/src/components/enum/declaration.ref.test.js.map +1 -0
- package/dist/dev/src/components/enum/declaration.test.js +122 -0
- package/dist/dev/src/components/enum/declaration.test.js.map +1 -0
- package/dist/dev/src/components/enum/member.js +47 -0
- package/dist/dev/src/components/enum/member.js.map +1 -0
- package/dist/dev/src/components/enum/member.test.js +126 -0
- package/dist/dev/src/components/enum/member.test.js.map +1 -0
- package/dist/dev/src/components/field/field.js +43 -0
- package/dist/dev/src/components/field/field.js.map +1 -0
- package/dist/dev/src/components/field/field.test.js +242 -0
- package/dist/dev/src/components/field/field.test.js.map +1 -0
- package/dist/dev/src/components/if/if-statement.js +56 -0
- package/dist/dev/src/components/if/if-statement.js.map +1 -0
- package/dist/dev/src/components/if/if-statement.test.js +41 -0
- package/dist/dev/src/components/if/if-statement.test.js.map +1 -0
- package/dist/dev/src/components/index.js +31 -0
- package/dist/dev/src/components/index.js.map +1 -0
- package/dist/dev/src/components/interface/declaration.js +114 -0
- package/dist/dev/src/components/interface/declaration.js.map +1 -0
- package/dist/dev/src/components/interface/declaration.test.js +264 -0
- package/dist/dev/src/components/interface/declaration.test.js.map +1 -0
- package/dist/dev/src/components/interface/method.js +100 -0
- package/dist/dev/src/components/interface/method.js.map +1 -0
- package/dist/dev/src/components/interface/method.test.js +432 -0
- package/dist/dev/src/components/interface/method.test.js.map +1 -0
- package/dist/dev/src/components/interface/property.js +80 -0
- package/dist/dev/src/components/interface/property.js.map +1 -0
- package/dist/dev/src/components/interface/property.test.js +305 -0
- package/dist/dev/src/components/interface/property.test.js.map +1 -0
- package/dist/dev/src/components/invocation-expression/invocation-expression.js +94 -0
- package/dist/dev/src/components/invocation-expression/invocation-expression.js.map +1 -0
- package/dist/dev/src/components/invocation-expression/invocation-expression.test.js +153 -0
- package/dist/dev/src/components/invocation-expression/invocation-expression.test.js.map +1 -0
- package/dist/dev/src/components/lexical-scope.js +30 -0
- package/dist/dev/src/components/lexical-scope.js.map +1 -0
- package/dist/dev/src/components/method/method.js +134 -0
- package/dist/dev/src/components/method/method.js.map +1 -0
- package/dist/dev/src/components/method/method.test.js +358 -0
- package/dist/dev/src/components/method/method.test.js.map +1 -0
- package/dist/dev/src/components/method-scope.js +30 -0
- package/dist/dev/src/components/method-scope.js.map +1 -0
- package/dist/dev/src/components/namespace/namespace-name.js +20 -0
- package/dist/dev/src/components/namespace/namespace-name.js.map +1 -0
- package/dist/dev/src/components/namespace/namespace.js +61 -0
- package/dist/dev/src/components/namespace/namespace.js.map +1 -0
- package/dist/dev/src/components/namespace/namespace.test.js +419 -0
- package/dist/dev/src/components/namespace/namespace.test.js.map +1 -0
- package/dist/dev/src/components/namespace-scopes.js +68 -0
- package/dist/dev/src/components/namespace-scopes.js.map +1 -0
- package/dist/dev/src/components/namespace.ref.test.js +431 -0
- package/dist/dev/src/components/namespace.ref.test.js.map +1 -0
- package/dist/dev/src/components/parameters/parameters.js +96 -0
- package/dist/dev/src/components/parameters/parameters.js.map +1 -0
- package/dist/dev/src/components/parameters/parameters.test.js +317 -0
- package/dist/dev/src/components/parameters/parameters.test.js.map +1 -0
- package/dist/dev/src/components/property/property.js +192 -0
- package/dist/dev/src/components/property/property.js.map +1 -0
- package/dist/dev/src/components/property/property.test.js +535 -0
- package/dist/dev/src/components/property/property.test.js.map +1 -0
- package/dist/dev/src/components/record/declaration.js +132 -0
- package/dist/dev/src/components/record/declaration.js.map +1 -0
- package/dist/dev/src/components/record/declaration.test.js +231 -0
- package/dist/dev/src/components/record/declaration.test.js.map +1 -0
- package/dist/dev/src/components/region/region.js +14 -0
- package/dist/dev/src/components/region/region.js.map +1 -0
- package/dist/dev/src/components/region/region.test.js +39 -0
- package/dist/dev/src/components/region/region.test.js.map +1 -0
- package/dist/dev/src/components/source-file/source-file.js +164 -0
- package/dist/dev/src/components/source-file/source-file.js.map +1 -0
- package/dist/dev/src/components/source-file/source-file.test.js +271 -0
- package/dist/dev/src/components/source-file/source-file.test.js.map +1 -0
- package/dist/dev/src/components/source-file/using.test.js +201 -0
- package/dist/dev/src/components/source-file/using.test.js.map +1 -0
- package/dist/dev/src/components/stc/index.js +13 -0
- package/dist/dev/src/components/stc/index.js.map +1 -0
- package/dist/dev/src/components/struct/declaration.js +113 -0
- package/dist/dev/src/components/struct/declaration.js.map +1 -0
- package/dist/dev/src/components/struct/declaration.test.js +400 -0
- package/dist/dev/src/components/struct/declaration.test.js.map +1 -0
- package/dist/dev/src/components/type-parameters/type-parameter-constraints.js +73 -0
- package/dist/dev/src/components/type-parameters/type-parameter-constraints.js.map +1 -0
- package/dist/dev/src/components/type-parameters/type-parameter-constraints.test.js +92 -0
- package/dist/dev/src/components/type-parameters/type-parameter-constraints.test.js.map +1 -0
- package/dist/dev/src/components/type-parameters/type-parameter.js +28 -0
- package/dist/dev/src/components/type-parameters/type-parameter.js.map +1 -0
- package/dist/dev/src/components/type-parameters/type-parameters.js +71 -0
- package/dist/dev/src/components/type-parameters/type-parameters.js.map +1 -0
- package/dist/dev/src/components/type-parameters/type-parameters.test.js +103 -0
- package/dist/dev/src/components/type-parameters/type-parameters.test.js.map +1 -0
- package/dist/dev/src/components/using/using.js +45 -0
- package/dist/dev/src/components/using/using.js.map +1 -0
- package/dist/dev/src/components/using/using.test.js +27 -0
- package/dist/dev/src/components/using/using.test.js.map +1 -0
- package/dist/dev/src/components/var/declaration.js +72 -0
- package/dist/dev/src/components/var/declaration.js.map +1 -0
- package/dist/dev/src/components/var/declaration.test.js +167 -0
- package/dist/dev/src/components/var/declaration.test.js.map +1 -0
- package/dist/dev/src/contexts/format-options.js +9 -0
- package/dist/dev/src/contexts/format-options.js.map +1 -0
- package/dist/dev/src/contexts/global-namespace.js +30 -0
- package/dist/dev/src/contexts/global-namespace.js.map +1 -0
- package/dist/dev/src/contexts/namespace.js +6 -0
- package/dist/dev/src/contexts/namespace.js.map +1 -0
- package/dist/dev/src/contexts/reference-context.js +15 -0
- package/dist/dev/src/contexts/reference-context.js.map +1 -0
- package/dist/dev/src/create-library.js +136 -0
- package/dist/dev/src/create-library.js.map +1 -0
- package/dist/dev/src/create-library.test.js +289 -0
- package/dist/dev/src/create-library.test.js.map +1 -0
- package/dist/dev/src/index.js +9 -0
- package/dist/dev/src/index.js.map +1 -0
- package/dist/dev/src/modifiers.js +21 -0
- package/dist/dev/src/modifiers.js.map +1 -0
- package/dist/dev/src/name-policy.js +36 -0
- package/dist/dev/src/name-policy.js.map +1 -0
- package/dist/dev/src/scopes/class.js +11 -0
- package/dist/dev/src/scopes/class.js.map +1 -0
- package/dist/dev/src/scopes/contexts.js +34 -0
- package/dist/dev/src/scopes/contexts.js.map +1 -0
- package/dist/dev/src/scopes/csharp.js +25 -0
- package/dist/dev/src/scopes/csharp.js.map +1 -0
- package/dist/dev/src/scopes/factories.js +25 -0
- package/dist/dev/src/scopes/factories.js.map +1 -0
- package/dist/dev/src/scopes/index.js +10 -0
- package/dist/dev/src/scopes/index.js.map +1 -0
- package/dist/dev/src/scopes/lexical.js +8 -0
- package/dist/dev/src/scopes/lexical.js.map +1 -0
- package/dist/dev/src/scopes/method.js +14 -0
- package/dist/dev/src/scopes/method.js.map +1 -0
- package/dist/dev/src/scopes/named-type.js +33 -0
- package/dist/dev/src/scopes/named-type.js.map +1 -0
- package/dist/dev/src/scopes/namespace.js +39 -0
- package/dist/dev/src/scopes/namespace.js.map +1 -0
- package/dist/dev/src/scopes/source-file.js +44 -0
- package/dist/dev/src/scopes/source-file.js.map +1 -0
- package/dist/dev/src/symbols/csharp.js +263 -0
- package/dist/dev/src/symbols/csharp.js.map +1 -0
- package/dist/dev/src/symbols/factories.js +145 -0
- package/dist/dev/src/symbols/factories.js.map +1 -0
- package/dist/dev/src/symbols/index.js +7 -0
- package/dist/dev/src/symbols/index.js.map +1 -0
- package/dist/dev/src/symbols/method.js +16 -0
- package/dist/dev/src/symbols/method.js.map +1 -0
- package/dist/dev/src/symbols/named-type.js +42 -0
- package/dist/dev/src/symbols/named-type.js.map +1 -0
- package/dist/dev/src/symbols/namespace.js +55 -0
- package/dist/dev/src/symbols/namespace.js.map +1 -0
- package/dist/dev/src/symbols/reference.js +79 -0
- package/dist/dev/src/symbols/reference.js.map +1 -0
- package/dist/dev/test/utils.js +111 -0
- package/dist/dev/test/utils.js.map +1 -0
- package/dist/dev/test/vitest.setup.js +2 -0
- package/dist/dev/test/vitest.setup.js.map +1 -0
- package/dist/dev/testing/create-wrapper.js +13 -0
- package/dist/dev/testing/create-wrapper.js.map +1 -0
- package/dist/dev/testing/create-wrapper.test.js +300 -0
- package/dist/dev/testing/create-wrapper.test.js.map +1 -0
- package/dist/dev/testing/index.js +2 -0
- package/dist/dev/testing/index.js.map +1 -0
- package/dist/src/components/access-expression/access-expression.d.ts +7 -2
- package/dist/src/components/access-expression/access-expression.d.ts.map +1 -1
- package/dist/src/components/access-expression/access-expression.js +108 -197
- package/dist/src/components/access-expression/access-expression.js.map +1 -1
- package/dist/src/components/access-expression/part-descriptors.d.ts +0 -31
- package/dist/src/components/access-expression/part-descriptors.d.ts.map +1 -1
- package/dist/src/components/access-expression/part-descriptors.js +0 -105
- package/dist/src/components/access-expression/part-descriptors.js.map +1 -1
- package/dist/src/components/constructor/constructor.d.ts +34 -0
- package/dist/src/components/constructor/constructor.d.ts.map +1 -1
- package/dist/src/components/constructor/constructor.js +41 -4
- package/dist/src/components/constructor/constructor.js.map +1 -1
- package/dist/src/components/constructor/constructor.test.js +114 -0
- package/dist/src/components/constructor/constructor.test.js.map +1 -1
- package/dist/src/components/doc/from-markdown.js +1 -1
- package/dist/src/components/doc/from-markdown.js.map +1 -1
- package/dist/src/components/enum/declaration.d.ts +2 -0
- package/dist/src/components/enum/declaration.d.ts.map +1 -1
- package/dist/src/components/enum/declaration.js +6 -1
- package/dist/src/components/enum/declaration.js.map +1 -1
- package/dist/src/components/enum/declaration.test.js +24 -0
- package/dist/src/components/enum/declaration.test.js.map +1 -1
- package/dist/src/components/enum/member.d.ts +4 -2
- package/dist/src/components/enum/member.d.ts.map +1 -1
- package/dist/src/components/enum/member.js +8 -3
- package/dist/src/components/enum/member.js.map +1 -1
- package/dist/src/components/enum/member.test.js +26 -0
- package/dist/src/components/enum/member.test.js.map +1 -1
- package/dist/src/components/lexical-scope.d.ts.map +1 -1
- package/dist/src/components/lexical-scope.js +4 -3
- package/dist/src/components/lexical-scope.js.map +1 -1
- package/dist/src/components/method-scope.d.ts.map +1 -1
- package/dist/src/components/method-scope.js +4 -3
- package/dist/src/components/method-scope.js.map +1 -1
- package/dist/src/components/namespace/namespace.d.ts.map +1 -1
- package/dist/src/components/namespace/namespace.js +13 -14
- package/dist/src/components/namespace/namespace.js.map +1 -1
- package/dist/src/components/namespace/namespace.test.js +66 -4
- package/dist/src/components/namespace/namespace.test.js.map +1 -1
- package/dist/src/components/namespace-scopes.d.ts +16 -0
- package/dist/src/components/namespace-scopes.d.ts.map +1 -1
- package/dist/src/components/namespace-scopes.js +8 -1
- package/dist/src/components/namespace-scopes.js.map +1 -1
- package/dist/src/components/namespace.ref.test.js +62 -9
- package/dist/src/components/namespace.ref.test.js.map +1 -1
- package/dist/src/components/property/property.d.ts +42 -4
- package/dist/src/components/property/property.d.ts.map +1 -1
- package/dist/src/components/property/property.js +64 -11
- package/dist/src/components/property/property.js.map +1 -1
- package/dist/src/components/property/property.test.js +104 -0
- package/dist/src/components/property/property.test.js.map +1 -1
- package/dist/src/components/source-file/source-file.d.ts.map +1 -1
- package/dist/src/components/source-file/source-file.js +9 -5
- package/dist/src/components/source-file/source-file.js.map +1 -1
- package/dist/src/contexts/global-namespace.d.ts.map +1 -1
- package/dist/src/contexts/global-namespace.js +4 -4
- package/dist/src/contexts/global-namespace.js.map +1 -1
- package/dist/src/create-library.d.ts.map +1 -1
- package/dist/src/create-library.js +7 -7
- package/dist/src/create-library.js.map +1 -1
- package/dist/src/scopes/csharp.d.ts +1 -0
- package/dist/src/scopes/csharp.d.ts.map +1 -1
- package/dist/src/scopes/csharp.js +10 -0
- package/dist/src/scopes/csharp.js.map +1 -1
- package/dist/src/scopes/factories.d.ts.map +1 -1
- package/dist/src/scopes/factories.js +4 -3
- package/dist/src/scopes/factories.js.map +1 -1
- package/dist/src/scopes/namespace.js +2 -2
- package/dist/src/scopes/namespace.js.map +1 -1
- package/dist/src/symbols/csharp.d.ts +1 -0
- package/dist/src/symbols/csharp.d.ts.map +1 -1
- package/dist/src/symbols/csharp.js +19 -2
- package/dist/src/symbols/csharp.js.map +1 -1
- package/dist/src/symbols/factories.d.ts.map +1 -1
- package/dist/src/symbols/factories.js +42 -10
- package/dist/src/symbols/factories.js.map +1 -1
- package/dist/src/symbols/named-type.d.ts +1 -0
- package/dist/src/symbols/named-type.d.ts.map +1 -1
- package/dist/src/symbols/named-type.js +12 -1
- package/dist/src/symbols/named-type.js.map +1 -1
- package/dist/src/symbols/namespace.d.ts +1 -0
- package/dist/src/symbols/namespace.d.ts.map +1 -1
- package/dist/src/symbols/namespace.js +11 -1
- package/dist/src/symbols/namespace.js.map +1 -1
- package/dist/testing/create-wrapper.d.ts.map +1 -1
- package/dist/testing/create-wrapper.js +2 -1
- package/dist/testing/create-wrapper.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/docs/api/components/AttributeList.md +34 -0
- package/docs/api/components/ClassDeclaration.md +104 -0
- package/docs/api/components/Constructor.md +61 -0
- package/docs/api/components/CsprojFile.md +34 -0
- package/docs/api/components/Declaration.md +32 -0
- package/docs/api/components/DocC.md +27 -0
- package/docs/api/components/DocCode.md +27 -0
- package/docs/api/components/DocComment.md +27 -0
- package/docs/api/components/DocDescription.md +27 -0
- package/docs/api/components/DocExample.md +27 -0
- package/docs/api/components/DocException.md +27 -0
- package/docs/api/components/DocFromMarkdown.md +27 -0
- package/docs/api/components/DocInclude.md +26 -0
- package/docs/api/components/DocList.md +26 -0
- package/docs/api/components/DocPara.md +27 -0
- package/docs/api/components/DocParam.md +28 -0
- package/docs/api/components/DocParamRef.md +25 -0
- package/docs/api/components/DocPermission.md +27 -0
- package/docs/api/components/DocRemarks.md +27 -0
- package/docs/api/components/DocReturns.md +27 -0
- package/docs/api/components/DocSee.md +30 -0
- package/docs/api/components/DocSeeAlso.md +29 -0
- package/docs/api/components/DocSummary.md +27 -0
- package/docs/api/components/DocTypeParam.md +28 -0
- package/docs/api/components/DocTypeParamRef.md +25 -0
- package/docs/api/components/DocValue.md +27 -0
- package/docs/api/components/DocWhen.md +27 -0
- package/docs/api/components/ElseClause.md +29 -0
- package/docs/api/components/ElseIfClause.md +30 -0
- package/docs/api/components/EnumDeclaration.md +76 -0
- package/docs/api/components/EnumMember.md +31 -0
- package/docs/api/components/Field.md +67 -0
- package/docs/api/components/IfStatement.md +30 -0
- package/docs/api/components/InterfaceDeclaration.md +82 -0
- package/docs/api/components/InterfaceMethod.md +68 -0
- package/docs/api/components/InterfaceProperty.md +78 -0
- package/docs/api/components/InvocationExpression.md +49 -0
- package/docs/api/components/LexicalScope.md +65 -0
- package/docs/api/components/Method.md +92 -0
- package/docs/api/components/MethodScope.md +65 -0
- package/docs/api/components/Name.md +19 -0
- package/docs/api/components/Namespace.md +35 -0
- package/docs/api/components/Parameter.md +58 -0
- package/docs/api/components/Parameters_2.md +27 -0
- package/docs/api/components/Property.md +110 -0
- package/docs/api/components/RecordDeclaration.md +84 -0
- package/docs/api/components/Reference.md +25 -0
- package/docs/api/components/Region.md +28 -0
- package/docs/api/components/SourceFile.md +45 -0
- package/docs/api/components/StructDeclaration.md +94 -0
- package/docs/api/components/UsingNamespaceDirective.md +25 -0
- package/docs/api/components/Usings.md +40 -0
- package/docs/api/components/VarDeclaration.md +74 -0
- package/docs/api/components/index.md +55 -0
- package/docs/api/functions/access.md +35 -0
- package/docs/api/functions/accessibilityFromProps.md +18 -0
- package/docs/api/functions/computeModifiersPrefix.md +20 -0
- package/docs/api/functions/createCSharpNamePolicy.md +17 -0
- package/docs/api/functions/createCSharpNamespaceScope.md +18 -0
- package/docs/api/functions/createClassScope.md +27 -0
- package/docs/api/functions/createFieldSymbol.md +43 -0
- package/docs/api/functions/createLibrary.md +19 -0
- package/docs/api/functions/createMethodScope.md +26 -0
- package/docs/api/functions/createMethodSymbol.md +34 -0
- package/docs/api/functions/createNamedTypeScope.md +27 -0
- package/docs/api/functions/createNamedTypeSymbol.md +35 -0
- package/docs/api/functions/createNamespaceSymbol.md +43 -0
- package/docs/api/functions/createParameterSymbol.md +45 -0
- package/docs/api/functions/createPropertySymbol.md +43 -0
- package/docs/api/functions/createTypeParameterSymbol.md +34 -0
- package/docs/api/functions/createVariableSymbol.md +43 -0
- package/docs/api/functions/getAccessModifier.md +18 -0
- package/docs/api/functions/getAsyncModifier.md +18 -0
- package/docs/api/functions/index.md +33 -0
- package/docs/api/functions/makeModifiers.md +18 -0
- package/docs/api/functions/nonAccessibilityFromProps.md +18 -0
- package/docs/api/functions/ref.md +18 -0
- package/docs/api/functions/useCSharpNamePolicy.md +17 -0
- package/docs/api/functions/useCSharpScope.md +17 -0
- package/docs/api/functions/useCsharpFormatOptions.md +18 -0
- package/docs/api/functions/useEnclosingNamespaceScope.md +17 -0
- package/docs/api/functions/useLexicalScope.md +17 -0
- package/docs/api/functions/useMethodScope.md +17 -0
- package/docs/api/functions/useNamedTypeScope.md +17 -0
- package/docs/api/functions/useNamespace.md +17 -0
- package/docs/api/functions/useSourceFileScope.md +17 -0
- package/docs/api/index.md +6 -0
- package/docs/api/types/AccessExpressionBuilder.md +11 -0
- package/docs/api/types/AccessExpressionPartProps.md +17 -0
- package/docs/api/types/AccessModifiers.md +13 -0
- package/docs/api/types/AttributeProps.md +8 -0
- package/docs/api/types/AttributesProp.md +5 -0
- package/docs/api/types/CSharpClassScope.md +9 -0
- package/docs/api/types/CSharpElements.md +5 -0
- package/docs/api/types/CSharpFormatOptions.md +5 -0
- package/docs/api/types/CSharpLexicalScope.md +10 -0
- package/docs/api/types/CSharpMethodScope.md +12 -0
- package/docs/api/types/CSharpNamedTypeScope.md +16 -0
- package/docs/api/types/CSharpNamespaceScope.md +10 -0
- package/docs/api/types/CSharpProjectSdk.md +5 -0
- package/docs/api/types/CSharpScope.md +12 -0
- package/docs/api/types/CSharpSourceFileScope.md +13 -0
- package/docs/api/types/CSharpSymbol.md +30 -0
- package/docs/api/types/CSharpSymbolKinds.md +5 -0
- package/docs/api/types/CSharpSymbolOptions.md +17 -0
- package/docs/api/types/ClassDescriptor.md +9 -0
- package/docs/api/types/ClassModifiers.md +10 -0
- package/docs/api/types/CreateMethodSymbolOptions.md +9 -0
- package/docs/api/types/CreateTypeParameterSymbolOptions.md +9 -0
- package/docs/api/types/DeclarationModifiers.md +8 -0
- package/docs/api/types/DeclaredAccessibility.md +5 -0
- package/docs/api/types/Descriptor.md +5 -0
- package/docs/api/types/DocCommentTagProps.md +7 -0
- package/docs/api/types/EnumDescriptor.md +9 -0
- package/docs/api/types/FieldDescriptor.md +9 -0
- package/docs/api/types/FieldModifiers.md +12 -0
- package/docs/api/types/GenericDescriptor.md +7 -0
- package/docs/api/types/InterfaceDescriptor.md +9 -0
- package/docs/api/types/InterfaceMethodModifiers.md +9 -0
- package/docs/api/types/InterfaceModifiers.md +7 -0
- package/docs/api/types/InterfacePropertyModifiers.md +9 -0
- package/docs/api/types/LexicalScopeProps.md +5 -0
- package/docs/api/types/LibraryFrom.md +7 -0
- package/docs/api/types/MemberDescriptor.md +16 -0
- package/docs/api/types/MethodDescriptor.md +10 -0
- package/docs/api/types/MethodKinds.md +5 -0
- package/docs/api/types/MethodModifiers.md +15 -0
- package/docs/api/types/MethodScopeProps.md +5 -0
- package/docs/api/types/MethodSymbol.md +13 -0
- package/docs/api/types/NamedTypeDescriptor.md +11 -0
- package/docs/api/types/NamedTypeSymbol.md +17 -0
- package/docs/api/types/NamedTypeSymbolKind.md +5 -0
- package/docs/api/types/NamedTypeTypeKind.md +5 -0
- package/docs/api/types/NamespaceDescriptor.md +8 -0
- package/docs/api/types/NamespaceSymbol.md +16 -0
- package/docs/api/types/NamespaceSymbolOptions.md +9 -0
- package/docs/api/types/NonAccessModifiers.md +13 -0
- package/docs/api/types/PropertyDescriptor_2.md +9 -0
- package/docs/api/types/PropertyModifiers.md +17 -0
- package/docs/api/types/RecordDescriptor.md +9 -0
- package/docs/api/types/RecordModifiers.md +7 -0
- package/docs/api/types/ResolveDescriptor.md +7 -0
- package/docs/api/types/StructDescriptor.md +9 -0
- package/docs/api/types/StructModifiers.md +10 -0
- package/docs/api/types/TypeParameterProps.md +11 -0
- package/docs/api/types/VarModifiers.md +8 -0
- package/docs/api/types/index.md +62 -0
- package/docs/api/variables/Attribute.md +21 -0
- package/docs/api/variables/index.md +3 -0
- package/package.json +19 -8
- package/src/components/access-expression/access-expression.tsx +146 -243
- package/src/components/access-expression/part-descriptors.ts +0 -186
- package/src/components/constructor/constructor.test.tsx +91 -0
- package/src/components/constructor/constructor.tsx +86 -1
- package/src/components/doc/from-markdown.tsx +4 -1
- package/src/components/enum/declaration.test.tsx +20 -0
- package/src/components/enum/declaration.tsx +4 -0
- package/src/components/enum/member.test.tsx +21 -0
- package/src/components/enum/member.tsx +21 -5
- package/src/components/lexical-scope.tsx +15 -4
- package/src/components/method-scope.tsx +15 -4
- package/src/components/namespace/namespace.test.tsx +47 -3
- package/src/components/namespace/namespace.tsx +17 -9
- package/src/components/namespace-scopes.tsx +25 -1
- package/src/components/namespace.ref.test.tsx +50 -9
- package/src/components/property/property.test.tsx +89 -0
- package/src/components/property/property.tsx +111 -16
- package/src/components/source-file/source-file.tsx +12 -6
- package/src/contexts/global-namespace.ts +11 -6
- package/src/create-library.ts +18 -9
- package/src/scopes/csharp.ts +11 -0
- package/src/scopes/factories.ts +4 -4
- package/src/scopes/namespace.ts +2 -2
- package/src/symbols/csharp.ts +20 -1
- package/src/symbols/factories.ts +46 -34
- package/src/symbols/named-type.ts +15 -3
- package/src/symbols/namespace.ts +12 -2
- package/temp/api.json +309 -248
- package/testing/create-wrapper.tsx +2 -1
- package/vitest.config.ts +8 -0
|
@@ -1,76 +1,126 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Children,
|
|
3
|
-
childrenArray,
|
|
4
|
-
ComponentDefinition,
|
|
5
3
|
computed,
|
|
4
|
+
createAccessExpression,
|
|
6
5
|
For,
|
|
7
|
-
isComponentCreator,
|
|
8
6
|
Refkeyable,
|
|
9
7
|
Show,
|
|
10
|
-
takeSymbols,
|
|
11
8
|
} from "@alloy-js/core";
|
|
12
9
|
import { CSharpSymbol } from "../../symbols/csharp.js";
|
|
13
|
-
import {
|
|
14
|
-
childrenToPartDescriptors,
|
|
15
|
-
isArgsPart,
|
|
16
|
-
isIdPart,
|
|
17
|
-
PartDescriptor,
|
|
18
|
-
PartDescriptorWithArgs,
|
|
19
|
-
PartDescriptorWithId,
|
|
20
|
-
PartDescriptorWithIndex,
|
|
21
|
-
} from "./part-descriptors.js";
|
|
10
|
+
import { normalizeAttributeName } from "./part-descriptors.js";
|
|
22
11
|
|
|
23
12
|
export interface AccessExpressionProps {
|
|
24
13
|
children: Children;
|
|
25
14
|
}
|
|
26
15
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
16
|
+
type CSharpPartDescriptor = {
|
|
17
|
+
id: Children | undefined;
|
|
18
|
+
indexerArgs: Children[];
|
|
19
|
+
conditional: boolean;
|
|
20
|
+
nullable: boolean;
|
|
21
|
+
args: Children[] | undefined;
|
|
22
|
+
typeArgs: Children[] | undefined;
|
|
23
|
+
};
|
|
30
24
|
|
|
31
|
-
|
|
32
|
-
|
|
25
|
+
const exclusiveParts: (keyof AccessExpressionPartProps)[] = [
|
|
26
|
+
"children",
|
|
27
|
+
"args",
|
|
28
|
+
"refkey",
|
|
29
|
+
"symbol",
|
|
30
|
+
"id",
|
|
31
|
+
];
|
|
32
|
+
|
|
33
|
+
const { Expression, Part, registerOuterComponent } = createAccessExpression<
|
|
34
|
+
AccessExpressionPartProps,
|
|
35
|
+
CSharpPartDescriptor
|
|
36
|
+
>({
|
|
37
|
+
createDescriptor(partProps, sym, first) {
|
|
38
|
+
const foundProps = exclusiveParts.filter((key) => key in partProps);
|
|
39
|
+
if (foundProps.length > 1) {
|
|
40
|
+
throw new Error(
|
|
41
|
+
`Only one of ${foundProps.join(", ")} can be used for a MemberExpression part at a time`,
|
|
42
|
+
);
|
|
43
|
+
}
|
|
33
44
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
45
|
+
let id: Children | undefined;
|
|
46
|
+
if (
|
|
47
|
+
partProps.args ||
|
|
48
|
+
partProps.index !== undefined ||
|
|
49
|
+
partProps.indexerArgs
|
|
50
|
+
) {
|
|
51
|
+
id = undefined;
|
|
52
|
+
} else if (partProps.children !== undefined) {
|
|
53
|
+
id = partProps.children;
|
|
54
|
+
} else if (first && partProps.refkey) {
|
|
55
|
+
id = partProps.refkey;
|
|
56
|
+
} else if (partProps.id !== undefined) {
|
|
57
|
+
id = normalizeIfAttribute(partProps.id, partProps.attribute);
|
|
58
|
+
} else if (sym) {
|
|
59
|
+
id = normalizeIfAttribute(escapeId(sym.name), partProps.attribute);
|
|
60
|
+
} else {
|
|
61
|
+
id = "<unresolved symbol>";
|
|
62
|
+
}
|
|
37
63
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
64
|
+
let indexerArgs: Children[] = [];
|
|
65
|
+
if (partProps.indexerArgs) {
|
|
66
|
+
indexerArgs = partProps.indexerArgs;
|
|
67
|
+
} else if (partProps.index !== undefined) {
|
|
68
|
+
indexerArgs = [partProps.index];
|
|
42
69
|
}
|
|
43
70
|
|
|
44
|
-
return
|
|
45
|
-
|
|
71
|
+
return {
|
|
72
|
+
id,
|
|
73
|
+
indexerArgs,
|
|
74
|
+
conditional: !!partProps.conditional,
|
|
75
|
+
nullable:
|
|
76
|
+
partProps.nullable ? true
|
|
77
|
+
: sym ? (sym as CSharpSymbol).isNullable
|
|
78
|
+
: false,
|
|
79
|
+
args:
|
|
80
|
+
partProps.args === true ? []
|
|
81
|
+
: Array.isArray(partProps.args) ? partProps.args
|
|
82
|
+
: undefined,
|
|
83
|
+
typeArgs: partProps.typeArgs,
|
|
84
|
+
};
|
|
85
|
+
},
|
|
46
86
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
87
|
+
getBase(part) {
|
|
88
|
+
if (part.id !== undefined) {
|
|
89
|
+
return (
|
|
90
|
+
<>
|
|
91
|
+
{part.id}
|
|
92
|
+
<TypeArgs args={part.typeArgs} />
|
|
93
|
+
</>
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
return part.indexerArgs;
|
|
97
|
+
},
|
|
98
|
+
|
|
99
|
+
formatPart(part, prevPart, inCallChain) {
|
|
100
|
+
if (part.args !== undefined) {
|
|
101
|
+
return formatCallExpr(part);
|
|
102
|
+
} else if (part.id !== undefined) {
|
|
103
|
+
return formatMemberAccess(prevPart, part, inCallChain);
|
|
104
|
+
} else {
|
|
105
|
+
return formatElementAccess(prevPart, part);
|
|
106
|
+
}
|
|
107
|
+
},
|
|
50
108
|
|
|
51
|
-
|
|
52
|
-
return
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
});
|
|
56
|
-
}
|
|
109
|
+
isCallPart(part) {
|
|
110
|
+
return part.args !== undefined;
|
|
111
|
+
},
|
|
112
|
+
});
|
|
57
113
|
|
|
58
114
|
/**
|
|
59
|
-
*
|
|
115
|
+
* Create a C# access expression from parts. Each part can be a member access,
|
|
116
|
+
* element access, or invocation. Supports conditional access (`?.`), generic
|
|
117
|
+
* type arguments, and call chain formatting.
|
|
60
118
|
*/
|
|
61
|
-
function
|
|
62
|
-
|
|
63
|
-
for (const child of children) {
|
|
64
|
-
if (isComponentCreator(child, AccessExpression)) {
|
|
65
|
-
flattened.push(
|
|
66
|
-
...flattenAccessExpression(childrenArray(() => child.props.children)),
|
|
67
|
-
);
|
|
68
|
-
} else {
|
|
69
|
-
flattened.push(child);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
return flattened;
|
|
119
|
+
export function AccessExpression(props: AccessExpressionProps) {
|
|
120
|
+
return Expression(props);
|
|
73
121
|
}
|
|
122
|
+
AccessExpression.Part = Part;
|
|
123
|
+
registerOuterComponent(AccessExpression);
|
|
74
124
|
|
|
75
125
|
export interface AccessExpressionPartProps {
|
|
76
126
|
children?: Children;
|
|
@@ -130,170 +180,19 @@ export interface AccessExpressionPartProps {
|
|
|
130
180
|
attribute?: boolean;
|
|
131
181
|
}
|
|
132
182
|
|
|
133
|
-
|
|
134
|
-
/** renders nothing, the parent AccessExpression will use these args */
|
|
135
|
-
};
|
|
136
|
-
|
|
137
|
-
/**
|
|
138
|
-
* Formatting of call chains (i.e. member expressions which have more than one
|
|
139
|
-
* call in them). The general approach is that line breaks occur after each
|
|
140
|
-
* call, and there is only one call per line. When there are non-call elements,
|
|
141
|
-
* they occur prior to the call part. The first part of the member expression
|
|
142
|
-
* contains all but the last non-call part.
|
|
143
|
-
*
|
|
144
|
-
* The following is an example of proper formatting:
|
|
145
|
-
*
|
|
146
|
-
* ```ts
|
|
147
|
-
* z.dummy // all but the last non-call part for the first element
|
|
148
|
-
* .object({ // the first call part with line break after
|
|
149
|
-
* a: 1,
|
|
150
|
-
* })
|
|
151
|
-
* .dummy.partial() // the next call part with non-call parts before it
|
|
152
|
-
* ```
|
|
153
|
-
*/
|
|
154
|
-
function formatCallChain(parts: PartDescriptor[]): Children {
|
|
155
|
-
return computed(() => {
|
|
156
|
-
const expression: Children[] = [];
|
|
157
|
-
|
|
158
|
-
// break the expression into parts.
|
|
159
|
-
const chunks: PartDescriptor[][] = [];
|
|
160
|
-
|
|
161
|
-
// the first part is all the non-call parts
|
|
162
|
-
let partIndex = 0;
|
|
163
|
-
|
|
164
|
-
function pushPart() {
|
|
165
|
-
const part = parts[partIndex];
|
|
166
|
-
if (!part) throw new Error("No part to push");
|
|
167
|
-
chunks.at(-1)!.push(part);
|
|
168
|
-
partIndex++;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
function pushChunk() {
|
|
172
|
-
chunks.push([]);
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
// For the first chunk, take all the non-call parts except the last one
|
|
176
|
-
// and put them in a chunk.
|
|
177
|
-
pushChunk();
|
|
178
|
-
while (
|
|
179
|
-
partIndex < parts.length &&
|
|
180
|
-
(partIndex === parts.length - 1 ||
|
|
181
|
-
chunks.at(-1)!.length === 0 ||
|
|
182
|
-
!isArgsPart(parts[partIndex + 1]))
|
|
183
|
-
) {
|
|
184
|
-
pushPart();
|
|
185
|
-
if (isArgsPart(chunks.at(-1)!.at(-1)!)) {
|
|
186
|
-
// the first segment always ends after we see a call
|
|
187
|
-
// if we happen to take one
|
|
188
|
-
break;
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
// then for all remaining parts, collect all the non-call parts and end with
|
|
193
|
-
// a call chunk
|
|
194
|
-
while (partIndex < parts.length) {
|
|
195
|
-
pushChunk();
|
|
196
|
-
while (partIndex < parts.length && !isArgsPart(parts[partIndex])) {
|
|
197
|
-
pushPart();
|
|
198
|
-
}
|
|
199
|
-
while (partIndex < parts.length && isArgsPart(parts[partIndex])) {
|
|
200
|
-
pushPart();
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
for (let chunkIndex = 0; chunkIndex < chunks.length; chunkIndex++) {
|
|
205
|
-
const chunk = chunks[chunkIndex];
|
|
206
|
-
const chunkExpression = [];
|
|
207
|
-
for (let partIndex = 0; partIndex < chunk.length; partIndex++) {
|
|
208
|
-
if (chunkIndex === 0 && partIndex === 0) {
|
|
209
|
-
// first part is just gonna be the id
|
|
210
|
-
const firstPart =
|
|
211
|
-
isIdPart(chunk[0]) ?
|
|
212
|
-
chunk[0].id
|
|
213
|
-
: (chunk[0] as PartDescriptorWithIndex).indexerArgs;
|
|
214
|
-
chunkExpression.push(firstPart);
|
|
215
|
-
continue;
|
|
216
|
-
}
|
|
217
|
-
const part = chunk[partIndex];
|
|
218
|
-
const prevPart =
|
|
219
|
-
partIndex === 0 ?
|
|
220
|
-
chunks[chunkIndex - 1].at(-1)!
|
|
221
|
-
: chunk[partIndex - 1];
|
|
222
|
-
|
|
223
|
-
if (isArgsPart(part)) {
|
|
224
|
-
// For parts with only args (no name), append function call directly with appropriate nullish operator
|
|
225
|
-
chunkExpression.push(formatCallExpr(prevPart, part));
|
|
226
|
-
} else if (isIdPart(part)) {
|
|
227
|
-
chunkExpression.push(formatMemberAccess(prevPart, part, true));
|
|
228
|
-
} else {
|
|
229
|
-
// bracket notation - don't include the dot
|
|
230
|
-
chunkExpression.push(formatElementAccess(prevPart, part));
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
expression.push(
|
|
235
|
-
chunkIndex === 0 ? chunkExpression : (
|
|
236
|
-
<>
|
|
237
|
-
<sbr />
|
|
238
|
-
{chunkExpression}
|
|
239
|
-
</>
|
|
240
|
-
),
|
|
241
|
-
);
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
return (
|
|
245
|
-
<group>
|
|
246
|
-
<indent>{expression}</indent>
|
|
247
|
-
</group>
|
|
248
|
-
);
|
|
249
|
-
});
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
function formatNonCallChain(parts: PartDescriptor[]): Children {
|
|
253
|
-
return computed(() => {
|
|
254
|
-
const expression: Children[] = [];
|
|
255
|
-
|
|
256
|
-
for (let i = 0; i < parts.length; i++) {
|
|
257
|
-
const part = parts[i];
|
|
258
|
-
const base =
|
|
259
|
-
isIdPart(part) ?
|
|
260
|
-
part.id
|
|
261
|
-
: (part as PartDescriptorWithIndex).indexerArgs;
|
|
262
|
-
if (i === 0) {
|
|
263
|
-
expression.push(base, <TypeArgs args={(part as any).typeArgs} />);
|
|
264
|
-
} else {
|
|
265
|
-
// Determine if we should use nullish operator from previous part
|
|
266
|
-
const prevPart = parts[i - 1];
|
|
267
|
-
|
|
268
|
-
if (isArgsPart(part)) {
|
|
269
|
-
// For parts with only args (no name), append function call directly with appropriate nullish operator
|
|
270
|
-
expression.push(formatCallExpr(prevPart, part));
|
|
271
|
-
} else if (isIdPart(part)) {
|
|
272
|
-
expression.push(formatMemberAccess(prevPart, part));
|
|
273
|
-
} else {
|
|
274
|
-
// bracket notation - don't include the dot
|
|
275
|
-
expression.push(formatElementAccess(prevPart, part));
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
return expression;
|
|
281
|
-
});
|
|
282
|
-
}
|
|
183
|
+
// --- Formatting helpers ---
|
|
283
184
|
|
|
284
185
|
function formatElementAccess(
|
|
285
|
-
prevPart:
|
|
286
|
-
part:
|
|
186
|
+
prevPart: CSharpPartDescriptor,
|
|
187
|
+
part: CSharpPartDescriptor,
|
|
287
188
|
) {
|
|
189
|
+
const indexerArgs = computed(() => part.indexerArgs);
|
|
288
190
|
return (
|
|
289
191
|
<group>
|
|
290
|
-
{part.conditional ||
|
|
291
|
-
"?"
|
|
292
|
-
: ""}
|
|
293
|
-
[
|
|
192
|
+
{part.conditional || prevPart.nullable ? "?" : ""}[
|
|
294
193
|
<indent>
|
|
295
194
|
<sbr />
|
|
296
|
-
<For each={
|
|
195
|
+
<For each={indexerArgs} comma line>
|
|
297
196
|
{(arg) => arg}
|
|
298
197
|
</For>
|
|
299
198
|
</indent>
|
|
@@ -303,41 +202,34 @@ function formatElementAccess(
|
|
|
303
202
|
}
|
|
304
203
|
|
|
305
204
|
function formatMemberAccess(
|
|
306
|
-
prevPart:
|
|
307
|
-
part:
|
|
308
|
-
noIndent
|
|
205
|
+
prevPart: CSharpPartDescriptor,
|
|
206
|
+
part: CSharpPartDescriptor,
|
|
207
|
+
noIndent: boolean,
|
|
309
208
|
) {
|
|
310
|
-
|
|
209
|
+
const content = (
|
|
210
|
+
<>
|
|
211
|
+
{part.conditional || prevPart.nullable ? "?." : "."}
|
|
212
|
+
{part.id}
|
|
213
|
+
<TypeArgs args={part.typeArgs} />
|
|
214
|
+
</>
|
|
215
|
+
);
|
|
216
|
+
|
|
311
217
|
if (noIndent) {
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
<
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
);
|
|
319
|
-
};
|
|
320
|
-
} else {
|
|
321
|
-
Wrapping = function (props) {
|
|
322
|
-
return (
|
|
323
|
-
<group>
|
|
324
|
-
<indent>
|
|
325
|
-
<sbr />
|
|
326
|
-
{props.children}
|
|
327
|
-
</indent>
|
|
328
|
-
</group>
|
|
329
|
-
);
|
|
330
|
-
};
|
|
218
|
+
return (
|
|
219
|
+
<group>
|
|
220
|
+
<sbr />
|
|
221
|
+
{content}
|
|
222
|
+
</group>
|
|
223
|
+
);
|
|
331
224
|
}
|
|
332
225
|
|
|
333
226
|
return (
|
|
334
|
-
<
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
</Wrapping>
|
|
227
|
+
<group>
|
|
228
|
+
<indent>
|
|
229
|
+
<sbr />
|
|
230
|
+
{content}
|
|
231
|
+
</indent>
|
|
232
|
+
</group>
|
|
341
233
|
);
|
|
342
234
|
}
|
|
343
235
|
|
|
@@ -359,17 +251,15 @@ function TypeArgs(props: { args?: Children[] }) {
|
|
|
359
251
|
);
|
|
360
252
|
}
|
|
361
253
|
|
|
362
|
-
function formatCallExpr(
|
|
363
|
-
|
|
364
|
-
part: PartDescriptorWithArgs,
|
|
365
|
-
) {
|
|
254
|
+
function formatCallExpr(part: CSharpPartDescriptor) {
|
|
255
|
+
const args = computed(() => part.args ?? []);
|
|
366
256
|
return (
|
|
367
257
|
<group>
|
|
368
|
-
(<Show when={
|
|
369
|
-
<Show when={
|
|
258
|
+
(<Show when={args.value.length <= 1}>{args.value[0]}</Show>
|
|
259
|
+
<Show when={args.value.length > 1}>
|
|
370
260
|
<indent>
|
|
371
261
|
<sbr />
|
|
372
|
-
<For each={
|
|
262
|
+
<For each={args} comma line>
|
|
373
263
|
{(arg) => arg}
|
|
374
264
|
</For>
|
|
375
265
|
</indent>
|
|
@@ -379,3 +269,16 @@ function formatCallExpr(
|
|
|
379
269
|
</group>
|
|
380
270
|
);
|
|
381
271
|
}
|
|
272
|
+
|
|
273
|
+
// --- Utilities ---
|
|
274
|
+
|
|
275
|
+
function escapeId(id: string) {
|
|
276
|
+
return id.replace(/"/g, '\\"');
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
function normalizeIfAttribute(id: string, isAttribute?: boolean) {
|
|
280
|
+
if (isAttribute) {
|
|
281
|
+
return normalizeAttributeName(id);
|
|
282
|
+
}
|
|
283
|
+
return id;
|
|
284
|
+
}
|
|
@@ -1,189 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Children,
|
|
3
|
-
computed,
|
|
4
|
-
isComponentCreator,
|
|
5
|
-
reactive,
|
|
6
|
-
ref,
|
|
7
|
-
symbolForRefkey,
|
|
8
|
-
ToRefs,
|
|
9
|
-
} from "@alloy-js/core";
|
|
10
|
-
import { CSharpSymbol } from "../../index.js";
|
|
11
|
-
import {
|
|
12
|
-
AccessExpression,
|
|
13
|
-
AccessExpressionPartProps,
|
|
14
|
-
} from "./access-expression.jsx";
|
|
15
|
-
|
|
16
|
-
export interface PartDescriptorWithId extends PartDescriptorBase {
|
|
17
|
-
/**
|
|
18
|
-
* The identifier of the access expression part. Will use member access, so must be a valid
|
|
19
|
-
* C# identifier.
|
|
20
|
-
*/
|
|
21
|
-
id: Children;
|
|
22
|
-
conditional: boolean;
|
|
23
|
-
typeArgs?: Children[];
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export function isIdPart(part: PartDescriptor): part is PartDescriptorWithId {
|
|
27
|
-
return "id" in part && part.id !== undefined;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export interface PartDescriptorWithIndex extends PartDescriptorBase {
|
|
31
|
-
/**
|
|
32
|
-
* The index of the access expression part. Will use element access.
|
|
33
|
-
*/
|
|
34
|
-
indexerArgs: Children[];
|
|
35
|
-
conditional: boolean;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export function isIndexPart(
|
|
39
|
-
part: PartDescriptor,
|
|
40
|
-
): part is PartDescriptorWithIndex {
|
|
41
|
-
return "indexerArgs" in part && part.indexerArgs !== undefined;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export interface PartDescriptorWithArgs extends PartDescriptorBase {
|
|
45
|
-
args: Children[];
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export function isArgsPart(
|
|
49
|
-
part: PartDescriptor,
|
|
50
|
-
): part is PartDescriptorWithArgs {
|
|
51
|
-
return "args" in part && part.args !== undefined;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export interface PartDescriptorBase {
|
|
55
|
-
nullable: boolean;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export type PartDescriptor =
|
|
59
|
-
| PartDescriptorWithId
|
|
60
|
-
| PartDescriptorWithIndex
|
|
61
|
-
| PartDescriptorWithArgs;
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* Build part descriptors from the children of a MemberExpression.
|
|
65
|
-
*/
|
|
66
|
-
export function childrenToPartDescriptors(
|
|
67
|
-
children: Children[],
|
|
68
|
-
): PartDescriptor[] {
|
|
69
|
-
const parts: PartDescriptor[] = [];
|
|
70
|
-
for (const child of children) {
|
|
71
|
-
if (!isComponentCreator(child, AccessExpression.Part)) {
|
|
72
|
-
// we ignore non-parts
|
|
73
|
-
continue;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
parts.push(
|
|
77
|
-
createPartDescriptorFromProps(child.props, child === children[0]),
|
|
78
|
-
);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
return parts;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
const exclusiveParts: (keyof AccessExpressionPartProps)[] = [
|
|
85
|
-
"children",
|
|
86
|
-
"args",
|
|
87
|
-
"refkey",
|
|
88
|
-
"symbol",
|
|
89
|
-
"id",
|
|
90
|
-
];
|
|
91
|
-
/**
|
|
92
|
-
* Creates a reactive part descriptor from the given part props.
|
|
93
|
-
*
|
|
94
|
-
* @param partProps The props for the part.
|
|
95
|
-
* @param first Whether this is the first part in the expression. Refkeys are
|
|
96
|
-
* handled specially for the first part.
|
|
97
|
-
*/
|
|
98
|
-
function createPartDescriptorFromProps(
|
|
99
|
-
partProps: AccessExpressionPartProps,
|
|
100
|
-
first: boolean,
|
|
101
|
-
) {
|
|
102
|
-
const foundProps = exclusiveParts.filter((key) => {
|
|
103
|
-
return key in partProps;
|
|
104
|
-
});
|
|
105
|
-
|
|
106
|
-
if (foundProps.length > 1) {
|
|
107
|
-
throw new Error(
|
|
108
|
-
`Only one of ${foundProps.join(", ")} can be used for a MemberExpression part at a time`,
|
|
109
|
-
);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
const symbolSource = computed(() => {
|
|
113
|
-
if (partProps.refkey) {
|
|
114
|
-
return symbolForRefkey(partProps.refkey).value as CSharpSymbol;
|
|
115
|
-
} else if (partProps.symbol) {
|
|
116
|
-
return partProps.symbol;
|
|
117
|
-
} else {
|
|
118
|
-
return undefined;
|
|
119
|
-
}
|
|
120
|
-
});
|
|
121
|
-
|
|
122
|
-
const part: ToRefs<PartDescriptor> = {
|
|
123
|
-
id: computed(() => {
|
|
124
|
-
if (partProps.args || partProps.index || partProps.indexerArgs) {
|
|
125
|
-
return undefined;
|
|
126
|
-
} else if (partProps.children !== undefined) {
|
|
127
|
-
return partProps.children;
|
|
128
|
-
} else if (first && partProps.refkey) {
|
|
129
|
-
return partProps.refkey;
|
|
130
|
-
} else if (partProps.id !== undefined) {
|
|
131
|
-
return normalizeIfAttribute(partProps.id, partProps.attribute);
|
|
132
|
-
} else if (symbolSource.value) {
|
|
133
|
-
return normalizeIfAttribute(
|
|
134
|
-
escapeId(symbolSource.value.name),
|
|
135
|
-
partProps.attribute,
|
|
136
|
-
);
|
|
137
|
-
} else {
|
|
138
|
-
return "<unresolved symbol>";
|
|
139
|
-
}
|
|
140
|
-
}),
|
|
141
|
-
indexerArgs: computed(() => {
|
|
142
|
-
if (partProps.indexerArgs) {
|
|
143
|
-
return partProps.indexerArgs;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
if (partProps.index !== undefined) {
|
|
147
|
-
return [partProps.index];
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
return [];
|
|
151
|
-
}),
|
|
152
|
-
conditional: computed(() => {
|
|
153
|
-
return !!partProps.conditional;
|
|
154
|
-
}),
|
|
155
|
-
nullable: computed(() => {
|
|
156
|
-
if (partProps.nullable) {
|
|
157
|
-
return true;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
if (symbolSource.value) {
|
|
161
|
-
return symbolSource.value.isNullable;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
return false;
|
|
165
|
-
}),
|
|
166
|
-
args: ref<any>(partProps.args === true ? [] : partProps.args),
|
|
167
|
-
typeArgs: ref<any>(partProps.typeArgs),
|
|
168
|
-
};
|
|
169
|
-
|
|
170
|
-
return reactive(part);
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
/**
|
|
174
|
-
* replaces quotes with escaped quotes
|
|
175
|
-
*/
|
|
176
|
-
function escapeId(id: string) {
|
|
177
|
-
return id.replace(/"/g, '\\"');
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
function normalizeIfAttribute(id: string, isAttribute?: boolean) {
|
|
181
|
-
if (isAttribute) {
|
|
182
|
-
return normalizeAttributeName(id);
|
|
183
|
-
}
|
|
184
|
-
return id;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
1
|
/**
|
|
188
2
|
* Normalize attribute name by removing the "Attribute" suffix if present.
|
|
189
3
|
* @example
|