@glutinum/cli 0.10.0 → 0.11.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/dist/Glutinum.Converter/FsharpAST.js +57 -17
- package/dist/Glutinum.Converter/FsharpAST.js.map +1 -1
- package/dist/Glutinum.Converter/Generate.js +5 -7
- package/dist/Glutinum.Converter/Generate.js.map +1 -1
- package/dist/Glutinum.Converter/GlueAST.js +71 -13
- package/dist/Glutinum.Converter/GlueAST.js.map +1 -1
- package/dist/Glutinum.Converter/Log.js +5 -5
- package/dist/Glutinum.Converter/Log.js.map +1 -1
- package/dist/Glutinum.Converter/Merge.js +7 -7
- package/dist/Glutinum.Converter/Printer.js +153 -73
- package/dist/Glutinum.Converter/Printer.js.map +1 -1
- package/dist/Glutinum.Converter/Reader/Declaration.js +20 -19
- package/dist/Glutinum.Converter/Reader/Declaration.js.map +1 -1
- package/dist/Glutinum.Converter/Reader/EnumDeclaration.js +4 -3
- package/dist/Glutinum.Converter/Reader/EnumDeclaration.js.map +1 -1
- package/dist/Glutinum.Converter/Reader/FunctionDeclaration.js +2 -2
- package/dist/Glutinum.Converter/Reader/FunctionDeclaration.js.map +1 -1
- package/dist/Glutinum.Converter/Reader/IndexedAccessType.js +5 -6
- package/dist/Glutinum.Converter/Reader/IndexedAccessType.js.map +1 -1
- package/dist/Glutinum.Converter/Reader/MappedTypeNode.js +42 -0
- package/dist/Glutinum.Converter/Reader/MappedTypeNode.js.map +1 -0
- package/dist/Glutinum.Converter/Reader/Node.js +8 -5
- package/dist/Glutinum.Converter/Reader/Node.js.map +1 -1
- package/dist/Glutinum.Converter/Reader/Parameters.js +7 -4
- package/dist/Glutinum.Converter/Reader/Parameters.js.map +1 -1
- package/dist/Glutinum.Converter/Reader/Report.js +35 -0
- package/dist/Glutinum.Converter/Reader/Report.js.map +1 -0
- package/dist/Glutinum.Converter/Reader/TypeAliasDeclaration.js +5 -0
- package/dist/Glutinum.Converter/Reader/TypeAliasDeclaration.js.map +1 -1
- package/dist/Glutinum.Converter/Reader/TypeNode.js +97 -27
- package/dist/Glutinum.Converter/Reader/TypeNode.js.map +1 -1
- package/dist/Glutinum.Converter/Reader/TypeOperatorNode.js +31 -26
- package/dist/Glutinum.Converter/Reader/TypeOperatorNode.js.map +1 -1
- package/dist/Glutinum.Converter/Reader/TypeQueryNode.js +127 -0
- package/dist/Glutinum.Converter/Reader/TypeQueryNode.js.map +1 -0
- package/dist/Glutinum.Converter/Reader/TypeScriptReader.js +7 -2
- package/dist/Glutinum.Converter/Reader/TypeScriptReader.js.map +1 -1
- package/dist/Glutinum.Converter/Reader/UnionTypeNode.js +6 -9
- package/dist/Glutinum.Converter/Reader/UnionTypeNode.js.map +1 -1
- package/dist/Glutinum.Converter/Reader/Utils.js +1 -11
- package/dist/Glutinum.Converter/Reader/Utils.js.map +1 -1
- package/dist/Glutinum.Converter/Reader/VariableStatement.js +2 -2
- package/dist/Glutinum.Converter/Reader/VariableStatement.js.map +1 -1
- package/dist/Glutinum.Converter/Transform.js +327 -154
- package/dist/Glutinum.Converter/Transform.js.map +1 -1
- package/dist/Glutinum.Converter/TypeScript.Extensions.js +735 -0
- package/dist/Glutinum.Converter/TypeScript.Extensions.js.map +1 -0
- package/dist/Glutinum.Converter/Utils/Naming.js +6 -2
- package/dist/Glutinum.Converter/Utils/Naming.js.map +1 -1
- package/dist/Program.js +2 -2
- package/dist/Program.js.map +1 -1
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AssemblyInfo.fs +19 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Async.fs +207 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Async.fs.js +127 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Async.fs.js.map +1 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncOption.fs +81 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncOptionCE.fs +183 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncOptionCE.fs.js +37 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncOptionCE.fs.js.map +1 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncOptionOp.fs +24 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResult.fs +439 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultCE.fs +217 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultCE.fs.js +18 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultCE.fs.js.map +1 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOp.fs +24 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOption.fs +75 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOption.fs.js +26 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOption.fs.js.map +1 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOptionCE.fs +238 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOptionCE.fs.js +18 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOptionCE.fs.js.map +1 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOptionOp.fs +24 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncValidation.fs +190 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncValidationCE.fs +194 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncValidationCE.fs.js +18 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncValidationCE.fs.js.map +1 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncValidationOp.fs +35 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/FsToolkit.ErrorHandling.fableproj +51 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/List.fs +218 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/List.fs.js +358 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/List.fs.js.map +1 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Option.fs +331 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/OptionCE.fs +186 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/OptionCE.fs.js +18 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/OptionCE.fs.js.map +1 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/OptionOp.fs +21 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Result.fs +644 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Result.fs.js +45 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Result.fs.js.map +1 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultCE.fs +155 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultCE.fs.js +23 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultCE.fs.js.map +1 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOp.fs +45 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOption.fs +201 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOption.fs.js +65 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOption.fs.js.map +1 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOptionCE.fs +146 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOptionCE.fs.js +18 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOptionCE.fs.js.map +1 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOptionOp.fs +57 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Seq.fs +19 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Seq.fs.js +31 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Seq.fs.js.map +1 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Shims.fs +22 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Shims.fs.js +18 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Shims.fs.js.map +1 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Validation.fs +172 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ValidationCE.fs +148 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ValidationCE.fs.js +18 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ValidationCE.fs.js.map +1 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ValidationOp.fs +35 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ValueOption.fs +151 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ValueOptionCE.fs +165 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/obj/Debug/netstandard2.1/.NETStandard,Version=v2.1.AssemblyAttributes.fs +3 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/obj/Debug/netstandard2.1/FsToolkit.ErrorHandling.AssemblyInfo.fs +20 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/obj/Release/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +3 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/obj/Release/netstandard2.0/FsToolkit.ErrorHandling.AssemblyInfo.fs +20 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/obj/Release/netstandard2.1/.NETStandard,Version=v2.1.AssemblyAttributes.fs +3 -0
- package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/obj/Release/netstandard2.1/FsToolkit.ErrorHandling.AssemblyInfo.fs +20 -0
- package/dist/fable_modules/project_cracked.json +1 -1
- package/package.json +3 -2
- package/src/Glutinum.Converter/js/bootstrap.js +16 -0
|
@@ -96,21 +96,6 @@ export function FSharpEnum_$reflection() {
|
|
|
96
96
|
return record_type("Glutinum.Converter.FSharpAST.FSharpEnum", [], FSharpEnum, () => [["Name", string_type], ["Cases", list_type(FSharpEnumCase_$reflection())]]);
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
export class FSharpUnionCaseType extends Union {
|
|
100
|
-
constructor(tag, fields) {
|
|
101
|
-
super();
|
|
102
|
-
this.tag = tag;
|
|
103
|
-
this.fields = fields;
|
|
104
|
-
}
|
|
105
|
-
cases() {
|
|
106
|
-
return ["Named", "Literal"];
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
export function FSharpUnionCaseType_$reflection() {
|
|
111
|
-
return union_type("Glutinum.Converter.FSharpAST.FSharpUnionCaseType", [], FSharpUnionCaseType, () => [[["Item", string_type]], [["Item", string_type]]]);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
99
|
export class FSharpUnionCaseNamed extends Record {
|
|
115
100
|
constructor(Attributes, Name) {
|
|
116
101
|
super();
|
|
@@ -448,6 +433,61 @@ export function FSharpFunctionType_$reflection() {
|
|
|
448
433
|
return record_type("Glutinum.Converter.FSharpAST.FSharpFunctionType", [], FSharpFunctionType, () => [["Parameters", list_type(FSharpParameter_$reflection())], ["ReturnType", FSharpType_$reflection()]]);
|
|
449
434
|
}
|
|
450
435
|
|
|
436
|
+
export class FSharpSingleErasedCaseUnion extends Record {
|
|
437
|
+
constructor(Attributes, Name, XmlDoc, TypeParameter) {
|
|
438
|
+
super();
|
|
439
|
+
this.Attributes = Attributes;
|
|
440
|
+
this.Name = Name;
|
|
441
|
+
this.XmlDoc = XmlDoc;
|
|
442
|
+
this.TypeParameter = TypeParameter;
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
export function FSharpSingleErasedCaseUnion_$reflection() {
|
|
447
|
+
return record_type("Glutinum.Converter.FSharpAST.FSharpSingleErasedCaseUnion", [], FSharpSingleErasedCaseUnion, () => [["Attributes", list_type(FSharpAttribute_$reflection())], ["Name", string_type], ["XmlDoc", list_type(FSharpXmlDoc_$reflection())], ["TypeParameter", FSharpTypeParameter_$reflection()]]);
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
export class FSharpThisType extends Record {
|
|
451
|
+
constructor(Name, TypeParameters) {
|
|
452
|
+
super();
|
|
453
|
+
this.Name = Name;
|
|
454
|
+
this.TypeParameters = TypeParameters;
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
export function FSharpThisType_$reflection() {
|
|
459
|
+
return record_type("Glutinum.Converter.FSharpAST.FSharpThisType", [], FSharpThisType, () => [["Name", string_type], ["TypeParameters", list_type(FSharpTypeParameter_$reflection())]]);
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
export class FSharpJSApi extends Union {
|
|
463
|
+
constructor(Item) {
|
|
464
|
+
super();
|
|
465
|
+
this.tag = 0;
|
|
466
|
+
this.fields = [Item];
|
|
467
|
+
}
|
|
468
|
+
cases() {
|
|
469
|
+
return ["ReadonlyArray"];
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
export function FSharpJSApi_$reflection() {
|
|
474
|
+
return union_type("Glutinum.Converter.FSharpAST.FSharpJSApi", [], FSharpJSApi, () => [[["Item", FSharpType_$reflection()]]]);
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
export class FSharpDelegate extends Record {
|
|
478
|
+
constructor(Name, TypeParameters, Parameters, ReturnType) {
|
|
479
|
+
super();
|
|
480
|
+
this.Name = Name;
|
|
481
|
+
this.TypeParameters = TypeParameters;
|
|
482
|
+
this.Parameters = Parameters;
|
|
483
|
+
this.ReturnType = ReturnType;
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
export function FSharpDelegate_$reflection() {
|
|
488
|
+
return record_type("Glutinum.Converter.FSharpAST.FSharpDelegate", [], FSharpDelegate, () => [["Name", string_type], ["TypeParameters", list_type(FSharpTypeParameter_$reflection())], ["Parameters", list_type(FSharpParameter_$reflection())], ["ReturnType", FSharpType_$reflection()]]);
|
|
489
|
+
}
|
|
490
|
+
|
|
451
491
|
export class FSharpType extends Union {
|
|
452
492
|
constructor(tag, fields) {
|
|
453
493
|
super();
|
|
@@ -455,12 +495,12 @@ export class FSharpType extends Union {
|
|
|
455
495
|
this.fields = fields;
|
|
456
496
|
}
|
|
457
497
|
cases() {
|
|
458
|
-
return ["Enum", "Union", "Option", "Module", "Interface", "Unsupported", "Mapped", "Primitive", "TypeAlias", "Discard", "TypeReference", "Tuple", "TypeParameter", "ResizeArray", "ThisType", "Function", "Class", "Object"];
|
|
498
|
+
return ["Enum", "Union", "SingleErasedCaseUnion", "Option", "Module", "Interface", "Unsupported", "Mapped", "Primitive", "TypeAlias", "Discard", "TypeReference", "Tuple", "TypeParameter", "ResizeArray", "ThisType", "Function", "Class", "Object", "JSApi", "Delegate"];
|
|
459
499
|
}
|
|
460
500
|
}
|
|
461
501
|
|
|
462
502
|
export function FSharpType_$reflection() {
|
|
463
|
-
return union_type("Glutinum.Converter.FSharpAST.FSharpType", [], FSharpType, () => [[["Item", FSharpEnum_$reflection()]], [["Item", FSharpUnion_$reflection()]], [["Item", FSharpType_$reflection()]], [["Item", FSharpModule_$reflection()]], [["Item", FSharpInterface_$reflection()]], [["Item", enum_type("TypeScript.Ts.SyntaxKind", int32_type, [["Unknown", 0], ["EndOfFileToken", 1], ["SingleLineCommentTrivia", 2], ["MultiLineCommentTrivia", 3], ["NewLineTrivia", 4], ["WhitespaceTrivia", 5], ["ShebangTrivia", 6], ["ConflictMarkerTrivia", 7], ["NonTextFileMarkerTrivia", 8], ["NumericLiteral", 9], ["BigIntLiteral", 10], ["StringLiteral", 11], ["JsxText", 12], ["JsxTextAllWhiteSpaces", 13], ["RegularExpressionLiteral", 14], ["NoSubstitutionTemplateLiteral", 15], ["TemplateHead", 16], ["TemplateMiddle", 17], ["TemplateTail", 18], ["OpenBraceToken", 19], ["CloseBraceToken", 20], ["OpenParenToken", 21], ["CloseParenToken", 22], ["OpenBracketToken", 23], ["CloseBracketToken", 24], ["DotToken", 25], ["DotDotDotToken", 26], ["SemicolonToken", 27], ["CommaToken", 28], ["QuestionDotToken", 29], ["LessThanToken", 30], ["LessThanSlashToken", 31], ["GreaterThanToken", 32], ["LessThanEqualsToken", 33], ["GreaterThanEqualsToken", 34], ["EqualsEqualsToken", 35], ["ExclamationEqualsToken", 36], ["EqualsEqualsEqualsToken", 37], ["ExclamationEqualsEqualsToken", 38], ["EqualsGreaterThanToken", 39], ["PlusToken", 40], ["MinusToken", 41], ["AsteriskToken", 42], ["AsteriskAsteriskToken", 43], ["SlashToken", 44], ["PercentToken", 45], ["PlusPlusToken", 46], ["MinusMinusToken", 47], ["LessThanLessThanToken", 48], ["GreaterThanGreaterThanToken", 49], ["GreaterThanGreaterThanGreaterThanToken", 50], ["AmpersandToken", 51], ["BarToken", 52], ["CaretToken", 53], ["ExclamationToken", 54], ["TildeToken", 55], ["AmpersandAmpersandToken", 56], ["BarBarToken", 57], ["QuestionToken", 58], ["ColonToken", 59], ["AtToken", 60], ["QuestionQuestionToken", 61], ["BacktickToken", 62], ["HashToken", 63], ["EqualsToken", 64], ["PlusEqualsToken", 65], ["MinusEqualsToken", 66], ["AsteriskEqualsToken", 67], ["AsteriskAsteriskEqualsToken", 68], ["SlashEqualsToken", 69], ["PercentEqualsToken", 70], ["LessThanLessThanEqualsToken", 71], ["GreaterThanGreaterThanEqualsToken", 72], ["GreaterThanGreaterThanGreaterThanEqualsToken", 73], ["AmpersandEqualsToken", 74], ["BarEqualsToken", 75], ["BarBarEqualsToken", 76], ["AmpersandAmpersandEqualsToken", 77], ["QuestionQuestionEqualsToken", 78], ["CaretEqualsToken", 79], ["Identifier", 80], ["PrivateIdentifier", 81], ["BreakKeyword", 83], ["CaseKeyword", 84], ["CatchKeyword", 85], ["ClassKeyword", 86], ["ConstKeyword", 87], ["ContinueKeyword", 88], ["DebuggerKeyword", 89], ["DefaultKeyword", 90], ["DeleteKeyword", 91], ["DoKeyword", 92], ["ElseKeyword", 93], ["EnumKeyword", 94], ["ExportKeyword", 95], ["ExtendsKeyword", 96], ["FalseKeyword", 97], ["FinallyKeyword", 98], ["ForKeyword", 99], ["FunctionKeyword", 100], ["IfKeyword", 101], ["ImportKeyword", 102], ["InKeyword", 103], ["InstanceOfKeyword", 104], ["NewKeyword", 105], ["NullKeyword", 106], ["ReturnKeyword", 107], ["SuperKeyword", 108], ["SwitchKeyword", 109], ["ThisKeyword", 110], ["ThrowKeyword", 111], ["TrueKeyword", 112], ["TryKeyword", 113], ["TypeOfKeyword", 114], ["VarKeyword", 115], ["VoidKeyword", 116], ["WhileKeyword", 117], ["WithKeyword", 118], ["ImplementsKeyword", 119], ["InterfaceKeyword", 120], ["LetKeyword", 121], ["PackageKeyword", 122], ["PrivateKeyword", 123], ["ProtectedKeyword", 124], ["PublicKeyword", 125], ["StaticKeyword", 126], ["YieldKeyword", 127], ["AbstractKeyword", 128], ["AccessorKeyword", 129], ["AsKeyword", 130], ["AssertsKeyword", 131], ["AssertKeyword", 132], ["AnyKeyword", 133], ["AsyncKeyword", 134], ["AwaitKeyword", 135], ["BooleanKeyword", 136], ["ConstructorKeyword", 137], ["DeclareKeyword", 138], ["GetKeyword", 139], ["InferKeyword", 140], ["IntrinsicKeyword", 141], ["IsKeyword", 142], ["KeyOfKeyword", 143], ["ModuleKeyword", 144], ["NamespaceKeyword", 145], ["NeverKeyword", 146], ["OutKeyword", 147], ["ReadonlyKeyword", 148], ["RequireKeyword", 149], ["NumberKeyword", 150], ["ObjectKeyword", 151], ["SatisfiesKeyword", 152], ["SetKeyword", 153], ["StringKeyword", 154], ["SymbolKeyword", 155], ["TypeKeyword", 156], ["UndefinedKeyword", 157], ["UniqueKeyword", 158], ["UnknownKeyword", 159], ["UsingKeyword", 160], ["FromKeyword", 161], ["GlobalKeyword", 162], ["BigIntKeyword", 163], ["OverrideKeyword", 164], ["OfKeyword", 165], ["QualifiedName", 166], ["ComputedPropertyName", 167], ["TypeParameter", 168], ["Parameter", 169], ["Decorator", 170], ["PropertySignature", 171], ["PropertyDeclaration", 172], ["MethodSignature", 173], ["MethodDeclaration", 174], ["ClassStaticBlockDeclaration", 175], ["Constructor", 176], ["GetAccessor", 177], ["SetAccessor", 178], ["CallSignature", 179], ["ConstructSignature", 180], ["IndexSignature", 181], ["TypePredicate", 182], ["TypeReference", 183], ["FunctionType", 184], ["ConstructorType", 185], ["TypeQuery", 186], ["TypeLiteral", 187], ["ArrayType", 188], ["TupleType", 189], ["OptionalType", 190], ["RestType", 191], ["UnionType", 192], ["IntersectionType", 193], ["ConditionalType", 194], ["InferType", 195], ["ParenthesizedType", 196], ["ThisType", 197], ["TypeOperator", 198], ["IndexedAccessType", 199], ["MappedType", 200], ["LiteralType", 201], ["NamedTupleMember", 202], ["TemplateLiteralType", 203], ["TemplateLiteralTypeSpan", 204], ["ImportType", 205], ["ObjectBindingPattern", 206], ["ArrayBindingPattern", 207], ["BindingElement", 208], ["ArrayLiteralExpression", 209], ["ObjectLiteralExpression", 210], ["PropertyAccessExpression", 211], ["ElementAccessExpression", 212], ["CallExpression", 213], ["NewExpression", 214], ["TaggedTemplateExpression", 215], ["TypeAssertionExpression", 216], ["ParenthesizedExpression", 217], ["FunctionExpression", 218], ["ArrowFunction", 219], ["DeleteExpression", 220], ["TypeOfExpression", 221], ["VoidExpression", 222], ["AwaitExpression", 223], ["PrefixUnaryExpression", 224], ["PostfixUnaryExpression", 225], ["BinaryExpression", 226], ["ConditionalExpression", 227], ["TemplateExpression", 228], ["YieldExpression", 229], ["SpreadElement", 230], ["ClassExpression", 231], ["OmittedExpression", 232], ["ExpressionWithTypeArguments", 233], ["AsExpression", 234], ["NonNullExpression", 235], ["MetaProperty", 236], ["SyntheticExpression", 237], ["SatisfiesExpression", 238], ["TemplateSpan", 239], ["SemicolonClassElement", 240], ["Block", 241], ["EmptyStatement", 242], ["VariableStatement", 243], ["ExpressionStatement", 244], ["IfStatement", 245], ["DoStatement", 246], ["WhileStatement", 247], ["ForStatement", 248], ["ForInStatement", 249], ["ForOfStatement", 250], ["ContinueStatement", 251], ["BreakStatement", 252], ["ReturnStatement", 253], ["WithStatement", 254], ["SwitchStatement", 255], ["LabeledStatement", 256], ["ThrowStatement", 257], ["TryStatement", 258], ["DebuggerStatement", 259], ["VariableDeclaration", 260], ["VariableDeclarationList", 261], ["FunctionDeclaration", 262], ["ClassDeclaration", 263], ["InterfaceDeclaration", 264], ["TypeAliasDeclaration", 265], ["EnumDeclaration", 266], ["ModuleDeclaration", 267], ["ModuleBlock", 268], ["CaseBlock", 269], ["NamespaceExportDeclaration", 270], ["ImportEqualsDeclaration", 271], ["ImportDeclaration", 272], ["ImportClause", 273], ["NamespaceImport", 274], ["NamedImports", 275], ["ImportSpecifier", 276], ["ExportAssignment", 277], ["ExportDeclaration", 278], ["NamedExports", 279], ["NamespaceExport", 280], ["ExportSpecifier", 281], ["MissingDeclaration", 282], ["ExternalModuleReference", 283], ["JsxElement", 284], ["JsxSelfClosingElement", 285], ["JsxOpeningElement", 286], ["JsxClosingElement", 287], ["JsxFragment", 288], ["JsxOpeningFragment", 289], ["JsxClosingFragment", 290], ["JsxAttribute", 291], ["JsxAttributes", 292], ["JsxSpreadAttribute", 293], ["JsxExpression", 294], ["JsxNamespacedName", 295], ["CaseClause", 296], ["DefaultClause", 297], ["HeritageClause", 298], ["CatchClause", 299], ["AssertClause", 300], ["AssertEntry", 301], ["ImportTypeAssertionContainer", 302], ["PropertyAssignment", 303], ["ShorthandPropertyAssignment", 304], ["SpreadAssignment", 305], ["EnumMember", 306], ["UnparsedPrologue", 307], ["UnparsedPrepend", 308], ["UnparsedText", 309], ["UnparsedInternalText", 310], ["UnparsedSyntheticReference", 311], ["SourceFile", 312], ["Bundle", 313], ["UnparsedSource", 314], ["InputFiles", 315], ["JSDocTypeExpression", 316], ["JSDocNameReference", 317], ["JSDocMemberName", 318], ["JSDocAllType", 319], ["JSDocUnknownType", 320], ["JSDocNullableType", 321], ["JSDocNonNullableType", 322], ["JSDocOptionalType", 323], ["JSDocFunctionType", 324], ["JSDocVariadicType", 325], ["JSDocNamepathType", 326], ["JSDoc", 327], ["JSDocComment", 327], ["JSDocText", 328], ["JSDocTypeLiteral", 329], ["JSDocSignature", 330], ["JSDocLink", 331], ["JSDocLinkCode", 332], ["JSDocLinkPlain", 333], ["JSDocTag", 334], ["JSDocAugmentsTag", 335], ["JSDocImplementsTag", 336], ["JSDocAuthorTag", 337], ["JSDocDeprecatedTag", 338], ["JSDocClassTag", 339], ["JSDocPublicTag", 340], ["JSDocPrivateTag", 341], ["JSDocProtectedTag", 342], ["JSDocReadonlyTag", 343], ["JSDocOverrideTag", 344], ["JSDocCallbackTag", 345], ["JSDocOverloadTag", 346], ["JSDocEnumTag", 347], ["JSDocParameterTag", 348], ["JSDocReturnTag", 349], ["JSDocThisTag", 350], ["JSDocTypeTag", 351], ["JSDocTemplateTag", 352], ["JSDocTypedefTag", 353], ["JSDocSeeTag", 354], ["JSDocPropertyTag", 355], ["JSDocThrowsTag", 356], ["JSDocSatisfiesTag", 357], ["SyntaxList", 358], ["NotEmittedStatement", 359], ["PartiallyEmittedExpression", 360], ["CommaListExpression", 361], ["SyntheticReferenceExpression", 362], ["Count", 363], ["FirstAssignment", 64], ["LastAssignment", 79], ["FirstCompoundAssignment", 65], ["LastCompoundAssignment", 79], ["FirstReservedWord", 83], ["LastReservedWord", 118], ["FirstKeyword", 83], ["LastKeyword", 165], ["FirstFutureReservedWord", 119], ["LastFutureReservedWord", 127], ["FirstTypeNode", 182], ["LastTypeNode", 205], ["FirstPunctuation", 19], ["LastPunctuation", 79], ["FirstToken", 0], ["LastToken", 165], ["FirstTriviaToken", 2], ["LastTriviaToken", 7], ["FirstLiteralToken", 9], ["LastLiteralToken", 15], ["FirstTemplateToken", 15], ["LastTemplateToken", 18], ["FirstBinaryOperator", 30], ["LastBinaryOperator", 79], ["FirstStatement", 243], ["LastStatement", 259], ["FirstNode", 166], ["FirstJSDocNode", 316], ["LastJSDocNode", 357], ["FirstJSDocTagNode", 334], ["LastJSDocTagNode", 357]])]], [["Item", FSharpMapped_$reflection()]], [["Item", FSharpPrimitive_$reflection()]], [["Item", FSharpTypeAlias_$reflection()]], [], [["Item", FSharpTypeReference_$reflection()]], [["Item", list_type(FSharpType_$reflection())]], [["Item", string_type]], [["Item", FSharpType_$reflection()]], [["typeName", string_type]], [["Item", FSharpFunctionType_$reflection()]], [["Item", FSharpClass_$reflection()]], []]);
|
|
503
|
+
return union_type("Glutinum.Converter.FSharpAST.FSharpType", [], FSharpType, () => [[["Item", FSharpEnum_$reflection()]], [["Item", FSharpUnion_$reflection()]], [["Item", FSharpSingleErasedCaseUnion_$reflection()]], [["Item", FSharpType_$reflection()]], [["Item", FSharpModule_$reflection()]], [["Item", FSharpInterface_$reflection()]], [["Item", enum_type("TypeScript.Ts.SyntaxKind", int32_type, [["Unknown", 0], ["EndOfFileToken", 1], ["SingleLineCommentTrivia", 2], ["MultiLineCommentTrivia", 3], ["NewLineTrivia", 4], ["WhitespaceTrivia", 5], ["ShebangTrivia", 6], ["ConflictMarkerTrivia", 7], ["NonTextFileMarkerTrivia", 8], ["NumericLiteral", 9], ["BigIntLiteral", 10], ["StringLiteral", 11], ["JsxText", 12], ["JsxTextAllWhiteSpaces", 13], ["RegularExpressionLiteral", 14], ["NoSubstitutionTemplateLiteral", 15], ["TemplateHead", 16], ["TemplateMiddle", 17], ["TemplateTail", 18], ["OpenBraceToken", 19], ["CloseBraceToken", 20], ["OpenParenToken", 21], ["CloseParenToken", 22], ["OpenBracketToken", 23], ["CloseBracketToken", 24], ["DotToken", 25], ["DotDotDotToken", 26], ["SemicolonToken", 27], ["CommaToken", 28], ["QuestionDotToken", 29], ["LessThanToken", 30], ["LessThanSlashToken", 31], ["GreaterThanToken", 32], ["LessThanEqualsToken", 33], ["GreaterThanEqualsToken", 34], ["EqualsEqualsToken", 35], ["ExclamationEqualsToken", 36], ["EqualsEqualsEqualsToken", 37], ["ExclamationEqualsEqualsToken", 38], ["EqualsGreaterThanToken", 39], ["PlusToken", 40], ["MinusToken", 41], ["AsteriskToken", 42], ["AsteriskAsteriskToken", 43], ["SlashToken", 44], ["PercentToken", 45], ["PlusPlusToken", 46], ["MinusMinusToken", 47], ["LessThanLessThanToken", 48], ["GreaterThanGreaterThanToken", 49], ["GreaterThanGreaterThanGreaterThanToken", 50], ["AmpersandToken", 51], ["BarToken", 52], ["CaretToken", 53], ["ExclamationToken", 54], ["TildeToken", 55], ["AmpersandAmpersandToken", 56], ["BarBarToken", 57], ["QuestionToken", 58], ["ColonToken", 59], ["AtToken", 60], ["QuestionQuestionToken", 61], ["BacktickToken", 62], ["HashToken", 63], ["EqualsToken", 64], ["PlusEqualsToken", 65], ["MinusEqualsToken", 66], ["AsteriskEqualsToken", 67], ["AsteriskAsteriskEqualsToken", 68], ["SlashEqualsToken", 69], ["PercentEqualsToken", 70], ["LessThanLessThanEqualsToken", 71], ["GreaterThanGreaterThanEqualsToken", 72], ["GreaterThanGreaterThanGreaterThanEqualsToken", 73], ["AmpersandEqualsToken", 74], ["BarEqualsToken", 75], ["BarBarEqualsToken", 76], ["AmpersandAmpersandEqualsToken", 77], ["QuestionQuestionEqualsToken", 78], ["CaretEqualsToken", 79], ["Identifier", 80], ["PrivateIdentifier", 81], ["BreakKeyword", 83], ["CaseKeyword", 84], ["CatchKeyword", 85], ["ClassKeyword", 86], ["ConstKeyword", 87], ["ContinueKeyword", 88], ["DebuggerKeyword", 89], ["DefaultKeyword", 90], ["DeleteKeyword", 91], ["DoKeyword", 92], ["ElseKeyword", 93], ["EnumKeyword", 94], ["ExportKeyword", 95], ["ExtendsKeyword", 96], ["FalseKeyword", 97], ["FinallyKeyword", 98], ["ForKeyword", 99], ["FunctionKeyword", 100], ["IfKeyword", 101], ["ImportKeyword", 102], ["InKeyword", 103], ["InstanceOfKeyword", 104], ["NewKeyword", 105], ["NullKeyword", 106], ["ReturnKeyword", 107], ["SuperKeyword", 108], ["SwitchKeyword", 109], ["ThisKeyword", 110], ["ThrowKeyword", 111], ["TrueKeyword", 112], ["TryKeyword", 113], ["TypeOfKeyword", 114], ["VarKeyword", 115], ["VoidKeyword", 116], ["WhileKeyword", 117], ["WithKeyword", 118], ["ImplementsKeyword", 119], ["InterfaceKeyword", 120], ["LetKeyword", 121], ["PackageKeyword", 122], ["PrivateKeyword", 123], ["ProtectedKeyword", 124], ["PublicKeyword", 125], ["StaticKeyword", 126], ["YieldKeyword", 127], ["AbstractKeyword", 128], ["AccessorKeyword", 129], ["AsKeyword", 130], ["AssertsKeyword", 131], ["AssertKeyword", 132], ["AnyKeyword", 133], ["AsyncKeyword", 134], ["AwaitKeyword", 135], ["BooleanKeyword", 136], ["ConstructorKeyword", 137], ["DeclareKeyword", 138], ["GetKeyword", 139], ["InferKeyword", 140], ["IntrinsicKeyword", 141], ["IsKeyword", 142], ["KeyOfKeyword", 143], ["ModuleKeyword", 144], ["NamespaceKeyword", 145], ["NeverKeyword", 146], ["OutKeyword", 147], ["ReadonlyKeyword", 148], ["RequireKeyword", 149], ["NumberKeyword", 150], ["ObjectKeyword", 151], ["SatisfiesKeyword", 152], ["SetKeyword", 153], ["StringKeyword", 154], ["SymbolKeyword", 155], ["TypeKeyword", 156], ["UndefinedKeyword", 157], ["UniqueKeyword", 158], ["UnknownKeyword", 159], ["UsingKeyword", 160], ["FromKeyword", 161], ["GlobalKeyword", 162], ["BigIntKeyword", 163], ["OverrideKeyword", 164], ["OfKeyword", 165], ["QualifiedName", 166], ["ComputedPropertyName", 167], ["TypeParameter", 168], ["Parameter", 169], ["Decorator", 170], ["PropertySignature", 171], ["PropertyDeclaration", 172], ["MethodSignature", 173], ["MethodDeclaration", 174], ["ClassStaticBlockDeclaration", 175], ["Constructor", 176], ["GetAccessor", 177], ["SetAccessor", 178], ["CallSignature", 179], ["ConstructSignature", 180], ["IndexSignature", 181], ["TypePredicate", 182], ["TypeReference", 183], ["FunctionType", 184], ["ConstructorType", 185], ["TypeQuery", 186], ["TypeLiteral", 187], ["ArrayType", 188], ["TupleType", 189], ["OptionalType", 190], ["RestType", 191], ["UnionType", 192], ["IntersectionType", 193], ["ConditionalType", 194], ["InferType", 195], ["ParenthesizedType", 196], ["ThisType", 197], ["TypeOperator", 198], ["IndexedAccessType", 199], ["MappedType", 200], ["LiteralType", 201], ["NamedTupleMember", 202], ["TemplateLiteralType", 203], ["TemplateLiteralTypeSpan", 204], ["ImportType", 205], ["ObjectBindingPattern", 206], ["ArrayBindingPattern", 207], ["BindingElement", 208], ["ArrayLiteralExpression", 209], ["ObjectLiteralExpression", 210], ["PropertyAccessExpression", 211], ["ElementAccessExpression", 212], ["CallExpression", 213], ["NewExpression", 214], ["TaggedTemplateExpression", 215], ["TypeAssertionExpression", 216], ["ParenthesizedExpression", 217], ["FunctionExpression", 218], ["ArrowFunction", 219], ["DeleteExpression", 220], ["TypeOfExpression", 221], ["VoidExpression", 222], ["AwaitExpression", 223], ["PrefixUnaryExpression", 224], ["PostfixUnaryExpression", 225], ["BinaryExpression", 226], ["ConditionalExpression", 227], ["TemplateExpression", 228], ["YieldExpression", 229], ["SpreadElement", 230], ["ClassExpression", 231], ["OmittedExpression", 232], ["ExpressionWithTypeArguments", 233], ["AsExpression", 234], ["NonNullExpression", 235], ["MetaProperty", 236], ["SyntheticExpression", 237], ["SatisfiesExpression", 238], ["TemplateSpan", 239], ["SemicolonClassElement", 240], ["Block", 241], ["EmptyStatement", 242], ["VariableStatement", 243], ["ExpressionStatement", 244], ["IfStatement", 245], ["DoStatement", 246], ["WhileStatement", 247], ["ForStatement", 248], ["ForInStatement", 249], ["ForOfStatement", 250], ["ContinueStatement", 251], ["BreakStatement", 252], ["ReturnStatement", 253], ["WithStatement", 254], ["SwitchStatement", 255], ["LabeledStatement", 256], ["ThrowStatement", 257], ["TryStatement", 258], ["DebuggerStatement", 259], ["VariableDeclaration", 260], ["VariableDeclarationList", 261], ["FunctionDeclaration", 262], ["ClassDeclaration", 263], ["InterfaceDeclaration", 264], ["TypeAliasDeclaration", 265], ["EnumDeclaration", 266], ["ModuleDeclaration", 267], ["ModuleBlock", 268], ["CaseBlock", 269], ["NamespaceExportDeclaration", 270], ["ImportEqualsDeclaration", 271], ["ImportDeclaration", 272], ["ImportClause", 273], ["NamespaceImport", 274], ["NamedImports", 275], ["ImportSpecifier", 276], ["ExportAssignment", 277], ["ExportDeclaration", 278], ["NamedExports", 279], ["NamespaceExport", 280], ["ExportSpecifier", 281], ["MissingDeclaration", 282], ["ExternalModuleReference", 283], ["JsxElement", 284], ["JsxSelfClosingElement", 285], ["JsxOpeningElement", 286], ["JsxClosingElement", 287], ["JsxFragment", 288], ["JsxOpeningFragment", 289], ["JsxClosingFragment", 290], ["JsxAttribute", 291], ["JsxAttributes", 292], ["JsxSpreadAttribute", 293], ["JsxExpression", 294], ["JsxNamespacedName", 295], ["CaseClause", 296], ["DefaultClause", 297], ["HeritageClause", 298], ["CatchClause", 299], ["AssertClause", 300], ["AssertEntry", 301], ["ImportTypeAssertionContainer", 302], ["PropertyAssignment", 303], ["ShorthandPropertyAssignment", 304], ["SpreadAssignment", 305], ["EnumMember", 306], ["UnparsedPrologue", 307], ["UnparsedPrepend", 308], ["UnparsedText", 309], ["UnparsedInternalText", 310], ["UnparsedSyntheticReference", 311], ["SourceFile", 312], ["Bundle", 313], ["UnparsedSource", 314], ["InputFiles", 315], ["JSDocTypeExpression", 316], ["JSDocNameReference", 317], ["JSDocMemberName", 318], ["JSDocAllType", 319], ["JSDocUnknownType", 320], ["JSDocNullableType", 321], ["JSDocNonNullableType", 322], ["JSDocOptionalType", 323], ["JSDocFunctionType", 324], ["JSDocVariadicType", 325], ["JSDocNamepathType", 326], ["JSDoc", 327], ["JSDocComment", 327], ["JSDocText", 328], ["JSDocTypeLiteral", 329], ["JSDocSignature", 330], ["JSDocLink", 331], ["JSDocLinkCode", 332], ["JSDocLinkPlain", 333], ["JSDocTag", 334], ["JSDocAugmentsTag", 335], ["JSDocImplementsTag", 336], ["JSDocAuthorTag", 337], ["JSDocDeprecatedTag", 338], ["JSDocClassTag", 339], ["JSDocPublicTag", 340], ["JSDocPrivateTag", 341], ["JSDocProtectedTag", 342], ["JSDocReadonlyTag", 343], ["JSDocOverrideTag", 344], ["JSDocCallbackTag", 345], ["JSDocOverloadTag", 346], ["JSDocEnumTag", 347], ["JSDocParameterTag", 348], ["JSDocReturnTag", 349], ["JSDocThisTag", 350], ["JSDocTypeTag", 351], ["JSDocTemplateTag", 352], ["JSDocTypedefTag", 353], ["JSDocSeeTag", 354], ["JSDocPropertyTag", 355], ["JSDocThrowsTag", 356], ["JSDocSatisfiesTag", 357], ["SyntaxList", 358], ["NotEmittedStatement", 359], ["PartiallyEmittedExpression", 360], ["CommaListExpression", 361], ["SyntheticReferenceExpression", 362], ["Count", 363], ["FirstAssignment", 64], ["LastAssignment", 79], ["FirstCompoundAssignment", 65], ["LastCompoundAssignment", 79], ["FirstReservedWord", 83], ["LastReservedWord", 118], ["FirstKeyword", 83], ["LastKeyword", 165], ["FirstFutureReservedWord", 119], ["LastFutureReservedWord", 127], ["FirstTypeNode", 182], ["LastTypeNode", 205], ["FirstPunctuation", 19], ["LastPunctuation", 79], ["FirstToken", 0], ["LastToken", 165], ["FirstTriviaToken", 2], ["LastTriviaToken", 7], ["FirstLiteralToken", 9], ["LastLiteralToken", 15], ["FirstTemplateToken", 15], ["LastTemplateToken", 18], ["FirstBinaryOperator", 30], ["LastBinaryOperator", 79], ["FirstStatement", 243], ["LastStatement", 259], ["FirstNode", 166], ["FirstJSDocNode", 316], ["LastJSDocNode", 357], ["FirstJSDocTagNode", 334], ["LastJSDocTagNode", 357]])]], [["Item", FSharpMapped_$reflection()]], [["Item", FSharpPrimitive_$reflection()]], [["Item", FSharpTypeAlias_$reflection()]], [], [["Item", FSharpTypeReference_$reflection()]], [["Item", list_type(FSharpType_$reflection())]], [["Item", string_type]], [["Item", FSharpType_$reflection()]], [["Item", FSharpThisType_$reflection()]], [["Item", FSharpFunctionType_$reflection()]], [["Item", FSharpClass_$reflection()]], [], [["Item", FSharpJSApi_$reflection()]], [["Item", FSharpDelegate_$reflection()]]]);
|
|
464
504
|
}
|
|
465
505
|
|
|
466
506
|
export class FSharpOutFile extends Record {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Glutinum.Converter/FsharpAST.fs"],"names":["this","value","isString","matchValue","c","name","constraint_","default_"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/Glutinum.Converter/FsharpAST.fs"],"names":["this","value","isString","matchValue","c","name","constraint_","default_"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YA2BcA;;iCAES,AAAAA;;mBACSC,AAAP,AAAAD;;AACD,mBAAA,SAAA,AAAAA;;mBACN;;AAJQ,mBAAA,AAAAA;;;;;AA0BdE,qBAEG;AACOC,2BAAA,AAAAC;gBAAAD;;;;;uBAKkB;;uBAJI;;OAHhC,AAAAH;AAqBJ,QATO;AACOG,6BAAA,AAAAC;gBAAAD;;;;uBAKkB;;uBAHE;;OAJ9B,AAAAH;AAWA,eAAA;;SACJ,IAAKE;AACD,eAAA;;;AAEA,eAAA;;;;;YA\u002BCEF;;mBAEO;;mBACE;;mBAFH;;;;;WAkIZ,sBACiB,SACA,SACG;;;;WAIpB,sBACiB,SACA,SACG;;;;WAuCpB,wBACWK,MACMC,aACHC","file":null,"sourcesContent":null,"sourceRoot":null}
|
|
@@ -1,21 +1,19 @@
|
|
|
1
|
+
import bootstrap from "../../src/Glutinum.Converter/js/bootstrap.js";
|
|
1
2
|
import * as fs from "fs";
|
|
2
|
-
import
|
|
3
|
+
import { toString } from "../fable_modules/fable-library-js.4.14.0/Types.js";
|
|
3
4
|
import { printFile, Printer_$ctor } from "./Printer.js";
|
|
4
5
|
import { readSourceFile } from "./Read.js";
|
|
5
6
|
import { disposeSafe, getEnumerator } from "../fable_modules/fable-library-js.4.14.0/Util.js";
|
|
6
7
|
import { error, warn } from "./Log.js";
|
|
7
8
|
import { apply } from "./Transform.js";
|
|
8
|
-
|
|
9
|
+
|
|
10
|
+
export const createProgramForCLI = bootstrap;
|
|
9
11
|
|
|
10
12
|
export function generateBindingFile(filePath) {
|
|
11
13
|
if (!fs.existsSync(filePath)) {
|
|
12
14
|
throw new Error(`File does not exist: ${filePath}`);
|
|
13
15
|
}
|
|
14
|
-
const
|
|
15
|
-
target: 2,
|
|
16
|
-
module: 1,
|
|
17
|
-
};
|
|
18
|
-
const program = typescript.createProgram([filePath], options);
|
|
16
|
+
const program = createProgramForCLI(filePath, toString(fs.readFileSync(filePath)));
|
|
19
17
|
const checker = program.getTypeChecker();
|
|
20
18
|
const sourceFile = program.getSourceFile(filePath);
|
|
21
19
|
const printer = Printer_$ctor();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Glutinum.Converter/Generate.fs"],"names":["filePath","
|
|
1
|
+
{"version":3,"sources":["../../src/Glutinum.Converter/Generate.fs"],"names":["filePath","program","createProgramForCLI","checker","sourceFile","printer","readerResult","enumerator","transformResult"],"mappings":";;;;;;;;;;;;AAaI,QAAwC,CAArC,cAAwBA;AACvB,wBAAS,wBAAwBA;;AAIjCC,oBAAU,AAAAC,oBAAoBF,UAAU,SAF1B,gBAAgBA;AAI9BG,oBAAU,AAAAF;AAEVG,uBAAa,AAAAH,sBAAsBD;AAEnCK,oBAAU;AAEVC,yBAAe,eAAoBH,SAAQC;AAGhCG,qBAAA,cAAA,AAAAD;AAAf;AAAA,eAAe,AAAAC;AACX,iBADW,AAAAA;;;;AAAf,oBAAeA;;AAGXC,4BACA,MAAgB,AAAAF,yBAAwB,AAAAA;AAG5BC,uBAAA,cAAA,AAAAC;AAAhB;AAAA,eAAgB,AAAAD;AACZ,iBADY,AAAAA;;;;AAAhB,oBAAgBA;;AAGAA,uBAAA,cAAA,AAAAC;AAAhB;AAAA,eAAgB,AAAAD;AACZ,kBADY,AAAAA;;;;AAAhB,oBAAgBA;;AAGhB,cAAkBF,SAAQG;AAE1B,WAAA,SAAAH","file":null,"sourcesContent":null,"sourceRoot":null}
|
|
@@ -158,15 +158,16 @@ export function GlueGetAccessor_$reflection() {
|
|
|
158
158
|
}
|
|
159
159
|
|
|
160
160
|
export class GlueIndexSignature extends Record {
|
|
161
|
-
constructor(Parameters, Type) {
|
|
161
|
+
constructor(Parameters, Type, IsReadOnly) {
|
|
162
162
|
super();
|
|
163
163
|
this.Parameters = Parameters;
|
|
164
164
|
this.Type = Type;
|
|
165
|
+
this.IsReadOnly = IsReadOnly;
|
|
165
166
|
}
|
|
166
167
|
}
|
|
167
168
|
|
|
168
169
|
export function GlueIndexSignature_$reflection() {
|
|
169
|
-
return record_type("Glutinum.Converter.GlueAST.GlueIndexSignature", [], GlueIndexSignature, () => [["Parameters", list_type(GlueParameter_$reflection())], ["Type", GlueType_$reflection()]]);
|
|
170
|
+
return record_type("Glutinum.Converter.GlueAST.GlueIndexSignature", [], GlueIndexSignature, () => [["Parameters", list_type(GlueParameter_$reflection())], ["Type", GlueType_$reflection()], ["IsReadOnly", bool_type]]);
|
|
170
171
|
}
|
|
171
172
|
|
|
172
173
|
export class GlueMethodSignature extends Record {
|
|
@@ -256,12 +257,12 @@ export class GluePrimitive extends Union {
|
|
|
256
257
|
this.fields = fields;
|
|
257
258
|
}
|
|
258
259
|
cases() {
|
|
259
|
-
return ["String", "Int", "Float", "Bool", "Unit", "Number", "Any", "Null", "Undefined", "Object", "Symbol"];
|
|
260
|
+
return ["String", "Int", "Float", "Bool", "Unit", "Number", "Any", "Null", "Undefined", "Object", "Symbol", "Never"];
|
|
260
261
|
}
|
|
261
262
|
}
|
|
262
263
|
|
|
263
264
|
export function GluePrimitive_$reflection() {
|
|
264
|
-
return union_type("Glutinum.Converter.GlueAST.GluePrimitive", [], GluePrimitive, () => [[], [], [], [], [], [], [], [], [], [], []]);
|
|
265
|
+
return union_type("Glutinum.Converter.GlueAST.GluePrimitive", [], GluePrimitive, () => [[], [], [], [], [], [], [], [], [], [], [], []]);
|
|
265
266
|
}
|
|
266
267
|
|
|
267
268
|
export class GlueLiteral extends Union {
|
|
@@ -419,16 +420,17 @@ export function ExcludedMember_$reflection() {
|
|
|
419
420
|
}
|
|
420
421
|
|
|
421
422
|
export class GlueFunctionType extends Record {
|
|
422
|
-
constructor(Documentation, Type, Parameters) {
|
|
423
|
+
constructor(Documentation, Type, TypeParameters, Parameters) {
|
|
423
424
|
super();
|
|
424
425
|
this.Documentation = Documentation;
|
|
425
426
|
this.Type = Type;
|
|
427
|
+
this.TypeParameters = TypeParameters;
|
|
426
428
|
this.Parameters = Parameters;
|
|
427
429
|
}
|
|
428
430
|
}
|
|
429
431
|
|
|
430
432
|
export function GlueFunctionType_$reflection() {
|
|
431
|
-
return record_type("Glutinum.Converter.GlueAST.GlueFunctionType", [], GlueFunctionType, () => [["Documentation", list_type(GlueComment_$reflection())], ["Type", GlueType_$reflection()], ["Parameters", list_type(GlueParameter_$reflection())]]);
|
|
433
|
+
return record_type("Glutinum.Converter.GlueAST.GlueFunctionType", [], GlueFunctionType, () => [["Documentation", list_type(GlueComment_$reflection())], ["Type", GlueType_$reflection()], ["TypeParameters", list_type(GlueTypeParameter_$reflection())], ["Parameters", list_type(GlueParameter_$reflection())]]);
|
|
432
434
|
}
|
|
433
435
|
|
|
434
436
|
export class NamedTupleType extends Record {
|
|
@@ -462,12 +464,48 @@ export class GlueUtilityType extends Union {
|
|
|
462
464
|
this.fields = fields;
|
|
463
465
|
}
|
|
464
466
|
cases() {
|
|
465
|
-
return ["Partial", "Record"];
|
|
467
|
+
return ["Partial", "Record", "ReturnType", "ThisParameterType"];
|
|
466
468
|
}
|
|
467
469
|
}
|
|
468
470
|
|
|
469
471
|
export function GlueUtilityType_$reflection() {
|
|
470
|
-
return union_type("Glutinum.Converter.GlueAST.GlueUtilityType", [], GlueUtilityType, () => [[["Item", GlueInterface_$reflection()]], [["Item", GlueRecord_$reflection()]]]);
|
|
472
|
+
return union_type("Glutinum.Converter.GlueAST.GlueUtilityType", [], GlueUtilityType, () => [[["Item", GlueInterface_$reflection()]], [["Item", GlueRecord_$reflection()]], [["Item", GlueType_$reflection()]], [["Item", GlueType_$reflection()]]]);
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
export class GlueMappedType extends Record {
|
|
476
|
+
constructor(TypeParameter, Type) {
|
|
477
|
+
super();
|
|
478
|
+
this.TypeParameter = TypeParameter;
|
|
479
|
+
this.Type = Type;
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
export function GlueMappedType_$reflection() {
|
|
484
|
+
return record_type("Glutinum.Converter.GlueAST.GlueMappedType", [], GlueMappedType, () => [["TypeParameter", GlueTypeParameter_$reflection()], ["Type", option_type(GlueType_$reflection())]]);
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
export class GlueIndexedAccessType extends Record {
|
|
488
|
+
constructor(IndexType, ObjectType) {
|
|
489
|
+
super();
|
|
490
|
+
this.IndexType = IndexType;
|
|
491
|
+
this.ObjectType = ObjectType;
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
export function GlueIndexedAccessType_$reflection() {
|
|
496
|
+
return record_type("Glutinum.Converter.GlueAST.GlueIndexedAccessType", [], GlueIndexedAccessType, () => [["IndexType", GlueType_$reflection()], ["ObjectType", GlueType_$reflection()]]);
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
export class GlueThisType extends Record {
|
|
500
|
+
constructor(Name, TypeParameters) {
|
|
501
|
+
super();
|
|
502
|
+
this.Name = Name;
|
|
503
|
+
this.TypeParameters = TypeParameters;
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
export function GlueThisType_$reflection() {
|
|
508
|
+
return record_type("Glutinum.Converter.GlueAST.GlueThisType", [], GlueThisType, () => [["Name", string_type], ["TypeParameters", list_type(GlueTypeParameter_$reflection())]]);
|
|
471
509
|
}
|
|
472
510
|
|
|
473
511
|
export class GlueType extends Union {
|
|
@@ -477,12 +515,12 @@ export class GlueType extends Union {
|
|
|
477
515
|
this.fields = fields;
|
|
478
516
|
}
|
|
479
517
|
cases() {
|
|
480
|
-
return ["Discard", "Interface", "Variable", "Primitive", "Enum", "TypeAliasDeclaration", "FunctionDeclaration", "Union", "Literal", "KeyOf", "IndexedAccessType", "ModuleDeclaration", "ClassDeclaration", "TypeReference", "Array", "FunctionType", "TypeParameter", "ThisType", "TupleType", "NamedTupleType", "IntersectionType", "TypeLiteral", "OptionalType", "Unknown", "ExportDefault", "TemplateLiteral", "UtilityType"];
|
|
518
|
+
return ["Discard", "Interface", "Variable", "Primitive", "Enum", "TypeAliasDeclaration", "FunctionDeclaration", "Union", "Literal", "KeyOf", "IndexedAccessType", "ModuleDeclaration", "ClassDeclaration", "TypeReference", "Array", "FunctionType", "TypeParameter", "ThisType", "TupleType", "NamedTupleType", "IntersectionType", "TypeLiteral", "OptionalType", "Unknown", "ExportDefault", "TemplateLiteral", "UtilityType", "MappedType", "ConstructorType", "ReadOnly"];
|
|
481
519
|
}
|
|
482
520
|
}
|
|
483
521
|
|
|
484
522
|
export function GlueType_$reflection() {
|
|
485
|
-
return union_type("Glutinum.Converter.GlueAST.GlueType", [], GlueType, () => [[], [["Item", GlueInterface_$reflection()]], [["Item", GlueVariable_$reflection()]], [["Item", GluePrimitive_$reflection()]], [["Item", GlueEnum_$reflection()]], [["Item", GlueTypeAliasDeclaration_$reflection()]], [["Item", GlueFunctionDeclaration_$reflection()]], [["Item", GlueTypeUnion_$reflection()]], [["Item", GlueLiteral_$reflection()]], [["Item", GlueType_$reflection()]], [["Item",
|
|
523
|
+
return union_type("Glutinum.Converter.GlueAST.GlueType", [], GlueType, () => [[], [["Item", GlueInterface_$reflection()]], [["Item", GlueVariable_$reflection()]], [["Item", GluePrimitive_$reflection()]], [["Item", GlueEnum_$reflection()]], [["Item", GlueTypeAliasDeclaration_$reflection()]], [["Item", GlueFunctionDeclaration_$reflection()]], [["Item", GlueTypeUnion_$reflection()]], [["Item", GlueLiteral_$reflection()]], [["Item", GlueType_$reflection()]], [["Item", GlueIndexedAccessType_$reflection()]], [["Item", GlueModuleDeclaration_$reflection()]], [["Item", GlueClassDeclaration_$reflection()]], [["Item", GlueTypeReference_$reflection()]], [["Item", GlueType_$reflection()]], [["Item", GlueFunctionType_$reflection()]], [["Item", string_type]], [["Item", GlueThisType_$reflection()]], [["Item", list_type(GlueType_$reflection())]], [["Item", NamedTupleType_$reflection()]], [["Item", list_type(GlueMember_$reflection())]], [["Item", GlueTypeLiteral_$reflection()]], [["Item", GlueType_$reflection()]], [], [["Item", GlueType_$reflection()]], [], [["Item", GlueUtilityType_$reflection()]], [["Item", GlueMappedType_$reflection()]], [], [["Item", GlueType_$reflection()]]]);
|
|
486
524
|
}
|
|
487
525
|
|
|
488
526
|
export function GlueLiteral__ToText(this$) {
|
|
@@ -527,6 +565,8 @@ export function GlueType__get_Name(this$) {
|
|
|
527
565
|
return "obj";
|
|
528
566
|
case 10:
|
|
529
567
|
return "obj";
|
|
568
|
+
case 11:
|
|
569
|
+
return "obj";
|
|
530
570
|
default:
|
|
531
571
|
return "string";
|
|
532
572
|
}
|
|
@@ -553,8 +593,17 @@ export function GlueType__get_Name(this$) {
|
|
|
553
593
|
return this$.fields[0].Name;
|
|
554
594
|
case 14:
|
|
555
595
|
return `ResizeArray<${GlueType__get_Name(this$.fields[0])}>`;
|
|
596
|
+
case 29: {
|
|
597
|
+
const info_11 = this$.fields[0];
|
|
598
|
+
if (info_11.tag === 14) {
|
|
599
|
+
return `ReadonlyArray<${GlueType__get_Name(info_11.fields[0])}>`;
|
|
600
|
+
}
|
|
601
|
+
else {
|
|
602
|
+
return GlueType__get_Name(info_11);
|
|
603
|
+
}
|
|
604
|
+
}
|
|
556
605
|
case 17:
|
|
557
|
-
return this$.fields[0];
|
|
606
|
+
return this$.fields[0].Name;
|
|
558
607
|
case 19:
|
|
559
608
|
case 21:
|
|
560
609
|
case 20:
|
|
@@ -565,13 +614,22 @@ export function GlueType__get_Name(this$) {
|
|
|
565
614
|
case 22:
|
|
566
615
|
case 0:
|
|
567
616
|
case 24:
|
|
617
|
+
case 28:
|
|
568
618
|
case 23:
|
|
569
619
|
return "obj";
|
|
570
620
|
case 26: {
|
|
571
|
-
|
|
621
|
+
const utilityType = this$.fields[0];
|
|
622
|
+
switch (utilityType.tag) {
|
|
623
|
+
case 2:
|
|
624
|
+
return GlueType__get_Name(utilityType.fields[0]);
|
|
625
|
+
case 3:
|
|
626
|
+
return GlueType__get_Name(utilityType.fields[0]);
|
|
627
|
+
default:
|
|
628
|
+
return "obj";
|
|
572
629
|
}
|
|
573
|
-
return "obj";
|
|
574
630
|
}
|
|
631
|
+
case 27:
|
|
632
|
+
return "obj";
|
|
575
633
|
default:
|
|
576
634
|
return this$.fields[0].Name;
|
|
577
635
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Glutinum.Converter/GlueAST.fs"],"names":["this","value","info","ToText","Name"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/Glutinum.Converter/GlueAST.fs"],"names":["this","value","info","ToText","Name","utilityType"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YA6KcA;;iCAES,AAAAA;;mBACSC,AAAP,AAAAD;;AACD,mBAAA,SAAA,AAAAA;;mBACN;;AAJQ,mBAAA,AAAAA;;;;;YAyJZA;;AAEa,mBAAA,AAAAA;;AACPE,2BACF,AAAAF;oBAAAE;;2BAEiB;;2BACE;;2BACD;;2BACA;;2BACE;;2BACH;;2BACC;;2BACK;;2BACH;;2BACA;;2BACD;;2BAXC;;;;mBAYT;;AACN,mBAAA,AAAAF;;AACgB,mBAAA,AAAAA;;AACP,mBAAA,AAAAA;;AACN,mBAAA,AAAAG,oBAAA,AAAAH;;mBACL;;AACiB,mBAAA,AAAAA;;AACF,mBAAA,AAAAA;;AACD,mBAAA,AAAAA;;AACH,mBAAA,AAAAA;;mBACR,eAAe,AAAAI,mBAAf,AAAAJ;;AACLE,4BACD,AAAAF;AAAA,gBAAA,AAAAE;uBACe,iBAAiB,AAAAE,mBAAjB,AAAAF;;;AACd,uBAAA,AAAAE,mBAAAF;;;;AACgB,mBAAA,AAAAF;;;;;;;;;;;;;mBAYd;;AACCK,gCACJ,AAAAL;oBAAAK;;AAGqC,2BAAA,AAAAD,mBAAA,AAAAC;;AACK,2BAAA,AAAAD,mBAAA,AAAAC;;2BAFlB;;;;mBAGhB;;AAlDE,mBAAA,AAAAL","file":null,"sourcesContent":null,"sourceRoot":null}
|
|
@@ -2,19 +2,19 @@ import chalk from "chalk";
|
|
|
2
2
|
import { some } from "../fable_modules/fable-library-js.4.14.0/Option.js";
|
|
3
3
|
|
|
4
4
|
export function success(text) {
|
|
5
|
-
console.
|
|
5
|
+
console.error(some(chalk.greenBright(text)));
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
export function log(text) {
|
|
9
|
-
console.
|
|
9
|
+
console.error(some(text));
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
export function info(text) {
|
|
13
|
-
console.
|
|
13
|
+
console.error(some(chalk.blueBright(text)));
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
export function warn(text) {
|
|
17
|
-
console.
|
|
17
|
+
console.error(some(chalk.yellowBright(text)));
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
export function error(text) {
|
|
@@ -22,7 +22,7 @@ export function error(text) {
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
export function debug(text) {
|
|
25
|
-
console.
|
|
25
|
+
console.error(some(chalk.gray(text)));
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
//# sourceMappingURL=Log.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Glutinum.Converter/Log.fs"],"names":["text"],"mappings":";;;;AAMI,
|
|
1
|
+
{"version":3,"sources":["../../src/Glutinum.Converter/Log.fs"],"names":["text"],"mappings":";;;;AAMI,kBAAkB,KAAA,kBAAyBA;;;;AAEtB,kBAAiB,KAAAA;;;;AAGtC,kBAAkB,KAAA,iBAAwBA;;;;AAG1C,kBAAkB,KAAA,mBAA0BA;;;;AAG5C,kBAAkB,KAAA,gBAAuBA;;;;AAGzC,kBAAkB,KAAA,WAAkBA","file":null,"sourcesContent":null,"sourceRoot":null}
|
|
@@ -11,15 +11,15 @@ function mergeTypes(types) {
|
|
|
11
11
|
try {
|
|
12
12
|
while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
|
|
13
13
|
const typ = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
|
|
14
|
-
if (typ.tag ===
|
|
14
|
+
if (typ.tag === 5) {
|
|
15
15
|
const interfaceInfo = typ.fields[0];
|
|
16
16
|
if (indexes.has(interfaceInfo.Name)) {
|
|
17
17
|
const index = getItemFromDict(indexes, interfaceInfo.Name) | 0;
|
|
18
18
|
const existing = result[index];
|
|
19
|
-
if (existing.tag ===
|
|
19
|
+
if (existing.tag === 5) {
|
|
20
20
|
const existingInterfaceInfo = existing.fields[0];
|
|
21
21
|
const merged = new FSharpInterface(existingInterfaceInfo.Attributes, existingInterfaceInfo.Name, existingInterfaceInfo.OriginalName, existingInterfaceInfo.TypeParameters, append(existingInterfaceInfo.Members, interfaceInfo.Members), append(existingInterfaceInfo.Inheritance, interfaceInfo.Inheritance));
|
|
22
|
-
setItem(result, index, new FSharpType(
|
|
22
|
+
setItem(result, index, new FSharpType(5, [merged]));
|
|
23
23
|
}
|
|
24
24
|
else {
|
|
25
25
|
throw new Error("Invalid state");
|
|
@@ -48,16 +48,16 @@ function mergeModules(types) {
|
|
|
48
48
|
try {
|
|
49
49
|
while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
|
|
50
50
|
const typ = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
|
|
51
|
-
if (typ.tag ===
|
|
51
|
+
if (typ.tag === 4) {
|
|
52
52
|
const moduleInfo = typ.fields[0];
|
|
53
53
|
const newModuleInfo = new FSharpModule(moduleInfo.Name, moduleInfo.IsRecursive, mergeModules(mergeTypes(moduleInfo.Types)));
|
|
54
54
|
if (indexes.has(moduleInfo.Name)) {
|
|
55
55
|
const index = getItemFromDict(indexes, moduleInfo.Name) | 0;
|
|
56
56
|
const existing = result[index];
|
|
57
|
-
if (existing.tag ===
|
|
57
|
+
if (existing.tag === 4) {
|
|
58
58
|
const existingModuleInfo = existing.fields[0];
|
|
59
59
|
const merged = new FSharpModule(existingModuleInfo.Name, existingModuleInfo.IsRecursive, mergeModules(mergeTypes(append(existingModuleInfo.Types, newModuleInfo.Types))));
|
|
60
|
-
setItem(result, index, new FSharpType(
|
|
60
|
+
setItem(result, index, new FSharpType(4, [merged]));
|
|
61
61
|
}
|
|
62
62
|
else {
|
|
63
63
|
throw new Error("Invalid state");
|
|
@@ -65,7 +65,7 @@ function mergeModules(types) {
|
|
|
65
65
|
}
|
|
66
66
|
else {
|
|
67
67
|
addToDict(indexes, newModuleInfo.Name, result.length);
|
|
68
|
-
void (result.push(new FSharpType(
|
|
68
|
+
void (result.push(new FSharpType(4, [newModuleInfo])));
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
else {
|