@glutinum/cli 0.9.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.
Files changed (130) hide show
  1. package/dist/Glutinum.Converter/FsharpAST.js +57 -17
  2. package/dist/Glutinum.Converter/FsharpAST.js.map +1 -1
  3. package/dist/Glutinum.Converter/Generate.js +6 -8
  4. package/dist/Glutinum.Converter/Generate.js.map +1 -1
  5. package/dist/Glutinum.Converter/GlueAST.js +100 -23
  6. package/dist/Glutinum.Converter/GlueAST.js.map +1 -1
  7. package/dist/Glutinum.Converter/Log.js +5 -5
  8. package/dist/Glutinum.Converter/Log.js.map +1 -1
  9. package/dist/Glutinum.Converter/Merge.js +86 -0
  10. package/dist/Glutinum.Converter/Merge.js.map +1 -0
  11. package/dist/Glutinum.Converter/Printer.js +153 -73
  12. package/dist/Glutinum.Converter/Printer.js.map +1 -1
  13. package/dist/Glutinum.Converter/Read.js +5 -2
  14. package/dist/Glutinum.Converter/Read.js.map +1 -1
  15. package/dist/Glutinum.Converter/Reader/ClassDeclaration.js +1 -1
  16. package/dist/Glutinum.Converter/Reader/Declaration.js +20 -19
  17. package/dist/Glutinum.Converter/Reader/Declaration.js.map +1 -1
  18. package/dist/Glutinum.Converter/Reader/EnumDeclaration.js +4 -3
  19. package/dist/Glutinum.Converter/Reader/EnumDeclaration.js.map +1 -1
  20. package/dist/Glutinum.Converter/Reader/ExportAssignment.js +1 -1
  21. package/dist/Glutinum.Converter/Reader/FunctionDeclaration.js +2 -2
  22. package/dist/Glutinum.Converter/Reader/FunctionDeclaration.js.map +1 -1
  23. package/dist/Glutinum.Converter/Reader/IndexedAccessType.js +5 -6
  24. package/dist/Glutinum.Converter/Reader/IndexedAccessType.js.map +1 -1
  25. package/dist/Glutinum.Converter/Reader/InterfaceDeclaration.js +2 -2
  26. package/dist/Glutinum.Converter/Reader/InterfaceDeclaration.js.map +1 -1
  27. package/dist/Glutinum.Converter/Reader/MappedTypeNode.js +42 -0
  28. package/dist/Glutinum.Converter/Reader/MappedTypeNode.js.map +1 -0
  29. package/dist/Glutinum.Converter/Reader/NamedTupleMember.js +1 -1
  30. package/dist/Glutinum.Converter/Reader/Node.js +9 -6
  31. package/dist/Glutinum.Converter/Reader/Node.js.map +1 -1
  32. package/dist/Glutinum.Converter/Reader/Parameters.js +7 -4
  33. package/dist/Glutinum.Converter/Reader/Parameters.js.map +1 -1
  34. package/dist/Glutinum.Converter/Reader/Report.js +35 -0
  35. package/dist/Glutinum.Converter/Reader/Report.js.map +1 -0
  36. package/dist/Glutinum.Converter/Reader/TypeAliasDeclaration.js +5 -0
  37. package/dist/Glutinum.Converter/Reader/TypeAliasDeclaration.js.map +1 -1
  38. package/dist/Glutinum.Converter/Reader/TypeNode.js +109 -38
  39. package/dist/Glutinum.Converter/Reader/TypeNode.js.map +1 -1
  40. package/dist/Glutinum.Converter/Reader/TypeOperatorNode.js +31 -26
  41. package/dist/Glutinum.Converter/Reader/TypeOperatorNode.js.map +1 -1
  42. package/dist/Glutinum.Converter/Reader/TypeQueryNode.js +127 -0
  43. package/dist/Glutinum.Converter/Reader/TypeQueryNode.js.map +1 -0
  44. package/dist/Glutinum.Converter/Reader/TypeScriptReader.js +15 -3
  45. package/dist/Glutinum.Converter/Reader/TypeScriptReader.js.map +1 -1
  46. package/dist/Glutinum.Converter/Reader/UnionTypeNode.js +6 -9
  47. package/dist/Glutinum.Converter/Reader/UnionTypeNode.js.map +1 -1
  48. package/dist/Glutinum.Converter/Reader/Utils.js +11 -14
  49. package/dist/Glutinum.Converter/Reader/Utils.js.map +1 -1
  50. package/dist/Glutinum.Converter/Reader/VariableStatement.js +2 -2
  51. package/dist/Glutinum.Converter/Reader/VariableStatement.js.map +1 -1
  52. package/dist/Glutinum.Converter/Transform.js +483 -217
  53. package/dist/Glutinum.Converter/Transform.js.map +1 -1
  54. package/dist/Glutinum.Converter/TypeScript.Extensions.js +735 -0
  55. package/dist/Glutinum.Converter/TypeScript.Extensions.js.map +1 -0
  56. package/dist/Glutinum.Converter/Utils/Naming.js +6 -2
  57. package/dist/Glutinum.Converter/Utils/Naming.js.map +1 -1
  58. package/dist/Program.js +2 -2
  59. package/dist/Program.js.map +1 -1
  60. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AssemblyInfo.fs +19 -0
  61. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Async.fs +207 -0
  62. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Async.fs.js +127 -0
  63. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Async.fs.js.map +1 -0
  64. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncOption.fs +81 -0
  65. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncOptionCE.fs +183 -0
  66. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncOptionCE.fs.js +37 -0
  67. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncOptionCE.fs.js.map +1 -0
  68. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncOptionOp.fs +24 -0
  69. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResult.fs +439 -0
  70. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultCE.fs +217 -0
  71. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultCE.fs.js +18 -0
  72. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultCE.fs.js.map +1 -0
  73. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOp.fs +24 -0
  74. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOption.fs +75 -0
  75. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOption.fs.js +26 -0
  76. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOption.fs.js.map +1 -0
  77. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOptionCE.fs +238 -0
  78. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOptionCE.fs.js +18 -0
  79. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOptionCE.fs.js.map +1 -0
  80. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOptionOp.fs +24 -0
  81. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncValidation.fs +190 -0
  82. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncValidationCE.fs +194 -0
  83. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncValidationCE.fs.js +18 -0
  84. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncValidationCE.fs.js.map +1 -0
  85. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncValidationOp.fs +35 -0
  86. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/FsToolkit.ErrorHandling.fableproj +51 -0
  87. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/List.fs +218 -0
  88. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/List.fs.js +358 -0
  89. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/List.fs.js.map +1 -0
  90. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Option.fs +331 -0
  91. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/OptionCE.fs +186 -0
  92. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/OptionCE.fs.js +18 -0
  93. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/OptionCE.fs.js.map +1 -0
  94. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/OptionOp.fs +21 -0
  95. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Result.fs +644 -0
  96. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Result.fs.js +45 -0
  97. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Result.fs.js.map +1 -0
  98. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultCE.fs +155 -0
  99. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultCE.fs.js +23 -0
  100. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultCE.fs.js.map +1 -0
  101. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOp.fs +45 -0
  102. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOption.fs +201 -0
  103. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOption.fs.js +65 -0
  104. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOption.fs.js.map +1 -0
  105. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOptionCE.fs +146 -0
  106. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOptionCE.fs.js +18 -0
  107. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOptionCE.fs.js.map +1 -0
  108. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOptionOp.fs +57 -0
  109. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Seq.fs +19 -0
  110. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Seq.fs.js +31 -0
  111. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Seq.fs.js.map +1 -0
  112. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Shims.fs +22 -0
  113. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Shims.fs.js +18 -0
  114. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Shims.fs.js.map +1 -0
  115. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Validation.fs +172 -0
  116. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ValidationCE.fs +148 -0
  117. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ValidationCE.fs.js +18 -0
  118. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ValidationCE.fs.js.map +1 -0
  119. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ValidationOp.fs +35 -0
  120. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ValueOption.fs +151 -0
  121. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ValueOptionCE.fs +165 -0
  122. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/obj/Debug/netstandard2.1/.NETStandard,Version=v2.1.AssemblyAttributes.fs +3 -0
  123. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/obj/Debug/netstandard2.1/FsToolkit.ErrorHandling.AssemblyInfo.fs +20 -0
  124. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/obj/Release/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +3 -0
  125. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/obj/Release/netstandard2.0/FsToolkit.ErrorHandling.AssemblyInfo.fs +20 -0
  126. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/obj/Release/netstandard2.1/.NETStandard,Version=v2.1.AssemblyAttributes.fs +3 -0
  127. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/obj/Release/netstandard2.1/FsToolkit.ErrorHandling.AssemblyInfo.fs +20 -0
  128. package/dist/fable_modules/project_cracked.json +1 -1
  129. package/package.json +3 -2
  130. 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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;YAoFEF;;mBAEO;;mBACE;;mBAFH;;;;;WAkIZ,sBACiB,SACA,SACG;;;;WAIpB,sBACiB,SACA,SACG;;;;WAuCpB,wBACWK,MACMC,aACHC","file":null,"sourcesContent":null,"sourceRoot":null}
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 typescript from "typescript";
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
- import { toString } from "../fable_modules/fable-library-js.4.14.0/Types.js";
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 options = {
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();
@@ -29,7 +27,7 @@ export function generateBindingFile(filePath) {
29
27
  finally {
30
28
  disposeSafe(enumerator);
31
29
  }
32
- const transformResult = apply(readerResult.GlueAST);
30
+ const transformResult = apply(readerResult.TypeMemory, readerResult.GlueAST);
33
31
  let enumerator_1 = getEnumerator(transformResult.Warnings);
34
32
  try {
35
33
  while (enumerator_1["System.Collections.IEnumerator.MoveNext"]()) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/Glutinum.Converter/Generate.fs"],"names":["filePath","options","program","checker","sourceFile","printer","readerResult","enumerator","transformResult"],"mappings":";;;;;;;;;;AAWI,QAAwC,CAArC,cAAwBA;AACvB,wBAAS,wBAAwBA;;AAIjCC;gBAEqB;gBACI;;AAGzBC,oBAAU,0BARAF,WAQqCC;AAE/CE,oBAAU,AAAAD;AAEVE,uBAAa,AAAAF,sBAAsBF;AAEnCK,oBAAU;AAEVC,yBAAe,eAAoBH,SAAQC;AAGhCG,qBAAA,cAAA,AAAAD;AAAf;AAAA,eAAe,AAAAC;AACX,iBADW,AAAAA;;;;AAAf,oBAAeA;;AAGXC,4BAAkB,MAAgB,AAAAF;AAGtBC,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}
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 {
@@ -211,8 +212,9 @@ export function GlueMember_$reflection() {
211
212
  }
212
213
 
213
214
  export class GlueInterface extends Record {
214
- constructor(Name, Members, TypeParameters, HeritageClauses) {
215
+ constructor(FullName, Name, Members, TypeParameters, HeritageClauses) {
215
216
  super();
217
+ this.FullName = FullName;
216
218
  this.Name = Name;
217
219
  this.Members = Members;
218
220
  this.TypeParameters = TypeParameters;
@@ -221,7 +223,7 @@ export class GlueInterface extends Record {
221
223
  }
222
224
 
223
225
  export function GlueInterface_$reflection() {
224
- return record_type("Glutinum.Converter.GlueAST.GlueInterface", [], GlueInterface, () => [["Name", string_type], ["Members", list_type(GlueMember_$reflection())], ["TypeParameters", list_type(GlueTypeParameter_$reflection())], ["HeritageClauses", list_type(GlueType_$reflection())]]);
226
+ return record_type("Glutinum.Converter.GlueAST.GlueInterface", [], GlueInterface, () => [["FullName", string_type], ["Name", string_type], ["Members", list_type(GlueMember_$reflection())], ["TypeParameters", list_type(GlueTypeParameter_$reflection())], ["HeritageClauses", list_type(GlueType_$reflection())]]);
225
227
  }
226
228
 
227
229
  export class GlueTypeLiteral extends Record {
@@ -255,12 +257,12 @@ export class GluePrimitive extends Union {
255
257
  this.fields = fields;
256
258
  }
257
259
  cases() {
258
- 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"];
259
261
  }
260
262
  }
261
263
 
262
264
  export function GluePrimitive_$reflection() {
263
- return union_type("Glutinum.Converter.GlueAST.GluePrimitive", [], GluePrimitive, () => [[], [], [], [], [], [], [], [], [], [], []]);
265
+ return union_type("Glutinum.Converter.GlueAST.GluePrimitive", [], GluePrimitive, () => [[], [], [], [], [], [], [], [], [], [], [], []]);
264
266
  }
265
267
 
266
268
  export class GlueLiteral extends Union {
@@ -418,16 +420,17 @@ export function ExcludedMember_$reflection() {
418
420
  }
419
421
 
420
422
  export class GlueFunctionType extends Record {
421
- constructor(Documentation, Type, Parameters) {
423
+ constructor(Documentation, Type, TypeParameters, Parameters) {
422
424
  super();
423
425
  this.Documentation = Documentation;
424
426
  this.Type = Type;
427
+ this.TypeParameters = TypeParameters;
425
428
  this.Parameters = Parameters;
426
429
  }
427
430
  }
428
431
 
429
432
  export function GlueFunctionType_$reflection() {
430
- 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())]]);
431
434
  }
432
435
 
433
436
  export class NamedTupleType extends Record {
@@ -454,6 +457,57 @@ export function GlueRecord_$reflection() {
454
457
  return record_type("Glutinum.Converter.GlueAST.GlueRecord", [], GlueRecord, () => [["KeyType", GlueType_$reflection()], ["ValueType", GlueType_$reflection()]]);
455
458
  }
456
459
 
460
+ export class GlueUtilityType extends Union {
461
+ constructor(tag, fields) {
462
+ super();
463
+ this.tag = tag;
464
+ this.fields = fields;
465
+ }
466
+ cases() {
467
+ return ["Partial", "Record", "ReturnType", "ThisParameterType"];
468
+ }
469
+ }
470
+
471
+ export function GlueUtilityType_$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())]]);
509
+ }
510
+
457
511
  export class GlueType extends Union {
458
512
  constructor(tag, fields) {
459
513
  super();
@@ -461,12 +515,12 @@ export class GlueType extends Union {
461
515
  this.fields = fields;
462
516
  }
463
517
  cases() {
464
- return ["Discard", "Interface", "Variable", "Primitive", "Enum", "TypeAliasDeclaration", "FunctionDeclaration", "Union", "Literal", "KeyOf", "IndexedAccessType", "ModuleDeclaration", "ClassDeclaration", "TypeReference", "Partial", "Record", "Array", "FunctionType", "TypeParameter", "ThisType", "TupleType", "NamedTupleType", "IntersectionType", "TypeLiteral", "OptionalType", "Unknown", "ExportDefault", "TemplateLiteral"];
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"];
465
519
  }
466
520
  }
467
521
 
468
522
  export function GlueType_$reflection() {
469
- 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", GlueType_$reflection()]], [["Item", GlueModuleDeclaration_$reflection()]], [["Item", GlueClassDeclaration_$reflection()]], [["Item", GlueTypeReference_$reflection()]], [["Item", GlueInterface_$reflection()]], [["Item", GlueRecord_$reflection()]], [["Item", GlueType_$reflection()]], [["Item", GlueFunctionType_$reflection()]], [["Item", string_type]], [["typeName", string_type]], [["Item", list_type(GlueType_$reflection())]], [["Item", NamedTupleType_$reflection()]], [["Item", list_type(GlueMember_$reflection())]], [["Item", GlueTypeLiteral_$reflection()]], [["Item", GlueType_$reflection()]], [], [["Item", GlueType_$reflection()]], []]);
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()]]]);
470
524
  }
471
525
 
472
526
  export function GlueLiteral__ToText(this$) {
@@ -511,17 +565,19 @@ export function GlueType__get_Name(this$) {
511
565
  return "obj";
512
566
  case 10:
513
567
  return "obj";
568
+ case 11:
569
+ return "obj";
514
570
  default:
515
571
  return "string";
516
572
  }
517
573
  }
518
- case 27:
574
+ case 25:
519
575
  return "string";
520
576
  case 4:
521
577
  return this$.fields[0].Name;
522
578
  case 5:
523
579
  return this$.fields[0].Name;
524
- case 18:
580
+ case 16:
525
581
  return this$.fields[0];
526
582
  case 8:
527
583
  return GlueLiteral__ToText(this$.fields[0]);
@@ -535,23 +591,44 @@ export function GlueType__get_Name(this$) {
535
591
  return this$.fields[0].Name;
536
592
  case 13:
537
593
  return this$.fields[0].Name;
538
- case 16:
594
+ case 14:
539
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
+ }
605
+ case 17:
606
+ return this$.fields[0].Name;
540
607
  case 19:
541
- return this$.fields[0];
542
608
  case 21:
543
- case 23:
544
- case 22:
609
+ case 20:
545
610
  case 10:
546
611
  case 7:
547
- case 14:
548
- case 17:
549
- case 20:
550
- case 24:
551
- case 0:
552
- case 26:
553
612
  case 15:
554
- case 25:
613
+ case 18:
614
+ case 22:
615
+ case 0:
616
+ case 24:
617
+ case 28:
618
+ case 23:
619
+ return "obj";
620
+ case 26: {
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";
629
+ }
630
+ }
631
+ case 27:
555
632
  return "obj";
556
633
  default:
557
634
  return this$.fields[0].Name;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/Glutinum.Converter/GlueAST.fs"],"names":["this","value","info","ToText","Name"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YA0KcA;;iCAES,AAAAA;;mBACSC,AAAP,AAAAD;;AACD,mBAAA,SAAA,AAAAA;;mBACN;;AAJQ,mBAAA,AAAAA;;;;;YA0HZA;;AAEa,mBAAA,AAAAA;;AACPE,2BACF,AAAAF;oBAAAE;;2BAEiB;;2BACE;;2BACD;;2BACA;;2BACE;;2BACH;;2BACC;;2BACK;;2BACH;;2BACA;;2BAVA;;;;mBAWT;;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;;AACO,mBAAA,AAAAA;;;;;;;;;;;;;;mBAaV;;AAvCO,mBAAA,AAAAA","file":null,"sourcesContent":null,"sourceRoot":null}
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.log(some(chalk.greenBright(text)));
5
+ console.error(some(chalk.greenBright(text)));
6
6
  }
7
7
 
8
8
  export function log(text) {
9
- console.log(some(text));
9
+ console.error(some(text));
10
10
  }
11
11
 
12
12
  export function info(text) {
13
- console.info(some(chalk.blueBright(text)));
13
+ console.error(some(chalk.blueBright(text)));
14
14
  }
15
15
 
16
16
  export function warn(text) {
17
- console.warn(some(chalk.yellowBright(text)));
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.debug(chalk.gray(text));
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,gBAAgB,KAAA,kBAAyBA;;;;AAEpB,gBAAe,KAAAA;;;;AAGpC,iBAAiB,KAAA,iBAAwBA;;;;AAGzC,iBAAiB,KAAA,mBAA0BA;;;;AAG3C,kBAAkB,KAAA,gBAAuBA;;;;AAGzC,kBAAkB,WAAkBA","file":null,"sourcesContent":null,"sourceRoot":null}
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}
@@ -0,0 +1,86 @@
1
+ import { disposeSafe, getEnumerator } from "../fable_modules/fable-library-js.4.14.0/Util.js";
2
+ import { addToDict, getItemFromDict } from "../fable_modules/fable-library-js.4.14.0/MapUtil.js";
3
+ import { ofSeq, append } from "../fable_modules/fable-library-js.4.14.0/List.js";
4
+ import { FSharpModule, FSharpType, FSharpInterface } from "./FsharpAST.js";
5
+ import { setItem } from "../fable_modules/fable-library-js.4.14.0/Array.js";
6
+
7
+ function mergeTypes(types) {
8
+ const indexes = new Map([]);
9
+ const result = [];
10
+ const enumerator = getEnumerator(types);
11
+ try {
12
+ while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
13
+ const typ = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
14
+ if (typ.tag === 5) {
15
+ const interfaceInfo = typ.fields[0];
16
+ if (indexes.has(interfaceInfo.Name)) {
17
+ const index = getItemFromDict(indexes, interfaceInfo.Name) | 0;
18
+ const existing = result[index];
19
+ if (existing.tag === 5) {
20
+ const existingInterfaceInfo = existing.fields[0];
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(5, [merged]));
23
+ }
24
+ else {
25
+ throw new Error("Invalid state");
26
+ }
27
+ }
28
+ else {
29
+ addToDict(indexes, interfaceInfo.Name, result.length);
30
+ void (result.push(typ));
31
+ }
32
+ }
33
+ else {
34
+ void (result.push(typ));
35
+ }
36
+ }
37
+ }
38
+ finally {
39
+ disposeSafe(enumerator);
40
+ }
41
+ return ofSeq(result);
42
+ }
43
+
44
+ function mergeModules(types) {
45
+ const indexes = new Map([]);
46
+ const result = [];
47
+ const enumerator = getEnumerator(types);
48
+ try {
49
+ while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
50
+ const typ = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
51
+ if (typ.tag === 4) {
52
+ const moduleInfo = typ.fields[0];
53
+ const newModuleInfo = new FSharpModule(moduleInfo.Name, moduleInfo.IsRecursive, mergeModules(mergeTypes(moduleInfo.Types)));
54
+ if (indexes.has(moduleInfo.Name)) {
55
+ const index = getItemFromDict(indexes, moduleInfo.Name) | 0;
56
+ const existing = result[index];
57
+ if (existing.tag === 4) {
58
+ const existingModuleInfo = existing.fields[0];
59
+ const merged = new FSharpModule(existingModuleInfo.Name, existingModuleInfo.IsRecursive, mergeModules(mergeTypes(append(existingModuleInfo.Types, newModuleInfo.Types))));
60
+ setItem(result, index, new FSharpType(4, [merged]));
61
+ }
62
+ else {
63
+ throw new Error("Invalid state");
64
+ }
65
+ }
66
+ else {
67
+ addToDict(indexes, newModuleInfo.Name, result.length);
68
+ void (result.push(new FSharpType(4, [newModuleInfo])));
69
+ }
70
+ }
71
+ else {
72
+ void (result.push(typ));
73
+ }
74
+ }
75
+ }
76
+ finally {
77
+ disposeSafe(enumerator);
78
+ }
79
+ return ofSeq(result);
80
+ }
81
+
82
+ export function apply(types) {
83
+ return mergeModules(mergeTypes(types));
84
+ }
85
+
86
+ //# sourceMappingURL=Merge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/Glutinum.Converter/Merge.fs"],"names":["indexes","result","enumerator","types","typ","interfaceInfo","index","existing","existingInterfaceInfo","merged","moduleInfo","newModuleInfo","mergeModules","mergeTypes","existingModuleInfo"],"mappings":";;;;;;;AA4BQA,oBAAU;AACVC;AAEOC,uBAAA,cAAAC;AAAX;AAAA,eAAW,AAAAD;AAAPE,wBAAO,AAAAF;AACD,gBAAA,AAAAE;AACiBC,sCACnB,AAAAD;AAAA,oBAAG,AAAAJ,YAAoB,AAAAK;AACfC,kCAAQ,gBAAAN,SAAS,AAAAK;AACjBE,qCAAW,AAAAN,OAAQK;AAEjB,wBAAA,AAAAC;AACiBC,sDACf,AAAAD;AAAAE,uCACA,oBAAA,AAAAD,kCAAA,AAAAA,4BAAA,AAAAA,oCAAA,AAAAA,sCAEQ,OAAA,AAAAA,\u002BBACE,AAAAH,wBAEF,OAAA,AAAAG,mCACE,AAAAH;AAGd,gCAAAJ,QAAQK,OAAU,mBAAqBG;;;AACpC,wCAAS;;;;AAEhB,8BAAAT,SAAY,AAAAK,oBAAoB,AAAAJ;AAChC,0BAAAA,YAAWG;;;;AAEZ,sBAAAH,YAAWG;;;;;AAzBtB,oBAAWF;;AA2BD,WAAA,MAAVD;;;;AAGID,oBAAU;AACVC;AAEOC,uBAAA,cAAAC;AAAX;AAAA,eAAW,AAAAD;AAAPE,wBAAO,AAAAF;AACD,gBAAA,AAAAE;AACcM,mCAEZ,AAAAN;AAAAO,sCACA,iBAAA,AAAAD,iBAAA,AAAAA,wBAC8C,AAAAE,aAAd,AAAAC,WAApB,AAAAH;AAGhB,oBAAG,AAAAV,YAAoB,AAAAU;AACfJ,kCAAQ,gBAAAN,SAAS,AAAAU;AACjBH,qCAAW,AAAAN,OAAQK;AAEjB,wBAAA,AAAAC;AACcO,mDACZ,AAAAP;AAAAE,uCACA,iBAAA,AAAAK,yBAAA,AAAAA,gCAIW,AAAAF,aADA,AAAAC,WADH,OAAA,AAAAC,0BAA2B,AAAAH;AAKvC,gCAAAV,QAAQK,OAAU,mBAAkBG;;;AACjC,wCAAS;;;;AAEhB,8BAAAT,SAAY,AAAAW,oBAAoB,AAAAV;AAChC,0BAAAA,YAA4B,mBAAjBU;;;;AAEZ,sBAAAV,YAAWG;;;;;AA7BtB,oBAAWF;;AA\u002BBD,WAAA,MAAVD;;;;WAEwD,AAAAW,aAAd,AAAAC,WAATV","file":null,"sourcesContent":null,"sourceRoot":null}