@glutinum/cli 0.12.0 → 0.14.0
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/README.md +35 -3
- package/dist/Glutinum.Converter/Abbreviations.js +246 -0
- package/dist/Glutinum.Converter/FsharpAST.js +98 -34
- package/dist/Glutinum.Converter/Generate.js +55 -8
- package/dist/Glutinum.Converter/GlueAST.js +446 -30
- package/dist/Glutinum.Converter/Log.js +7 -8
- package/dist/Glutinum.Converter/Merge.js +683 -31
- package/dist/Glutinum.Converter/Packages.js +308 -0
- package/dist/Glutinum.Converter/Printer.js +332 -170
- package/dist/Glutinum.Converter/Read.js +279 -6
- package/dist/Glutinum.Converter/Reader/ClassDeclaration.js +13 -7
- package/dist/Glutinum.Converter/Reader/Declaration.js +102 -17
- package/dist/Glutinum.Converter/Reader/Documentation.js +168 -73
- package/dist/Glutinum.Converter/Reader/EnumDeclaration.js +7 -51
- package/dist/Glutinum.Converter/Reader/ExportAssignment.js +64 -15
- package/dist/Glutinum.Converter/Reader/ExportDeclaration.js +165 -0
- package/dist/Glutinum.Converter/Reader/FunctionDeclaration.js +30 -5
- package/dist/Glutinum.Converter/Reader/IndexedAccessType.js +122 -4
- package/dist/Glutinum.Converter/Reader/InterfaceDeclaration.js +83 -7
- package/dist/Glutinum.Converter/Reader/MappedTypeNode.js +8 -8
- package/dist/Glutinum.Converter/Reader/ModuleDeclaration.js +11 -8
- package/dist/Glutinum.Converter/Reader/NamedTupleMember.js +3 -2
- package/dist/Glutinum.Converter/Reader/Node.js +24 -10
- package/dist/Glutinum.Converter/Reader/Parameters.js +110 -7
- package/dist/Glutinum.Converter/Reader/Report.js +31 -12
- package/dist/Glutinum.Converter/Reader/TypeAliasDeclaration.js +4 -3
- package/dist/Glutinum.Converter/Reader/TypeNode.js +1527 -248
- package/dist/Glutinum.Converter/Reader/TypeOperatorNode.js +75 -20
- package/dist/Glutinum.Converter/Reader/TypeParameters.js +8 -5
- package/dist/Glutinum.Converter/Reader/TypeQueryNode.js +184 -50
- package/dist/Glutinum.Converter/Reader/TypeScriptReader.js +32 -13
- package/dist/Glutinum.Converter/Reader/Types.js +180 -0
- package/dist/Glutinum.Converter/Reader/UnionTypeNode.js +99 -43
- package/dist/Glutinum.Converter/Reader/Utils.js +1143 -55
- package/dist/Glutinum.Converter/Reader/VariableStatement.js +59 -14
- package/dist/Glutinum.Converter/Transform.js +8710 -1137
- package/dist/Glutinum.Converter/TypeScript.Extensions.js +3 -3
- package/dist/Glutinum.Converter/TypeScript.js +3 -3
- package/dist/Glutinum.Converter/Utils/Keywords.js +6 -6
- package/dist/Glutinum.Converter/Utils/List.js +3 -3
- package/dist/Glutinum.Converter/Utils/Naming.js +76 -14
- package/dist/Glutinum.Converter/Utils/String.js +7 -3
- package/dist/Program.js +230 -72
- package/package.json +4 -4
- package/src/Glutinum.Converter/js/bootstrap.js +109 -2
- package/src/Glutinum.Converter/js/host.js +144 -0
- package/src/Glutinum.Converter/js/npm.js +137 -0
- package/src/Glutinum.Converter/js/resolve.js +402 -0
- package/dist/Glutinum.Converter/FsharpAST.js.map +0 -1
- package/dist/Glutinum.Converter/Generate.js.map +0 -1
- package/dist/Glutinum.Converter/GlueAST.js.map +0 -1
- package/dist/Glutinum.Converter/Log.js.map +0 -1
- package/dist/Glutinum.Converter/Merge.js.map +0 -1
- package/dist/Glutinum.Converter/Printer.js.map +0 -1
- package/dist/Glutinum.Converter/Read.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/ClassDeclaration.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/Declaration.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/Documentation.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/EnumDeclaration.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/ExportAssignment.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/FunctionDeclaration.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/IndexedAccessType.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/InterfaceDeclaration.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/MappedTypeNode.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/ModuleDeclaration.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/NamedTupleMember.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/Node.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/Parameters.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/Report.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/TypeAliasDeclaration.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/TypeNode.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/TypeOperatorNode.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/TypeParameters.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/TypeQueryNode.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/TypeScriptReader.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/UnionTypeNode.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/Utils.js.map +0 -1
- package/dist/Glutinum.Converter/Reader/VariableStatement.js.map +0 -1
- package/dist/Glutinum.Converter/Transform.js.map +0 -1
- package/dist/Glutinum.Converter/TypeScript.Extensions.js.map +0 -1
- package/dist/Glutinum.Converter/TypeScript.js.map +0 -1
- package/dist/Glutinum.Converter/Utils/Keywords.js.map +0 -1
- package/dist/Glutinum.Converter/Utils/List.js.map +0 -1
- package/dist/Glutinum.Converter/Utils/Naming.js.map +0 -1
- package/dist/Glutinum.Converter/Utils/String.js.map +0 -1
- package/dist/Program.js.map +0 -1
- package/dist/fable_modules/Fable.Promise.3.2.0/AsyncIterable.fs +0 -57
- package/dist/fable_modules/Fable.Promise.3.2.0/AsyncIterable.fs.js +0 -105
- package/dist/fable_modules/Fable.Promise.3.2.0/AsyncIterable.fs.js.map +0 -1
- package/dist/fable_modules/Fable.Promise.3.2.0/Fable.Promise.fableproj +0 -20
- package/dist/fable_modules/Fable.Promise.3.2.0/Promise.fs +0 -766
- package/dist/fable_modules/Fable.Promise.3.2.0/Promise.fs.js +0 -218
- package/dist/fable_modules/Fable.Promise.3.2.0/Promise.fs.js.map +0 -1
- package/dist/fable_modules/Fable.Promise.3.2.0/PromiseImpl.fs +0 -31
- package/dist/fable_modules/Fable.Promise.3.2.0/PromiseImpl.fs.js +0 -20
- package/dist/fable_modules/Fable.Promise.3.2.0/PromiseImpl.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AssemblyInfo.fs +0 -19
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Async.fs +0 -207
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Async.fs.js +0 -127
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Async.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncOption.fs +0 -81
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncOptionCE.fs +0 -183
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncOptionCE.fs.js +0 -37
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncOptionCE.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncOptionOp.fs +0 -24
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResult.fs +0 -439
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultCE.fs +0 -217
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultCE.fs.js +0 -18
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultCE.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOp.fs +0 -24
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOption.fs +0 -75
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOption.fs.js +0 -26
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOption.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOptionCE.fs +0 -238
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOptionCE.fs.js +0 -18
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOptionCE.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOptionOp.fs +0 -24
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncValidation.fs +0 -190
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncValidationCE.fs +0 -194
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncValidationCE.fs.js +0 -18
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncValidationCE.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncValidationOp.fs +0 -35
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/FsToolkit.ErrorHandling.fableproj +0 -51
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/List.fs +0 -218
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/List.fs.js +0 -358
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/List.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Option.fs +0 -331
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/OptionCE.fs +0 -186
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/OptionCE.fs.js +0 -18
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/OptionCE.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/OptionOp.fs +0 -21
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Result.fs +0 -644
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Result.fs.js +0 -45
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Result.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultCE.fs +0 -155
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultCE.fs.js +0 -23
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultCE.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOp.fs +0 -45
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOption.fs +0 -201
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOption.fs.js +0 -65
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOption.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOptionCE.fs +0 -146
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOptionCE.fs.js +0 -18
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOptionCE.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOptionOp.fs +0 -57
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Seq.fs +0 -19
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Seq.fs.js +0 -31
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Seq.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Shims.fs +0 -22
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Shims.fs.js +0 -18
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Shims.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Validation.fs +0 -172
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ValidationCE.fs +0 -148
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ValidationCE.fs.js +0 -18
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ValidationCE.fs.js.map +0 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ValidationOp.fs +0 -35
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ValueOption.fs +0 -151
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ValueOptionCE.fs +0 -165
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/obj/Debug/netstandard2.1/.NETStandard,Version=v2.1.AssemblyAttributes.fs +0 -3
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/obj/Debug/netstandard2.1/FsToolkit.ErrorHandling.AssemblyInfo.fs +0 -20
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/obj/Release/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +0 -3
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/obj/Release/netstandard2.0/FsToolkit.ErrorHandling.AssemblyInfo.fs +0 -20
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/obj/Release/netstandard2.1/.NETStandard,Version=v2.1.AssemblyAttributes.fs +0 -3
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/obj/Release/netstandard2.1/FsToolkit.ErrorHandling.AssemblyInfo.fs +0 -20
- package/dist/fable_modules/fable-library-js.4.14.0/Array.d.ts +0 -123
- package/dist/fable_modules/fable-library-js.4.14.0/Array.js +0 -1242
- package/dist/fable_modules/fable-library-js.4.14.0/Async.d.ts +0 -32
- package/dist/fable_modules/fable-library-js.4.14.0/Async.js +0 -158
- package/dist/fable_modules/fable-library-js.4.14.0/AsyncBuilder.d.ts +0 -59
- package/dist/fable_modules/fable-library-js.4.14.0/AsyncBuilder.js +0 -183
- package/dist/fable_modules/fable-library-js.4.14.0/BigInt.d.ts +0 -115
- package/dist/fable_modules/fable-library-js.4.14.0/BigInt.js +0 -282
- package/dist/fable_modules/fable-library-js.4.14.0/BitConverter.d.ts +0 -27
- package/dist/fable_modules/fable-library-js.4.14.0/BitConverter.js +0 -138
- package/dist/fable_modules/fable-library-js.4.14.0/Boolean.d.ts +0 -3
- package/dist/fable_modules/fable-library-js.4.14.0/Boolean.js +0 -21
- package/dist/fable_modules/fable-library-js.4.14.0/CHANGELOG.md +0 -37
- package/dist/fable_modules/fable-library-js.4.14.0/Char.d.ts +0 -65
- package/dist/fable_modules/fable-library-js.4.14.0/Char.js +0 -169
- package/dist/fable_modules/fable-library-js.4.14.0/Choice.d.ts +0 -121
- package/dist/fable_modules/fable-library-js.4.14.0/Choice.js +0 -184
- package/dist/fable_modules/fable-library-js.4.14.0/Date.d.ts +0 -70
- package/dist/fable_modules/fable-library-js.4.14.0/Date.js +0 -749
- package/dist/fable_modules/fable-library-js.4.14.0/DateOffset.d.ts +0 -63
- package/dist/fable_modules/fable-library-js.4.14.0/DateOffset.js +0 -268
- package/dist/fable_modules/fable-library-js.4.14.0/DateOnly.d.ts +0 -18
- package/dist/fable_modules/fable-library-js.4.14.0/DateOnly.js +0 -124
- package/dist/fable_modules/fable-library-js.4.14.0/Decimal.d.ts +0 -45
- package/dist/fable_modules/fable-library-js.4.14.0/Decimal.js +0 -212
- package/dist/fable_modules/fable-library-js.4.14.0/Double.d.ts +0 -11
- package/dist/fable_modules/fable-library-js.4.14.0/Double.js +0 -46
- package/dist/fable_modules/fable-library-js.4.14.0/Encoding.d.ts +0 -12
- package/dist/fable_modules/fable-library-js.4.14.0/Encoding.js +0 -173
- package/dist/fable_modules/fable-library-js.4.14.0/Event.d.ts +0 -31
- package/dist/fable_modules/fable-library-js.4.14.0/Event.js +0 -93
- package/dist/fable_modules/fable-library-js.4.14.0/FSharp.Collections.d.ts +0 -7
- package/dist/fable_modules/fable-library-js.4.14.0/FSharp.Collections.js +0 -27
- package/dist/fable_modules/fable-library-js.4.14.0/FSharp.Core.CompilerServices.d.ts +0 -12
- package/dist/fable_modules/fable-library-js.4.14.0/FSharp.Core.CompilerServices.js +0 -27
- package/dist/fable_modules/fable-library-js.4.14.0/FSharp.Core.d.ts +0 -17
- package/dist/fable_modules/fable-library-js.4.14.0/FSharp.Core.js +0 -69
- package/dist/fable_modules/fable-library-js.4.14.0/Global.d.ts +0 -24
- package/dist/fable_modules/fable-library-js.4.14.0/Global.js +0 -8
- package/dist/fable_modules/fable-library-js.4.14.0/Guid.d.ts +0 -10
- package/dist/fable_modules/fable-library-js.4.14.0/Guid.js +0 -142
- package/dist/fable_modules/fable-library-js.4.14.0/Int32.d.ts +0 -28
- package/dist/fable_modules/fable-library-js.4.14.0/Int32.js +0 -135
- package/dist/fable_modules/fable-library-js.4.14.0/List.d.ts +0 -143
- package/dist/fable_modules/fable-library-js.4.14.0/List.js +0 -1273
- package/dist/fable_modules/fable-library-js.4.14.0/Long.d.ts +0 -3
- package/dist/fable_modules/fable-library-js.4.14.0/Long.js +0 -46
- package/dist/fable_modules/fable-library-js.4.14.0/MailboxProcessor.d.ts +0 -25
- package/dist/fable_modules/fable-library-js.4.14.0/MailboxProcessor.js +0 -93
- package/dist/fable_modules/fable-library-js.4.14.0/Map.d.ts +0 -178
- package/dist/fable_modules/fable-library-js.4.14.0/Map.js +0 -1396
- package/dist/fable_modules/fable-library-js.4.14.0/MapUtil.d.ts +0 -10
- package/dist/fable_modules/fable-library-js.4.14.0/MapUtil.js +0 -112
- package/dist/fable_modules/fable-library-js.4.14.0/MutableMap.d.ts +0 -52
- package/dist/fable_modules/fable-library-js.4.14.0/MutableMap.js +0 -327
- package/dist/fable_modules/fable-library-js.4.14.0/MutableSet.d.ts +0 -39
- package/dist/fable_modules/fable-library-js.4.14.0/MutableSet.js +0 -233
- package/dist/fable_modules/fable-library-js.4.14.0/Native.d.ts +0 -2
- package/dist/fable_modules/fable-library-js.4.14.0/Native.js +0 -8
- package/dist/fable_modules/fable-library-js.4.14.0/Numeric.d.ts +0 -19
- package/dist/fable_modules/fable-library-js.4.14.0/Numeric.js +0 -71
- package/dist/fable_modules/fable-library-js.4.14.0/Observable.d.ts +0 -32
- package/dist/fable_modules/fable-library-js.4.14.0/Observable.js +0 -113
- package/dist/fable_modules/fable-library-js.4.14.0/Option.d.ts +0 -28
- package/dist/fable_modules/fable-library-js.4.14.0/Option.js +0 -96
- package/dist/fable_modules/fable-library-js.4.14.0/README.md +0 -3
- package/dist/fable_modules/fable-library-js.4.14.0/Random.d.ts +0 -37
- package/dist/fable_modules/fable-library-js.4.14.0/Random.js +0 -170
- package/dist/fable_modules/fable-library-js.4.14.0/Range.d.ts +0 -12
- package/dist/fable_modules/fable-library-js.4.14.0/Range.js +0 -45
- package/dist/fable_modules/fable-library-js.4.14.0/Reflection.d.ts +0 -119
- package/dist/fable_modules/fable-library-js.4.14.0/Reflection.js +0 -461
- package/dist/fable_modules/fable-library-js.4.14.0/RegExp.d.ts +0 -10
- package/dist/fable_modules/fable-library-js.4.14.0/RegExp.js +0 -132
- package/dist/fable_modules/fable-library-js.4.14.0/Result.d.ts +0 -37
- package/dist/fable_modules/fable-library-js.4.14.0/Result.js +0 -165
- package/dist/fable_modules/fable-library-js.4.14.0/Seq.d.ts +0 -165
- package/dist/fable_modules/fable-library-js.4.14.0/Seq.js +0 -1379
- package/dist/fable_modules/fable-library-js.4.14.0/Seq2.d.ts +0 -18
- package/dist/fable_modules/fable-library-js.4.14.0/Seq2.js +0 -111
- package/dist/fable_modules/fable-library-js.4.14.0/Set.d.ts +0 -190
- package/dist/fable_modules/fable-library-js.4.14.0/Set.js +0 -1789
- package/dist/fable_modules/fable-library-js.4.14.0/String.d.ts +0 -50
- package/dist/fable_modules/fable-library-js.4.14.0/String.js +0 -543
- package/dist/fable_modules/fable-library-js.4.14.0/System.Collections.Generic.d.ts +0 -79
- package/dist/fable_modules/fable-library-js.4.14.0/System.Collections.Generic.js +0 -317
- package/dist/fable_modules/fable-library-js.4.14.0/System.Text.d.ts +0 -38
- package/dist/fable_modules/fable-library-js.4.14.0/System.Text.js +0 -162
- package/dist/fable_modules/fable-library-js.4.14.0/SystemException.d.ts +0 -5
- package/dist/fable_modules/fable-library-js.4.14.0/SystemException.js +0 -5
- package/dist/fable_modules/fable-library-js.4.14.0/TimeOnly.d.ts +0 -15
- package/dist/fable_modules/fable-library-js.4.14.0/TimeOnly.js +0 -122
- package/dist/fable_modules/fable-library-js.4.14.0/TimeSpan.d.ts +0 -34
- package/dist/fable_modules/fable-library-js.4.14.0/TimeSpan.js +0 -177
- package/dist/fable_modules/fable-library-js.4.14.0/Timer.d.ts +0 -19
- package/dist/fable_modules/fable-library-js.4.14.0/Timer.js +0 -67
- package/dist/fable_modules/fable-library-js.4.14.0/Types.d.ts +0 -58
- package/dist/fable_modules/fable-library-js.4.14.0/Types.js +0 -208
- package/dist/fable_modules/fable-library-js.4.14.0/Unicode.13.0.0.d.ts +0 -2
- package/dist/fable_modules/fable-library-js.4.14.0/Unicode.13.0.0.js +0 -4
- package/dist/fable_modules/fable-library-js.4.14.0/Uri.d.ts +0 -29
- package/dist/fable_modules/fable-library-js.4.14.0/Uri.js +0 -142
- package/dist/fable_modules/fable-library-js.4.14.0/Util.d.ts +0 -207
- package/dist/fable_modules/fable-library-js.4.14.0/Util.js +0 -770
- package/dist/fable_modules/fable-library-js.4.14.0/big.d.ts +0 -338
- package/dist/fable_modules/fable-library-js.4.14.0/lib/big.d.ts +0 -5
- package/dist/fable_modules/fable-library-js.4.14.0/lib/big.js +0 -826
- package/dist/fable_modules/fable-library-js.4.14.0/package.json +0 -24
- package/dist/fable_modules/project_cracked.json +0 -1
|
@@ -1,44 +1,650 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import { ofSeq, append } from "../fable_modules/fable-library-js.
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
|
|
2
|
+
import { Exception, safeHash, equals, compareArrays, arrayHash, equalArrays, defaultOf, comparePrimitives, int32ToString, disposeSafe, getEnumerator } from "../fable_modules/fable-library-js.5.17.2/Util.js";
|
|
3
|
+
import { ofSeq as ofSeq_1, maxBy, ofArray, empty, collect, indexed, sortBy, head, filter, forAll, exists, zip, length, map, choose, singleton, append, isEmpty as isEmpty_1 } from "../fable_modules/fable-library-js.5.17.2/List.js";
|
|
4
|
+
import { concat, join } from "../fable_modules/fable-library-js.5.17.2/String.js";
|
|
5
|
+
import { FSharpClass, FSharpModule, FSharpInterface, FSharpStaticMemberInfo, FSharpMember, FSharpMemberInfo, FSharpUnion, FSharpUnionCase, FSharpFunctionType, FSharpParameter, FSharpJSApi, FSharpTypeReference, FSharpType } from "./FsharpAST.js";
|
|
6
|
+
import { ofList, tryFind } from "../fable_modules/fable-library-js.5.17.2/Map.js";
|
|
7
|
+
import { addToDict, addToSet, tryGetValue, getItemFromDict } from "../fable_modules/fable-library-js.5.17.2/MapUtil.js";
|
|
8
|
+
import { value } from "../fable_modules/fable-library-js.5.17.2/Option.js";
|
|
9
|
+
import { FSharpRef } from "../fable_modules/fable-library-js.5.17.2/Types.js";
|
|
10
|
+
import { FSharpSet__Contains, FSharpSet__get_IsEmpty, ofSeq } from "../fable_modules/fable-library-js.5.17.2/Set.js";
|
|
11
|
+
import { List_distinctBy, List_distinct, List_groupBy } from "../fable_modules/fable-library-js.5.17.2/Seq2.js";
|
|
12
|
+
import { FSharpChoice$3 } from "../fable_modules/fable-library-js.5.17.2/Choice.js";
|
|
13
|
+
import { contains, setItem, item } from "../fable_modules/fable-library-js.5.17.2/Array.js";
|
|
14
|
+
|
|
15
|
+
const aliasTargets = new Map([]);
|
|
16
|
+
|
|
17
|
+
const genericAliasTargets = new Map([]);
|
|
18
|
+
|
|
19
|
+
function collectAliases(path, types) {
|
|
20
|
+
const enumerator = getEnumerator(types);
|
|
21
|
+
try {
|
|
22
|
+
while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
|
|
23
|
+
const typ = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
|
|
24
|
+
switch (typ.tag) {
|
|
25
|
+
case 9: {
|
|
26
|
+
if (isEmpty_1(typ.fields[0].TypeParameters)) {
|
|
27
|
+
aliasTargets.set(join(".", append(path, singleton(typ.fields[0].Name))), typ.fields[0].Type);
|
|
28
|
+
if (!aliasTargets.has(typ.fields[0].Name)) {
|
|
29
|
+
aliasTargets.set(typ.fields[0].Name, typ.fields[0].Type);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
const names = choose((_arg) => {
|
|
34
|
+
if (_arg.tag === 0) {
|
|
35
|
+
return undefined;
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
return _arg.fields[0].Name;
|
|
39
|
+
}
|
|
40
|
+
}, typ.fields[0].TypeParameters);
|
|
41
|
+
let target_3;
|
|
42
|
+
if (typ.fields[0].Type.tag === 7) {
|
|
43
|
+
const mappedInfo = typ.fields[0].Type.fields[0];
|
|
44
|
+
target_3 = (new FSharpType(/* TypeReference */ 11, [new FSharpTypeReference(mappedInfo.Name, "", path, map((_arg_1) => {
|
|
45
|
+
if (_arg_1.tag === 1) {
|
|
46
|
+
return new FSharpType(/* TypeParameter */ 13, [_arg_1.fields[0].Name]);
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
return _arg_1.fields[0];
|
|
50
|
+
}
|
|
51
|
+
}, mappedInfo.TypeParameters), FSharpType.Discard)]));
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
target_3 = typ.fields[0].Type;
|
|
55
|
+
}
|
|
56
|
+
const arity = int32ToString(length(names));
|
|
57
|
+
genericAliasTargets.set((join(".", append(path, singleton(typ.fields[0].Name))) + "`") + arity, [names, target_3]);
|
|
58
|
+
if (!genericAliasTargets.has((typ.fields[0].Name + "`") + arity)) {
|
|
59
|
+
genericAliasTargets.set((typ.fields[0].Name + "`") + arity, [names, target_3]);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
break;
|
|
63
|
+
}
|
|
64
|
+
case 4: {
|
|
65
|
+
collectAliases(append(path, singleton(typ.fields[0].Name)), typ.fields[0].Types);
|
|
66
|
+
break;
|
|
67
|
+
}
|
|
68
|
+
default:
|
|
69
|
+
undefined;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
finally {
|
|
74
|
+
disposeSafe(enumerator);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
function substitute(substitutions, typ) {
|
|
79
|
+
const substitute_1 = (typ_1) => substitute(substitutions, typ_1);
|
|
80
|
+
switch (typ.tag) {
|
|
81
|
+
case 13: {
|
|
82
|
+
const matchValue = tryFind(typ.fields[0], substitutions);
|
|
83
|
+
if (matchValue == null) {
|
|
84
|
+
return typ;
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
return matchValue;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
case 11: {
|
|
91
|
+
const typeReference = typ.fields[0];
|
|
92
|
+
return new FSharpType(/* TypeReference */ 11, [new FSharpTypeReference(typeReference.Name, typeReference.FullName, typeReference.ModulePath, map(substitute_1, typeReference.TypeArguments), typeReference.Type)]);
|
|
93
|
+
}
|
|
94
|
+
case 3:
|
|
95
|
+
return new FSharpType(/* Option */ 3, [substitute_1(typ.fields[0])]);
|
|
96
|
+
case 14:
|
|
97
|
+
return new FSharpType(/* ResizeArray */ 14, [substitute_1(typ.fields[0])]);
|
|
98
|
+
case 19:
|
|
99
|
+
return new FSharpType(/* JSApi */ 19, [new FSharpJSApi(substitute_1(typ.fields[0].fields[0]))]);
|
|
100
|
+
case 12:
|
|
101
|
+
return new FSharpType(/* Tuple */ 12, [map(substitute_1, typ.fields[0])]);
|
|
102
|
+
case 16: {
|
|
103
|
+
const functionType = typ.fields[0];
|
|
104
|
+
return new FSharpType(/* Function */ 16, [new FSharpFunctionType(map((parameter) => (new FSharpParameter(parameter.Attributes, parameter.Name, parameter.IsOptional, substitute_1(parameter.Type), parameter.OriginalGlueMember)), functionType.Parameters), substitute_1(functionType.ReturnType))]);
|
|
105
|
+
}
|
|
106
|
+
case 1: {
|
|
107
|
+
const unionInfo = typ.fields[0];
|
|
108
|
+
return new FSharpType(/* Union */ 1, [new FSharpUnion(unionInfo.Attributes, unionInfo.Name, map((_arg) => {
|
|
109
|
+
switch (_arg.tag) {
|
|
110
|
+
case 1:
|
|
111
|
+
return new FSharpUnionCase(/* Typed */ 1, [substitute_1(_arg.fields[0])]);
|
|
112
|
+
case 2:
|
|
113
|
+
return new FSharpUnionCase(/* Field */ 2, [_arg.fields[0], substitute_1(_arg.fields[1])]);
|
|
114
|
+
default:
|
|
115
|
+
return _arg;
|
|
116
|
+
}
|
|
117
|
+
}, unionInfo.Cases), unionInfo.IsOptional, unionInfo.TypeParameters, unionInfo.Constants)]);
|
|
118
|
+
}
|
|
119
|
+
default:
|
|
120
|
+
return typ;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
function tryGenericAliasTarget(typeReference) {
|
|
125
|
+
let tupledArg;
|
|
126
|
+
const arity = "`" + int32ToString(length(typeReference.TypeArguments));
|
|
127
|
+
const key = join(".", append(typeReference.ModulePath, singleton(typeReference.Name))) + arity;
|
|
128
|
+
const option_1 = genericAliasTargets.has(key) ? getItemFromDict(genericAliasTargets, key) : ((isEmpty_1(typeReference.ModulePath) && genericAliasTargets.has(typeReference.Name + arity)) ? getItemFromDict(genericAliasTargets, typeReference.Name + arity) : undefined);
|
|
129
|
+
if (option_1 != null) {
|
|
130
|
+
return (tupledArg = option_1, substitute(ofList(zip(tupledArg[0], typeReference.TypeArguments), {
|
|
131
|
+
Compare: (x, y) => (comparePrimitives(x, y) | 0),
|
|
132
|
+
}), tupledArg[1]));
|
|
133
|
+
}
|
|
134
|
+
else {
|
|
135
|
+
return undefined;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
function signatureTypeAt(depth, typ) {
|
|
140
|
+
let typeReference, typeReference_1;
|
|
141
|
+
let signatureType_1;
|
|
142
|
+
const depth_1 = (depth + 1) | 0;
|
|
143
|
+
signatureType_1 = ((typ_1) => signatureTypeAt(depth_1, typ_1));
|
|
144
|
+
let matchResult, typeReference_2, typeReference_3, typeReference_4, typ_2, typ_3, typ_4, types, functionType, typ_5;
|
|
145
|
+
switch (typ.tag) {
|
|
146
|
+
case 11: {
|
|
147
|
+
if ((typeReference = typ.fields[0], ((depth < 8) && isEmpty_1(typeReference.TypeArguments)) && (aliasTargets.has(join(".", append(typeReference.ModulePath, singleton(typeReference.Name)))) ? true : (isEmpty_1(typeReference.ModulePath) && aliasTargets.has(typeReference.Name))))) {
|
|
148
|
+
matchResult = 0;
|
|
149
|
+
typeReference_2 = typ.fields[0];
|
|
150
|
+
}
|
|
151
|
+
else if ((typeReference_1 = typ.fields[0], ((depth < 8) && !isEmpty_1(typeReference_1.TypeArguments)) && (tryGenericAliasTarget(typeReference_1) != null))) {
|
|
152
|
+
matchResult = 1;
|
|
153
|
+
typeReference_3 = typ.fields[0];
|
|
154
|
+
}
|
|
155
|
+
else {
|
|
156
|
+
matchResult = 2;
|
|
157
|
+
typeReference_4 = typ.fields[0];
|
|
158
|
+
}
|
|
159
|
+
break;
|
|
160
|
+
}
|
|
161
|
+
case 3: {
|
|
162
|
+
matchResult = 3;
|
|
163
|
+
typ_2 = typ.fields[0];
|
|
164
|
+
break;
|
|
165
|
+
}
|
|
166
|
+
case 14: {
|
|
167
|
+
matchResult = 4;
|
|
168
|
+
typ_3 = typ.fields[0];
|
|
169
|
+
break;
|
|
170
|
+
}
|
|
171
|
+
case 19: {
|
|
172
|
+
matchResult = 5;
|
|
173
|
+
typ_4 = typ.fields[0].fields[0];
|
|
174
|
+
break;
|
|
175
|
+
}
|
|
176
|
+
case 12: {
|
|
177
|
+
matchResult = 6;
|
|
178
|
+
types = typ.fields[0];
|
|
179
|
+
break;
|
|
180
|
+
}
|
|
181
|
+
case 16: {
|
|
182
|
+
matchResult = 7;
|
|
183
|
+
functionType = typ.fields[0];
|
|
184
|
+
break;
|
|
185
|
+
}
|
|
186
|
+
case 8: {
|
|
187
|
+
if (typ.fields[0].tag === 6) {
|
|
188
|
+
matchResult = 8;
|
|
189
|
+
}
|
|
190
|
+
else {
|
|
191
|
+
matchResult = 9;
|
|
192
|
+
typ_5 = typ;
|
|
193
|
+
}
|
|
194
|
+
break;
|
|
195
|
+
}
|
|
196
|
+
default: {
|
|
197
|
+
matchResult = 9;
|
|
198
|
+
typ_5 = typ;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
switch (matchResult) {
|
|
202
|
+
case 0: {
|
|
203
|
+
const fullPath = join(".", append(typeReference_2.ModulePath, singleton(typeReference_2.Name)));
|
|
204
|
+
return signatureType_1(aliasTargets.has(fullPath) ? getItemFromDict(aliasTargets, fullPath) : getItemFromDict(aliasTargets, typeReference_2.Name));
|
|
205
|
+
}
|
|
206
|
+
case 1:
|
|
207
|
+
return signatureType_1(value(tryGenericAliasTarget(typeReference_3)));
|
|
208
|
+
case 2:
|
|
209
|
+
return new FSharpType(/* TypeReference */ 11, [new FSharpTypeReference((typeReference_4.Name === "JS.Uint8ClampedArray") ? "JS.Uint8Array" : typeReference_4.Name, "", typeReference_4.ModulePath, map(signatureType_1, typeReference_4.TypeArguments), FSharpType.Discard)]);
|
|
210
|
+
case 3:
|
|
211
|
+
return new FSharpType(/* Option */ 3, [signatureType_1(typ_2)]);
|
|
212
|
+
case 4:
|
|
213
|
+
return new FSharpType(/* ResizeArray */ 14, [signatureType_1(typ_3)]);
|
|
214
|
+
case 5:
|
|
215
|
+
return new FSharpType(/* JSApi */ 19, [new FSharpJSApi(signatureType_1(typ_4))]);
|
|
216
|
+
case 6:
|
|
217
|
+
return new FSharpType(/* Tuple */ 12, [map(signatureType_1, types)]);
|
|
218
|
+
case 7:
|
|
219
|
+
return new FSharpType(/* Function */ 16, [new FSharpFunctionType(map((parameter) => (new FSharpParameter(parameter.Attributes, parameter.Name, parameter.IsOptional, signatureType_1(parameter.Type), undefined)), functionType.Parameters), signatureType_1(functionType.ReturnType))]);
|
|
220
|
+
case 8:
|
|
221
|
+
return FSharpType.Object$;
|
|
222
|
+
default:
|
|
223
|
+
return typ_5;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
export function signatureType(typ) {
|
|
228
|
+
return signatureTypeAt(0, typ);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
function canonicalTypeParameters(names, typ) {
|
|
232
|
+
const canonical = (typ_1) => canonicalTypeParameters(names, typ_1);
|
|
233
|
+
switch (typ.tag) {
|
|
234
|
+
case 13: {
|
|
235
|
+
const name = typ.fields[0];
|
|
236
|
+
let matchValue;
|
|
237
|
+
let outArg = defaultOf();
|
|
238
|
+
matchValue = [tryGetValue(names, name, new FSharpRef(() => outArg, (v) => {
|
|
239
|
+
outArg = v;
|
|
240
|
+
})), outArg];
|
|
241
|
+
if (matchValue[0]) {
|
|
242
|
+
return new FSharpType(/* TypeParameter */ 13, [matchValue[1]]);
|
|
243
|
+
}
|
|
244
|
+
else {
|
|
245
|
+
const canonicalName_1 = `T${names.size}`;
|
|
246
|
+
names.set(name, canonicalName_1);
|
|
247
|
+
return new FSharpType(/* TypeParameter */ 13, [canonicalName_1]);
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
case 11: {
|
|
251
|
+
const typeReference = typ.fields[0];
|
|
252
|
+
return new FSharpType(/* TypeReference */ 11, [new FSharpTypeReference(typeReference.Name, typeReference.FullName, typeReference.ModulePath, map(canonical, typeReference.TypeArguments), typeReference.Type)]);
|
|
253
|
+
}
|
|
254
|
+
case 3:
|
|
255
|
+
return new FSharpType(/* Option */ 3, [canonical(typ.fields[0])]);
|
|
256
|
+
case 14:
|
|
257
|
+
return new FSharpType(/* ResizeArray */ 14, [canonical(typ.fields[0])]);
|
|
258
|
+
case 19:
|
|
259
|
+
return new FSharpType(/* JSApi */ 19, [new FSharpJSApi(canonical(typ.fields[0].fields[0]))]);
|
|
260
|
+
case 1: {
|
|
261
|
+
const unionInfo = typ.fields[0];
|
|
262
|
+
return new FSharpType(/* Union */ 1, [new FSharpUnion(unionInfo.Attributes, unionInfo.Name, map((_arg) => {
|
|
263
|
+
switch (_arg.tag) {
|
|
264
|
+
case 1:
|
|
265
|
+
return new FSharpUnionCase(/* Typed */ 1, [canonical(_arg.fields[0])]);
|
|
266
|
+
case 2:
|
|
267
|
+
return new FSharpUnionCase(/* Field */ 2, [_arg.fields[0], canonical(_arg.fields[1])]);
|
|
268
|
+
default:
|
|
269
|
+
return _arg;
|
|
270
|
+
}
|
|
271
|
+
}, unionInfo.Cases), unionInfo.IsOptional, unionInfo.TypeParameters, unionInfo.Constants)]);
|
|
272
|
+
}
|
|
273
|
+
case 12:
|
|
274
|
+
return new FSharpType(/* Tuple */ 12, [map(canonical, typ.fields[0])]);
|
|
275
|
+
case 16: {
|
|
276
|
+
const functionType = typ.fields[0];
|
|
277
|
+
return new FSharpType(/* Function */ 16, [new FSharpFunctionType(map((parameter) => (new FSharpParameter(parameter.Attributes, parameter.Name, parameter.IsOptional, canonical(parameter.Type), parameter.OriginalGlueMember)), functionType.Parameters), canonical(functionType.ReturnType))]);
|
|
278
|
+
}
|
|
279
|
+
default:
|
|
280
|
+
return typ;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
export function parametersSignature(parameters) {
|
|
285
|
+
const names = new Map([]);
|
|
286
|
+
return map((parameter) => [canonicalTypeParameters(names, signatureType(parameter.Type)), parameter.IsOptional], parameters);
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
function arityOfSignature(typeParameters, signature) {
|
|
290
|
+
const mentionsTypeParameter = (typ_mut) => {
|
|
291
|
+
mentionsTypeParameter:
|
|
292
|
+
while (true) {
|
|
293
|
+
const typ = typ_mut;
|
|
294
|
+
let matchResult, typ_1;
|
|
295
|
+
switch (typ.tag) {
|
|
296
|
+
case 13: {
|
|
297
|
+
matchResult = 0;
|
|
298
|
+
break;
|
|
299
|
+
}
|
|
300
|
+
case 11: {
|
|
301
|
+
matchResult = 1;
|
|
302
|
+
break;
|
|
303
|
+
}
|
|
304
|
+
case 3: {
|
|
305
|
+
matchResult = 2;
|
|
306
|
+
typ_1 = typ.fields[0];
|
|
307
|
+
break;
|
|
308
|
+
}
|
|
309
|
+
case 14: {
|
|
310
|
+
matchResult = 2;
|
|
311
|
+
typ_1 = typ.fields[0];
|
|
312
|
+
break;
|
|
313
|
+
}
|
|
314
|
+
case 19: {
|
|
315
|
+
matchResult = 2;
|
|
316
|
+
typ_1 = typ.fields[0].fields[0];
|
|
317
|
+
break;
|
|
318
|
+
}
|
|
319
|
+
case 1: {
|
|
320
|
+
matchResult = 3;
|
|
321
|
+
break;
|
|
322
|
+
}
|
|
323
|
+
case 12: {
|
|
324
|
+
matchResult = 4;
|
|
325
|
+
break;
|
|
326
|
+
}
|
|
327
|
+
case 16: {
|
|
328
|
+
matchResult = 5;
|
|
329
|
+
break;
|
|
330
|
+
}
|
|
331
|
+
default:
|
|
332
|
+
matchResult = 6;
|
|
333
|
+
}
|
|
334
|
+
switch (matchResult) {
|
|
335
|
+
case 0:
|
|
336
|
+
return true;
|
|
337
|
+
case 1:
|
|
338
|
+
return exists(mentionsTypeParameter, typ.fields[0].TypeArguments);
|
|
339
|
+
case 2: {
|
|
340
|
+
typ_mut = typ_1;
|
|
341
|
+
continue mentionsTypeParameter;
|
|
342
|
+
}
|
|
343
|
+
case 3:
|
|
344
|
+
return exists((_arg) => {
|
|
345
|
+
let matchResult_1, typ_2;
|
|
346
|
+
switch (_arg.tag) {
|
|
347
|
+
case 1: {
|
|
348
|
+
matchResult_1 = 0;
|
|
349
|
+
typ_2 = _arg.fields[0];
|
|
350
|
+
break;
|
|
351
|
+
}
|
|
352
|
+
case 2: {
|
|
353
|
+
matchResult_1 = 0;
|
|
354
|
+
typ_2 = _arg.fields[1];
|
|
355
|
+
break;
|
|
356
|
+
}
|
|
357
|
+
default:
|
|
358
|
+
matchResult_1 = 1;
|
|
359
|
+
}
|
|
360
|
+
switch (matchResult_1) {
|
|
361
|
+
case 0:
|
|
362
|
+
return mentionsTypeParameter(typ_2);
|
|
363
|
+
default:
|
|
364
|
+
return false;
|
|
365
|
+
}
|
|
366
|
+
}, typ.fields[0].Cases);
|
|
367
|
+
case 4:
|
|
368
|
+
return exists(mentionsTypeParameter, typ.fields[0]);
|
|
369
|
+
case 5: {
|
|
370
|
+
const functionType = typ.fields[0];
|
|
371
|
+
if (mentionsTypeParameter(functionType.ReturnType)) {
|
|
372
|
+
return true;
|
|
373
|
+
}
|
|
374
|
+
else {
|
|
375
|
+
return exists((parameter) => mentionsTypeParameter(parameter.Type), functionType.Parameters);
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
default:
|
|
379
|
+
return false;
|
|
380
|
+
}
|
|
381
|
+
break;
|
|
382
|
+
}
|
|
383
|
+
};
|
|
384
|
+
if (exists((tupledArg) => mentionsTypeParameter(tupledArg[0]), signature)) {
|
|
385
|
+
return -1;
|
|
386
|
+
}
|
|
387
|
+
else {
|
|
388
|
+
return length(typeParameters) | 0;
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
function withParameterlessOverloads(members) {
|
|
393
|
+
const isAllOptional = (parameters) => {
|
|
394
|
+
if (!isEmpty_1(parameters)) {
|
|
395
|
+
return forAll((_arg) => _arg.IsOptional, parameters);
|
|
396
|
+
}
|
|
397
|
+
else {
|
|
398
|
+
return false;
|
|
399
|
+
}
|
|
400
|
+
};
|
|
401
|
+
const ambiguous = ofSeq(map((tuple) => tuple[0], filter((tupledArg_1) => {
|
|
402
|
+
const group = tupledArg_1[1];
|
|
403
|
+
if (length(filter((tupledArg_2) => tupledArg_2[2], group)) >= 2) {
|
|
404
|
+
return !exists((tupledArg_3) => tupledArg_3[3], group);
|
|
405
|
+
}
|
|
406
|
+
else {
|
|
407
|
+
return false;
|
|
408
|
+
}
|
|
409
|
+
}, List_groupBy((tupledArg) => [tupledArg[0], tupledArg[1]], choose((fsharpMember) => {
|
|
410
|
+
switch (fsharpMember.tag) {
|
|
411
|
+
case 2: {
|
|
412
|
+
const info_1 = fsharpMember.fields[0];
|
|
413
|
+
return [info_1.Name, true, isAllOptional(info_1.Parameters), isEmpty_1(info_1.Parameters)];
|
|
414
|
+
}
|
|
415
|
+
case 1:
|
|
416
|
+
return undefined;
|
|
417
|
+
default: {
|
|
418
|
+
const info = fsharpMember.fields[0];
|
|
419
|
+
return [info.Name, info.IsStatic, isAllOptional(info.Parameters), isEmpty_1(info.Parameters)];
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
}, members), {
|
|
423
|
+
Equals: equalArrays,
|
|
424
|
+
GetHashCode: (x) => (arrayHash(x) | 0),
|
|
425
|
+
}))), {
|
|
426
|
+
Compare: (x_1, y_1) => (compareArrays(x_1, y_1) | 0),
|
|
427
|
+
});
|
|
428
|
+
if (FSharpSet__get_IsEmpty(ambiguous)) {
|
|
429
|
+
return members;
|
|
430
|
+
}
|
|
431
|
+
else {
|
|
432
|
+
const preferred = ofSeq(map((tupledArg_5) => (head(sortBy((tupledArg_6) => [!tupledArg_6[0], tupledArg_6[1]], map((tuple_2) => tuple_2[1], tupledArg_5[1]), {
|
|
433
|
+
Compare: (x_3, y_3) => (compareArrays(x_3, y_3) | 0),
|
|
434
|
+
}))[1] | 0), List_groupBy((tuple_1) => tuple_1[0], choose((tupledArg_4) => {
|
|
435
|
+
let info_2, info_3;
|
|
436
|
+
const index = tupledArg_4[0] | 0;
|
|
437
|
+
const fsharpMember_1 = tupledArg_4[1];
|
|
438
|
+
let matchResult, info_4, info_5;
|
|
439
|
+
switch (fsharpMember_1.tag) {
|
|
440
|
+
case 0: {
|
|
441
|
+
if ((info_2 = fsharpMember_1.fields[0], FSharpSet__Contains(ambiguous, [info_2.Name, info_2.IsStatic]) && isAllOptional(info_2.Parameters))) {
|
|
442
|
+
matchResult = 0;
|
|
443
|
+
info_4 = fsharpMember_1.fields[0];
|
|
444
|
+
}
|
|
445
|
+
else {
|
|
446
|
+
matchResult = 2;
|
|
447
|
+
}
|
|
448
|
+
break;
|
|
449
|
+
}
|
|
450
|
+
case 2: {
|
|
451
|
+
if ((info_3 = fsharpMember_1.fields[0], FSharpSet__Contains(ambiguous, [info_3.Name, true]) && isAllOptional(info_3.Parameters))) {
|
|
452
|
+
matchResult = 1;
|
|
453
|
+
info_5 = fsharpMember_1.fields[0];
|
|
454
|
+
}
|
|
455
|
+
else {
|
|
456
|
+
matchResult = 2;
|
|
457
|
+
}
|
|
458
|
+
break;
|
|
459
|
+
}
|
|
460
|
+
default:
|
|
461
|
+
matchResult = 2;
|
|
462
|
+
}
|
|
463
|
+
switch (matchResult) {
|
|
464
|
+
case 0:
|
|
465
|
+
return [[info_4.Name, info_4.IsStatic], [isEmpty_1(info_4.TypeParameters), index]];
|
|
466
|
+
case 1:
|
|
467
|
+
return [[info_5.Name, true], [isEmpty_1(info_5.TypeParameters), index]];
|
|
468
|
+
default:
|
|
469
|
+
return undefined;
|
|
470
|
+
}
|
|
471
|
+
}, indexed(members)), {
|
|
472
|
+
Equals: equalArrays,
|
|
473
|
+
GetHashCode: (x_2) => (arrayHash(x_2) | 0),
|
|
474
|
+
})), {
|
|
475
|
+
Compare: (x_4, y_4) => (comparePrimitives(x_4, y_4) | 0),
|
|
476
|
+
});
|
|
477
|
+
return collect((tupledArg_7) => {
|
|
478
|
+
const index_2 = tupledArg_7[0] | 0;
|
|
479
|
+
const fsharpMember_2 = tupledArg_7[1];
|
|
480
|
+
let matchResult_1, info_8, info_9;
|
|
481
|
+
switch (fsharpMember_2.tag) {
|
|
482
|
+
case 0: {
|
|
483
|
+
if (FSharpSet__Contains(preferred, index_2)) {
|
|
484
|
+
matchResult_1 = 0;
|
|
485
|
+
info_8 = fsharpMember_2.fields[0];
|
|
486
|
+
}
|
|
487
|
+
else {
|
|
488
|
+
matchResult_1 = 2;
|
|
489
|
+
}
|
|
490
|
+
break;
|
|
491
|
+
}
|
|
492
|
+
case 2: {
|
|
493
|
+
if (FSharpSet__Contains(preferred, index_2)) {
|
|
494
|
+
matchResult_1 = 1;
|
|
495
|
+
info_9 = fsharpMember_2.fields[0];
|
|
496
|
+
}
|
|
497
|
+
else {
|
|
498
|
+
matchResult_1 = 2;
|
|
499
|
+
}
|
|
500
|
+
break;
|
|
501
|
+
}
|
|
502
|
+
default:
|
|
503
|
+
matchResult_1 = 2;
|
|
504
|
+
}
|
|
505
|
+
switch (matchResult_1) {
|
|
506
|
+
case 0:
|
|
507
|
+
return ofArray([fsharpMember_2, new FSharpMember(/* Method */ 0, [new FSharpMemberInfo(info_8.Attributes, info_8.Name, info_8.OriginalName, empty(), empty(), info_8.Type, info_8.IsOptional, info_8.IsStatic, info_8.Accessor, info_8.Accessibility, info_8.XmlDoc, info_8.Body)])]);
|
|
508
|
+
case 1:
|
|
509
|
+
return ofArray([fsharpMember_2, new FSharpMember(/* StaticMember */ 2, [new FSharpStaticMemberInfo(info_9.Attributes, info_9.Name, info_9.OriginalName, empty(), empty(), info_9.Type, info_9.IsOptional, info_9.Accessor, info_9.Accessibility, info_9.XmlDoc)])]);
|
|
510
|
+
default:
|
|
511
|
+
return singleton(fsharpMember_2);
|
|
512
|
+
}
|
|
513
|
+
}, indexed(members));
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
export function distinctBySignature(members) {
|
|
518
|
+
const members_1 = withParameterlessOverloads(members);
|
|
519
|
+
const methodNames = ofSeq(choose((_arg) => {
|
|
520
|
+
if (_arg.tag === 0) {
|
|
521
|
+
return _arg.fields[0].Name;
|
|
522
|
+
}
|
|
523
|
+
else {
|
|
524
|
+
return undefined;
|
|
525
|
+
}
|
|
526
|
+
}, members_1), {
|
|
527
|
+
Compare: (x, y) => (comparePrimitives(x, y) | 0),
|
|
528
|
+
});
|
|
529
|
+
return map((tupledArg) => maxBy((fsharpMember) => {
|
|
530
|
+
let matchResult, info_5;
|
|
531
|
+
switch (fsharpMember.tag) {
|
|
532
|
+
case 1: {
|
|
533
|
+
matchResult = 0;
|
|
534
|
+
info_5 = fsharpMember.fields[0];
|
|
535
|
+
break;
|
|
536
|
+
}
|
|
537
|
+
case 2: {
|
|
538
|
+
matchResult = 1;
|
|
539
|
+
break;
|
|
540
|
+
}
|
|
541
|
+
default: {
|
|
542
|
+
matchResult = 0;
|
|
543
|
+
info_5 = fsharpMember.fields[0];
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
switch (matchResult) {
|
|
547
|
+
case 0:
|
|
548
|
+
return length(filter((_arg_4) => _arg_4.IsOptional, info_5.Parameters)) | 0;
|
|
549
|
+
default:
|
|
550
|
+
return length(filter((_arg_5) => _arg_5.IsOptional, fsharpMember.fields[0].Parameters)) | 0;
|
|
551
|
+
}
|
|
552
|
+
}, tupledArg[1], {
|
|
553
|
+
Compare: (x_2, y_2) => (comparePrimitives(x_2, y_2) | 0),
|
|
554
|
+
}), List_groupBy((_arg_2) => {
|
|
555
|
+
switch (_arg_2.tag) {
|
|
556
|
+
case 1: {
|
|
557
|
+
const info_3 = _arg_2.fields[0];
|
|
558
|
+
return new FSharpChoice$3(/* Choice2Of3 */ 1, [[info_3.Name, map((tuple_1) => tuple_1[0], parametersSignature(info_3.Parameters))]]);
|
|
559
|
+
}
|
|
560
|
+
case 2: {
|
|
561
|
+
const info_4 = _arg_2.fields[0];
|
|
562
|
+
const signature_1 = map((tuple_2) => tuple_2[0], parametersSignature(info_4.Parameters));
|
|
563
|
+
return new FSharpChoice$3(/* Choice3Of3 */ 2, [[info_4.Name, arityOfSignature(info_4.TypeParameters, parametersSignature(info_4.Parameters)), signature_1]]);
|
|
564
|
+
}
|
|
565
|
+
default: {
|
|
566
|
+
const info_2 = _arg_2.fields[0];
|
|
567
|
+
const signature = map((tuple) => tuple[0], parametersSignature(info_2.Parameters));
|
|
568
|
+
return new FSharpChoice$3(/* Choice1Of3 */ 0, [[info_2.Name, arityOfSignature(info_2.TypeParameters, parametersSignature(info_2.Parameters)), signature]]);
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
}, filter((_arg_1) => {
|
|
572
|
+
if (_arg_1.tag === 1) {
|
|
573
|
+
return !FSharpSet__Contains(methodNames, _arg_1.fields[0].Name);
|
|
574
|
+
}
|
|
575
|
+
else {
|
|
576
|
+
return true;
|
|
577
|
+
}
|
|
578
|
+
}, members_1), {
|
|
579
|
+
Equals: equals,
|
|
580
|
+
GetHashCode: (x_1) => (safeHash(x_1) | 0),
|
|
581
|
+
}));
|
|
582
|
+
}
|
|
6
583
|
|
|
7
584
|
function mergeTypes(types) {
|
|
8
585
|
const indexes = new Map([]);
|
|
586
|
+
const aliases = new Set([]);
|
|
9
587
|
const result = [];
|
|
10
588
|
const enumerator = getEnumerator(types);
|
|
11
589
|
try {
|
|
12
590
|
while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
|
|
591
|
+
let Members, Inheritance;
|
|
13
592
|
const typ = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
593
|
+
switch (typ.tag) {
|
|
594
|
+
case 9: {
|
|
595
|
+
const aliasInfo = typ.fields[0];
|
|
596
|
+
if (addToSet(`${aliasInfo.Name}/${length(aliasInfo.TypeParameters)}`, aliases)) {
|
|
597
|
+
void (result.push(typ));
|
|
598
|
+
}
|
|
599
|
+
break;
|
|
600
|
+
}
|
|
601
|
+
case 5: {
|
|
602
|
+
const interfaceInfo = typ.fields[0];
|
|
603
|
+
if (indexes.has(interfaceInfo.Name)) {
|
|
604
|
+
const index = getItemFromDict(indexes, interfaceInfo.Name) | 0;
|
|
605
|
+
const existing = item(index, result);
|
|
606
|
+
if (existing.tag === 5) {
|
|
607
|
+
const existingInterfaceInfo = existing.fields[0];
|
|
608
|
+
setItem(result, index, new FSharpType(/* Interface */ 5, [(Members = distinctBySignature(append(existingInterfaceInfo.Members, interfaceInfo.Members)), (Inheritance = List_distinct(append(existingInterfaceInfo.Inheritance, interfaceInfo.Inheritance), {
|
|
609
|
+
Equals: equals,
|
|
610
|
+
GetHashCode: (x) => (safeHash(x) | 0),
|
|
611
|
+
}), new FSharpInterface(existingInterfaceInfo.Attributes, existingInterfaceInfo.Name, existingInterfaceInfo.XmlDoc, existingInterfaceInfo.OriginalName, (length(interfaceInfo.TypeParameters) > length(existingInterfaceInfo.TypeParameters)) ? interfaceInfo.TypeParameters : existingInterfaceInfo.TypeParameters, Members, Inheritance)))]));
|
|
612
|
+
}
|
|
613
|
+
else {
|
|
614
|
+
throw new Exception("Invalid state");
|
|
615
|
+
}
|
|
23
616
|
}
|
|
24
617
|
else {
|
|
25
|
-
|
|
618
|
+
addToDict(indexes, interfaceInfo.Name, result.length);
|
|
619
|
+
void (result.push(typ));
|
|
26
620
|
}
|
|
621
|
+
break;
|
|
27
622
|
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
623
|
+
case 1:
|
|
624
|
+
case 20: {
|
|
625
|
+
if (!contains(typ, result, {
|
|
626
|
+
Equals: equals,
|
|
627
|
+
GetHashCode: (x_1) => (safeHash(x_1) | 0),
|
|
628
|
+
})) {
|
|
629
|
+
void (result.push(typ));
|
|
630
|
+
}
|
|
631
|
+
break;
|
|
31
632
|
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
633
|
+
case 17: {
|
|
634
|
+
if (addToSet(concat("class/", typ.fields[0].Name), aliases)) {
|
|
635
|
+
void (result.push(typ));
|
|
636
|
+
}
|
|
637
|
+
break;
|
|
638
|
+
}
|
|
639
|
+
default:
|
|
640
|
+
void (result.push(typ));
|
|
35
641
|
}
|
|
36
642
|
}
|
|
37
643
|
}
|
|
38
644
|
finally {
|
|
39
645
|
disposeSafe(enumerator);
|
|
40
646
|
}
|
|
41
|
-
return
|
|
647
|
+
return ofSeq_1(result);
|
|
42
648
|
}
|
|
43
649
|
|
|
44
650
|
function mergeModules(types) {
|
|
@@ -50,22 +656,21 @@ function mergeModules(types) {
|
|
|
50
656
|
const typ = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
|
|
51
657
|
if (typ.tag === 4) {
|
|
52
658
|
const moduleInfo = typ.fields[0];
|
|
53
|
-
const newModuleInfo = new FSharpModule(moduleInfo.Name, moduleInfo.IsRecursive, mergeModules(mergeTypes(moduleInfo.Types)));
|
|
659
|
+
const newModuleInfo = new FSharpModule(moduleInfo.Name, moduleInfo.IsRecursive, moduleInfo.ImportSpecifier, mergeModules(mergeTypes(moduleInfo.Types)));
|
|
54
660
|
if (indexes.has(moduleInfo.Name)) {
|
|
55
661
|
const index = getItemFromDict(indexes, moduleInfo.Name) | 0;
|
|
56
|
-
const existing = result
|
|
662
|
+
const existing = item(index, result);
|
|
57
663
|
if (existing.tag === 4) {
|
|
58
664
|
const existingModuleInfo = existing.fields[0];
|
|
59
|
-
|
|
60
|
-
setItem(result, index, new FSharpType(4, [merged]));
|
|
665
|
+
setItem(result, index, new FSharpType(/* Module */ 4, [new FSharpModule(existingModuleInfo.Name, existingModuleInfo.IsRecursive, existingModuleInfo.ImportSpecifier, mergeModules(mergeTypes(append(existingModuleInfo.Types, newModuleInfo.Types))))]));
|
|
61
666
|
}
|
|
62
667
|
else {
|
|
63
|
-
throw new
|
|
668
|
+
throw new Exception("Invalid state");
|
|
64
669
|
}
|
|
65
670
|
}
|
|
66
671
|
else {
|
|
67
672
|
addToDict(indexes, newModuleInfo.Name, result.length);
|
|
68
|
-
void (result.push(new FSharpType(4, [newModuleInfo])));
|
|
673
|
+
void (result.push(new FSharpType(/* Module */ 4, [newModuleInfo])));
|
|
69
674
|
}
|
|
70
675
|
}
|
|
71
676
|
else {
|
|
@@ -76,11 +681,58 @@ function mergeModules(types) {
|
|
|
76
681
|
finally {
|
|
77
682
|
disposeSafe(enumerator);
|
|
78
683
|
}
|
|
79
|
-
return
|
|
684
|
+
return ofSeq_1(result);
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
function dropEmptyModules(types) {
|
|
688
|
+
return choose((typ) => {
|
|
689
|
+
switch (typ.tag) {
|
|
690
|
+
case 4: {
|
|
691
|
+
const moduleInfo = typ.fields[0];
|
|
692
|
+
const matchValue = dropEmptyModules(moduleInfo.Types);
|
|
693
|
+
if (isEmpty_1(matchValue)) {
|
|
694
|
+
return undefined;
|
|
695
|
+
}
|
|
696
|
+
else {
|
|
697
|
+
return new FSharpType(/* Module */ 4, [new FSharpModule(moduleInfo.Name, moduleInfo.IsRecursive, moduleInfo.ImportSpecifier, matchValue)]);
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
case 10:
|
|
701
|
+
return undefined;
|
|
702
|
+
default:
|
|
703
|
+
return typ;
|
|
704
|
+
}
|
|
705
|
+
}, types);
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
function distinctMembers(types) {
|
|
709
|
+
return map((typ) => {
|
|
710
|
+
switch (typ.tag) {
|
|
711
|
+
case 5: {
|
|
712
|
+
const interfaceInfo = typ.fields[0];
|
|
713
|
+
return new FSharpType(/* Interface */ 5, [new FSharpInterface(interfaceInfo.Attributes, interfaceInfo.Name, interfaceInfo.XmlDoc, interfaceInfo.OriginalName, interfaceInfo.TypeParameters, distinctBySignature(interfaceInfo.Members), interfaceInfo.Inheritance)]);
|
|
714
|
+
}
|
|
715
|
+
case 17: {
|
|
716
|
+
const classInfo = typ.fields[0];
|
|
717
|
+
return new FSharpType(/* Class */ 17, [new FSharpClass(classInfo.Attributes, classInfo.XmlDoc, classInfo.Name, classInfo.TypeParameters, classInfo.PrimaryConstructor, List_distinctBy((constructorInfo) => parametersSignature(constructorInfo.Parameters), classInfo.SecondaryConstructors, {
|
|
718
|
+
Equals: equals,
|
|
719
|
+
GetHashCode: (x) => (safeHash(x) | 0),
|
|
720
|
+
}), classInfo.ExplicitFields)]);
|
|
721
|
+
}
|
|
722
|
+
case 4: {
|
|
723
|
+
const moduleInfo = typ.fields[0];
|
|
724
|
+
return new FSharpType(/* Module */ 4, [new FSharpModule(moduleInfo.Name, moduleInfo.IsRecursive, moduleInfo.ImportSpecifier, distinctMembers(moduleInfo.Types))]);
|
|
725
|
+
}
|
|
726
|
+
default:
|
|
727
|
+
return typ;
|
|
728
|
+
}
|
|
729
|
+
}, types);
|
|
80
730
|
}
|
|
81
731
|
|
|
82
732
|
export function apply(types) {
|
|
83
|
-
|
|
733
|
+
aliasTargets.clear();
|
|
734
|
+
genericAliasTargets.clear();
|
|
735
|
+
collectAliases(empty(), types);
|
|
736
|
+
return distinctMembers(dropEmptyModules(mergeModules(mergeTypes(types))));
|
|
84
737
|
}
|
|
85
738
|
|
|
86
|
-
//# sourceMappingURL=Merge.js.map
|