@glutinum/cli 0.10.0 → 0.12.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 (132) hide show
  1. package/README.md +48 -0
  2. package/dist/Glutinum.Converter/FsharpAST.js +76 -21
  3. package/dist/Glutinum.Converter/FsharpAST.js.map +1 -1
  4. package/dist/Glutinum.Converter/Generate.js +5 -7
  5. package/dist/Glutinum.Converter/Generate.js.map +1 -1
  6. package/dist/Glutinum.Converter/GlueAST.js +90 -14
  7. package/dist/Glutinum.Converter/GlueAST.js.map +1 -1
  8. package/dist/Glutinum.Converter/Log.js +5 -5
  9. package/dist/Glutinum.Converter/Log.js.map +1 -1
  10. package/dist/Glutinum.Converter/Merge.js +7 -7
  11. package/dist/Glutinum.Converter/Merge.js.map +1 -1
  12. package/dist/Glutinum.Converter/Printer.js +203 -106
  13. package/dist/Glutinum.Converter/Printer.js.map +1 -1
  14. package/dist/Glutinum.Converter/Read.js.map +1 -1
  15. package/dist/Glutinum.Converter/Reader/ClassDeclaration.js.map +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/Documentation.js.map +1 -1
  19. package/dist/Glutinum.Converter/Reader/EnumDeclaration.js +4 -3
  20. package/dist/Glutinum.Converter/Reader/EnumDeclaration.js.map +1 -1
  21. package/dist/Glutinum.Converter/Reader/ExportAssignment.js.map +1 -1
  22. package/dist/Glutinum.Converter/Reader/FunctionDeclaration.js +2 -2
  23. package/dist/Glutinum.Converter/Reader/FunctionDeclaration.js.map +1 -1
  24. package/dist/Glutinum.Converter/Reader/IndexedAccessType.js +5 -6
  25. package/dist/Glutinum.Converter/Reader/IndexedAccessType.js.map +1 -1
  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/ModuleDeclaration.js.map +1 -1
  30. package/dist/Glutinum.Converter/Reader/NamedTupleMember.js.map +1 -1
  31. package/dist/Glutinum.Converter/Reader/Node.js +8 -5
  32. package/dist/Glutinum.Converter/Reader/Node.js.map +1 -1
  33. package/dist/Glutinum.Converter/Reader/Parameters.js +7 -4
  34. package/dist/Glutinum.Converter/Reader/Parameters.js.map +1 -1
  35. package/dist/Glutinum.Converter/Reader/Report.js +35 -0
  36. package/dist/Glutinum.Converter/Reader/Report.js.map +1 -0
  37. package/dist/Glutinum.Converter/Reader/TypeAliasDeclaration.js +5 -0
  38. package/dist/Glutinum.Converter/Reader/TypeAliasDeclaration.js.map +1 -1
  39. package/dist/Glutinum.Converter/Reader/TypeNode.js +250 -69
  40. package/dist/Glutinum.Converter/Reader/TypeNode.js.map +1 -1
  41. package/dist/Glutinum.Converter/Reader/TypeOperatorNode.js +31 -26
  42. package/dist/Glutinum.Converter/Reader/TypeOperatorNode.js.map +1 -1
  43. package/dist/Glutinum.Converter/Reader/TypeParameters.js.map +1 -1
  44. package/dist/Glutinum.Converter/Reader/TypeQueryNode.js +127 -0
  45. package/dist/Glutinum.Converter/Reader/TypeQueryNode.js.map +1 -0
  46. package/dist/Glutinum.Converter/Reader/TypeScriptReader.js +7 -2
  47. package/dist/Glutinum.Converter/Reader/TypeScriptReader.js.map +1 -1
  48. package/dist/Glutinum.Converter/Reader/UnionTypeNode.js +6 -9
  49. package/dist/Glutinum.Converter/Reader/UnionTypeNode.js.map +1 -1
  50. package/dist/Glutinum.Converter/Reader/Utils.js +35 -13
  51. package/dist/Glutinum.Converter/Reader/Utils.js.map +1 -1
  52. package/dist/Glutinum.Converter/Reader/VariableStatement.js +2 -2
  53. package/dist/Glutinum.Converter/Reader/VariableStatement.js.map +1 -1
  54. package/dist/Glutinum.Converter/Transform.js +614 -211
  55. package/dist/Glutinum.Converter/Transform.js.map +1 -1
  56. package/dist/Glutinum.Converter/TypeScript.Extensions.js +745 -0
  57. package/dist/Glutinum.Converter/TypeScript.Extensions.js.map +1 -0
  58. package/dist/Glutinum.Converter/Utils/Naming.js +6 -2
  59. package/dist/Glutinum.Converter/Utils/Naming.js.map +1 -1
  60. package/dist/Program.js +2 -2
  61. package/dist/Program.js.map +1 -1
  62. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AssemblyInfo.fs +19 -0
  63. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Async.fs +207 -0
  64. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Async.fs.js +127 -0
  65. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Async.fs.js.map +1 -0
  66. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncOption.fs +81 -0
  67. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncOptionCE.fs +183 -0
  68. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncOptionCE.fs.js +37 -0
  69. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncOptionCE.fs.js.map +1 -0
  70. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncOptionOp.fs +24 -0
  71. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResult.fs +439 -0
  72. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultCE.fs +217 -0
  73. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultCE.fs.js +18 -0
  74. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultCE.fs.js.map +1 -0
  75. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOp.fs +24 -0
  76. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOption.fs +75 -0
  77. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOption.fs.js +26 -0
  78. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOption.fs.js.map +1 -0
  79. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOptionCE.fs +238 -0
  80. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOptionCE.fs.js +18 -0
  81. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOptionCE.fs.js.map +1 -0
  82. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncResultOptionOp.fs +24 -0
  83. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncValidation.fs +190 -0
  84. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncValidationCE.fs +194 -0
  85. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncValidationCE.fs.js +18 -0
  86. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncValidationCE.fs.js.map +1 -0
  87. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/AsyncValidationOp.fs +35 -0
  88. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/FsToolkit.ErrorHandling.fableproj +51 -0
  89. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/List.fs +218 -0
  90. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/List.fs.js +358 -0
  91. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/List.fs.js.map +1 -0
  92. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Option.fs +331 -0
  93. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/OptionCE.fs +186 -0
  94. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/OptionCE.fs.js +18 -0
  95. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/OptionCE.fs.js.map +1 -0
  96. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/OptionOp.fs +21 -0
  97. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Result.fs +644 -0
  98. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Result.fs.js +45 -0
  99. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Result.fs.js.map +1 -0
  100. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultCE.fs +155 -0
  101. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultCE.fs.js +23 -0
  102. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultCE.fs.js.map +1 -0
  103. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOp.fs +45 -0
  104. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOption.fs +201 -0
  105. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOption.fs.js +65 -0
  106. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOption.fs.js.map +1 -0
  107. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOptionCE.fs +146 -0
  108. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOptionCE.fs.js +18 -0
  109. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOptionCE.fs.js.map +1 -0
  110. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ResultOptionOp.fs +57 -0
  111. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Seq.fs +19 -0
  112. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Seq.fs.js +31 -0
  113. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Seq.fs.js.map +1 -0
  114. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Shims.fs +22 -0
  115. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Shims.fs.js +18 -0
  116. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Shims.fs.js.map +1 -0
  117. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/Validation.fs +172 -0
  118. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ValidationCE.fs +148 -0
  119. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ValidationCE.fs.js +18 -0
  120. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ValidationCE.fs.js.map +1 -0
  121. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ValidationOp.fs +35 -0
  122. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ValueOption.fs +151 -0
  123. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/ValueOptionCE.fs +165 -0
  124. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/obj/Debug/netstandard2.1/.NETStandard,Version=v2.1.AssemblyAttributes.fs +3 -0
  125. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/obj/Debug/netstandard2.1/FsToolkit.ErrorHandling.AssemblyInfo.fs +20 -0
  126. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/obj/Release/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +3 -0
  127. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/obj/Release/netstandard2.0/FsToolkit.ErrorHandling.AssemblyInfo.fs +20 -0
  128. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/obj/Release/netstandard2.1/.NETStandard,Version=v2.1.AssemblyAttributes.fs +3 -0
  129. package/dist/fable_modules/FsToolkit.ErrorHandling.4.16.0/obj/Release/netstandard2.1/FsToolkit.ErrorHandling.AssemblyInfo.fs +20 -0
  130. package/dist/fable_modules/project_cracked.json +1 -1
  131. package/package.json +3 -2
  132. package/src/Glutinum.Converter/js/bootstrap.js +16 -0
package/README.md CHANGED
@@ -2,6 +2,52 @@
2
2
 
3
3
  This is a compiler from `.d.ts` to F# bindings for [Fable](https://fable.io/).
4
4
 
5
+ ## Getting Started
6
+
7
+ Glutinum is delivered both as a CLI tool and web interface.
8
+
9
+ ### Web Interface
10
+
11
+ The web interface is available [here](https://glutinum.net/).
12
+
13
+ It is a simple and easy-to-use tool, allowing you to convert `.d.ts` files to F# bindings directly from your browser without installing anything.
14
+
15
+ This is also the tool that you should use to report issues if possible.
16
+
17
+ 💡 The web interface is more often updated than the NPM package
18
+
19
+ ### CLI via NPM
20
+
21
+ The CLI can be invoked using `npx`:
22
+
23
+ ```bash
24
+ npx @glutinum/cli --help
25
+ ```
26
+
27
+ or installed locally:
28
+
29
+ ```bash
30
+ npm i -D @glutinum/cli
31
+ ```
32
+
33
+ ### Usage
34
+
35
+ ```bash
36
+ # Without installing the package
37
+ npx @glutinum/cli ./node_modules/my-lib/index.d.ts --out-file ./Glutinum.MyLib.fs
38
+ # Or with the installed package
39
+ npx glue ./node_modules/my-lib/index.d.ts --out-file ./Glutinum.MyLib.fs
40
+ ```
41
+
42
+ or if you prefer you can pipe the output to a file:
43
+
44
+ ```bash
45
+ # Without installing the package
46
+ npx @glutinum/cli ./node_modules/my-lib/index.d.ts > ./Glutinum.MyLib.fs
47
+ # Or with the installed package
48
+ npx glue ./node_modules/my-lib/index.d.ts > ./Glutinum.MyLib.fs
49
+ ```
50
+
5
51
  ## Contributing
6
52
 
7
53
  Glutinum.CLI use `./build.sh` or `./build.bat` as a build script.
@@ -71,6 +117,8 @@ type FSharpAttribute =
71
117
  | EmitIndexer
72
118
  ```
73
119
 
120
+ You can find more information about the internals of Glutinum and the developer workflow by watching the following [Amplifying F# session.](https://www.youtube.com/watch?v=Bq00D2xsa7Q)
121
+
74
122
  ### Tests
75
123
 
76
124
  #### Vitest
@@ -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();
@@ -394,7 +379,7 @@ export function FSharpPrimitive_$reflection() {
394
379
  return union_type("Glutinum.Converter.FSharpAST.FSharpPrimitive", [], FSharpPrimitive, () => [[], [], [], [], [], [], []]);
395
380
  }
396
381
 
397
- export class FSharpTypeParameter extends Record {
382
+ export class FSharpTypeParameterInfo extends Record {
398
383
  constructor(Name, Constraint, Default) {
399
384
  super();
400
385
  this.Name = Name;
@@ -403,8 +388,23 @@ export class FSharpTypeParameter extends Record {
403
388
  }
404
389
  }
405
390
 
391
+ export function FSharpTypeParameterInfo_$reflection() {
392
+ return record_type("Glutinum.Converter.FSharpAST.FSharpTypeParameterInfo", [], FSharpTypeParameterInfo, () => [["Name", string_type], ["Constraint", option_type(FSharpType_$reflection())], ["Default", option_type(FSharpType_$reflection())]]);
393
+ }
394
+
395
+ export class FSharpTypeParameter extends Union {
396
+ constructor(tag, fields) {
397
+ super();
398
+ this.tag = tag;
399
+ this.fields = fields;
400
+ }
401
+ cases() {
402
+ return ["FSharpType", "FSharpTypeParameter"];
403
+ }
404
+ }
405
+
406
406
  export function FSharpTypeParameter_$reflection() {
407
- return record_type("Glutinum.Converter.FSharpAST.FSharpTypeParameter", [], FSharpTypeParameter, () => [["Name", string_type], ["Constraint", option_type(FSharpType_$reflection())], ["Default", option_type(FSharpType_$reflection())]]);
407
+ return union_type("Glutinum.Converter.FSharpAST.FSharpTypeParameter", [], FSharpTypeParameter, () => [[["Item", FSharpType_$reflection()]], [["Item", FSharpTypeParameterInfo_$reflection()]]]);
408
408
  }
409
409
 
410
410
  export class FSharpTypeAlias extends Record {
@@ -448,6 +448,61 @@ export function FSharpFunctionType_$reflection() {
448
448
  return record_type("Glutinum.Converter.FSharpAST.FSharpFunctionType", [], FSharpFunctionType, () => [["Parameters", list_type(FSharpParameter_$reflection())], ["ReturnType", FSharpType_$reflection()]]);
449
449
  }
450
450
 
451
+ export class FSharpSingleErasedCaseUnion extends Record {
452
+ constructor(Attributes, Name, XmlDoc, TypeParameter) {
453
+ super();
454
+ this.Attributes = Attributes;
455
+ this.Name = Name;
456
+ this.XmlDoc = XmlDoc;
457
+ this.TypeParameter = TypeParameter;
458
+ }
459
+ }
460
+
461
+ export function FSharpSingleErasedCaseUnion_$reflection() {
462
+ return record_type("Glutinum.Converter.FSharpAST.FSharpSingleErasedCaseUnion", [], FSharpSingleErasedCaseUnion, () => [["Attributes", list_type(FSharpAttribute_$reflection())], ["Name", string_type], ["XmlDoc", list_type(FSharpXmlDoc_$reflection())], ["TypeParameter", FSharpTypeParameter_$reflection()]]);
463
+ }
464
+
465
+ export class FSharpThisType extends Record {
466
+ constructor(Name, TypeParameters) {
467
+ super();
468
+ this.Name = Name;
469
+ this.TypeParameters = TypeParameters;
470
+ }
471
+ }
472
+
473
+ export function FSharpThisType_$reflection() {
474
+ return record_type("Glutinum.Converter.FSharpAST.FSharpThisType", [], FSharpThisType, () => [["Name", string_type], ["TypeParameters", list_type(FSharpTypeParameter_$reflection())]]);
475
+ }
476
+
477
+ export class FSharpJSApi extends Union {
478
+ constructor(Item) {
479
+ super();
480
+ this.tag = 0;
481
+ this.fields = [Item];
482
+ }
483
+ cases() {
484
+ return ["ReadonlyArray"];
485
+ }
486
+ }
487
+
488
+ export function FSharpJSApi_$reflection() {
489
+ return union_type("Glutinum.Converter.FSharpAST.FSharpJSApi", [], FSharpJSApi, () => [[["Item", FSharpType_$reflection()]]]);
490
+ }
491
+
492
+ export class FSharpDelegate extends Record {
493
+ constructor(Name, TypeParameters, Parameters, ReturnType) {
494
+ super();
495
+ this.Name = Name;
496
+ this.TypeParameters = TypeParameters;
497
+ this.Parameters = Parameters;
498
+ this.ReturnType = ReturnType;
499
+ }
500
+ }
501
+
502
+ export function FSharpDelegate_$reflection() {
503
+ return record_type("Glutinum.Converter.FSharpAST.FSharpDelegate", [], FSharpDelegate, () => [["Name", string_type], ["TypeParameters", list_type(FSharpTypeParameter_$reflection())], ["Parameters", list_type(FSharpParameter_$reflection())], ["ReturnType", FSharpType_$reflection()]]);
504
+ }
505
+
451
506
  export class FSharpType extends Union {
452
507
  constructor(tag, fields) {
453
508
  super();
@@ -455,12 +510,12 @@ export class FSharpType extends Union {
455
510
  this.fields = fields;
456
511
  }
457
512
  cases() {
458
- return ["Enum", "Union", "Option", "Module", "Interface", "Unsupported", "Mapped", "Primitive", "TypeAlias", "Discard", "TypeReference", "Tuple", "TypeParameter", "ResizeArray", "ThisType", "Function", "Class", "Object"];
513
+ return ["Enum", "Union", "SingleErasedCaseUnion", "Option", "Module", "Interface", "Unsupported", "Mapped", "Primitive", "TypeAlias", "Discard", "TypeReference", "Tuple", "TypeParameter", "ResizeArray", "ThisType", "Function", "Class", "Object", "JSApi", "Delegate"];
459
514
  }
460
515
  }
461
516
 
462
517
  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()]], []]);
518
+ 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
519
  }
465
520
 
466
521
  export class FSharpOutFile extends Record {
@@ -543,8 +598,8 @@ export function FSharpConstructor_get_EmptyPrivate() {
543
598
  return new FSharpConstructor(empty(), empty(), new FSharpAccessibility(1, []));
544
599
  }
545
600
 
546
- export function FSharpTypeParameter_Create_Z6CFD3565(name, constraint_, default_) {
547
- return new FSharpTypeParameter(name, constraint_, default_);
601
+ export function FSharpTypeParameterInfo_Create_Z6CFD3565(name, constraint_, default_) {
602
+ return new FSharpTypeParameterInfo(name, constraint_, default_);
548
603
  }
549
604
 
550
605
  //# sourceMappingURL=FsharpAST.js.map
@@ -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;;;;WAqCpB,4BACWK,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();
@@ -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,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}
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,4BAAkB,MAAgB,AAAAF,yBAAwB,AAAAA;AAG9CC,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,6 +1,8 @@
1
1
  import { toString, Union, Record } from "../fable_modules/fable-library-js.4.14.0/Types.js";
2
2
  import { float64_type, int32_type, bool_type, union_type, list_type, record_type, option_type, string_type } from "../fable_modules/fable-library-js.4.14.0/Reflection.js";
3
3
  import { int32ToString } from "../fable_modules/fable-library-js.4.14.0/Util.js";
4
+ import { join } from "../fable_modules/fable-library-js.4.14.0/String.js";
5
+ import { map } from "../fable_modules/fable-library-js.4.14.0/List.js";
4
6
 
5
7
  export class GlueCommentParam extends Record {
6
8
  constructor(Name, Content) {
@@ -158,15 +160,16 @@ export function GlueGetAccessor_$reflection() {
158
160
  }
159
161
 
160
162
  export class GlueIndexSignature extends Record {
161
- constructor(Parameters, Type) {
163
+ constructor(Parameters, Type, IsReadOnly) {
162
164
  super();
163
165
  this.Parameters = Parameters;
164
166
  this.Type = Type;
167
+ this.IsReadOnly = IsReadOnly;
165
168
  }
166
169
  }
167
170
 
168
171
  export function GlueIndexSignature_$reflection() {
169
- return record_type("Glutinum.Converter.GlueAST.GlueIndexSignature", [], GlueIndexSignature, () => [["Parameters", list_type(GlueParameter_$reflection())], ["Type", GlueType_$reflection()]]);
172
+ return record_type("Glutinum.Converter.GlueAST.GlueIndexSignature", [], GlueIndexSignature, () => [["Parameters", list_type(GlueParameter_$reflection())], ["Type", GlueType_$reflection()], ["IsReadOnly", bool_type]]);
170
173
  }
171
174
 
172
175
  export class GlueMethodSignature extends Record {
@@ -256,12 +259,12 @@ export class GluePrimitive extends Union {
256
259
  this.fields = fields;
257
260
  }
258
261
  cases() {
259
- return ["String", "Int", "Float", "Bool", "Unit", "Number", "Any", "Null", "Undefined", "Object", "Symbol"];
262
+ return ["String", "Int", "Float", "Bool", "Unit", "Number", "Any", "Null", "Undefined", "Object", "Symbol", "Never"];
260
263
  }
261
264
  }
262
265
 
263
266
  export function GluePrimitive_$reflection() {
264
- return union_type("Glutinum.Converter.GlueAST.GluePrimitive", [], GluePrimitive, () => [[], [], [], [], [], [], [], [], [], [], []]);
267
+ return union_type("Glutinum.Converter.GlueAST.GluePrimitive", [], GluePrimitive, () => [[], [], [], [], [], [], [], [], [], [], [], []]);
265
268
  }
266
269
 
267
270
  export class GlueLiteral extends Union {
@@ -419,16 +422,17 @@ export function ExcludedMember_$reflection() {
419
422
  }
420
423
 
421
424
  export class GlueFunctionType extends Record {
422
- constructor(Documentation, Type, Parameters) {
425
+ constructor(Documentation, Type, TypeParameters, Parameters) {
423
426
  super();
424
427
  this.Documentation = Documentation;
425
428
  this.Type = Type;
429
+ this.TypeParameters = TypeParameters;
426
430
  this.Parameters = Parameters;
427
431
  }
428
432
  }
429
433
 
430
434
  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())]]);
435
+ 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
436
  }
433
437
 
434
438
  export class NamedTupleType extends Record {
@@ -455,6 +459,21 @@ export function GlueRecord_$reflection() {
455
459
  return record_type("Glutinum.Converter.GlueAST.GlueRecord", [], GlueRecord, () => [["KeyType", GlueType_$reflection()], ["ValueType", GlueType_$reflection()]]);
456
460
  }
457
461
 
462
+ export class GlueReadonly extends Union {
463
+ constructor(tag, fields) {
464
+ super();
465
+ this.tag = tag;
466
+ this.fields = fields;
467
+ }
468
+ cases() {
469
+ return ["Members", "Union"];
470
+ }
471
+ }
472
+
473
+ export function GlueReadonly_$reflection() {
474
+ return union_type("Glutinum.Converter.GlueAST.GlueReadonly", [], GlueReadonly, () => [[["Item", list_type(GlueMember_$reflection())]], [["Item", list_type(GlueInterface_$reflection())]]]);
475
+ }
476
+
458
477
  export class GlueUtilityType extends Union {
459
478
  constructor(tag, fields) {
460
479
  super();
@@ -462,12 +481,48 @@ export class GlueUtilityType extends Union {
462
481
  this.fields = fields;
463
482
  }
464
483
  cases() {
465
- return ["Partial", "Record"];
484
+ return ["Partial", "Record", "ReturnType", "ThisParameterType", "Omit", "Readonly"];
466
485
  }
467
486
  }
468
487
 
469
488
  export function GlueUtilityType_$reflection() {
470
- return union_type("Glutinum.Converter.GlueAST.GlueUtilityType", [], GlueUtilityType, () => [[["Item", GlueInterface_$reflection()]], [["Item", GlueRecord_$reflection()]]]);
489
+ return union_type("Glutinum.Converter.GlueAST.GlueUtilityType", [], GlueUtilityType, () => [[["Item", GlueInterface_$reflection()]], [["Item", GlueRecord_$reflection()]], [["Item", GlueType_$reflection()]], [["Item", GlueType_$reflection()]], [["Item", list_type(GlueMember_$reflection())]], [["Item", GlueReadonly_$reflection()]]]);
490
+ }
491
+
492
+ export class GlueMappedType extends Record {
493
+ constructor(TypeParameter, Type) {
494
+ super();
495
+ this.TypeParameter = TypeParameter;
496
+ this.Type = Type;
497
+ }
498
+ }
499
+
500
+ export function GlueMappedType_$reflection() {
501
+ return record_type("Glutinum.Converter.GlueAST.GlueMappedType", [], GlueMappedType, () => [["TypeParameter", GlueTypeParameter_$reflection()], ["Type", option_type(GlueType_$reflection())]]);
502
+ }
503
+
504
+ export class GlueIndexedAccessType extends Record {
505
+ constructor(IndexType, ObjectType) {
506
+ super();
507
+ this.IndexType = IndexType;
508
+ this.ObjectType = ObjectType;
509
+ }
510
+ }
511
+
512
+ export function GlueIndexedAccessType_$reflection() {
513
+ return record_type("Glutinum.Converter.GlueAST.GlueIndexedAccessType", [], GlueIndexedAccessType, () => [["IndexType", GlueType_$reflection()], ["ObjectType", GlueType_$reflection()]]);
514
+ }
515
+
516
+ export class GlueThisType extends Record {
517
+ constructor(Name, TypeParameters) {
518
+ super();
519
+ this.Name = Name;
520
+ this.TypeParameters = TypeParameters;
521
+ }
522
+ }
523
+
524
+ export function GlueThisType_$reflection() {
525
+ return record_type("Glutinum.Converter.GlueAST.GlueThisType", [], GlueThisType, () => [["Name", string_type], ["TypeParameters", list_type(GlueTypeParameter_$reflection())]]);
471
526
  }
472
527
 
473
528
  export class GlueType extends Union {
@@ -477,12 +532,12 @@ export class GlueType extends Union {
477
532
  this.fields = fields;
478
533
  }
479
534
  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"];
535
+ 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
536
  }
482
537
  }
483
538
 
484
539
  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", GlueType_$reflection()]], [["Item", GlueModuleDeclaration_$reflection()]], [["Item", GlueClassDeclaration_$reflection()]], [["Item", GlueTypeReference_$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()]], [], [["Item", GlueUtilityType_$reflection()]]]);
540
+ 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
541
  }
487
542
 
488
543
  export function GlueLiteral__ToText(this$) {
@@ -527,6 +582,8 @@ export function GlueType__get_Name(this$) {
527
582
  return "obj";
528
583
  case 10:
529
584
  return "obj";
585
+ case 11:
586
+ return "obj";
530
587
  default:
531
588
  return "string";
532
589
  }
@@ -553,25 +610,44 @@ export function GlueType__get_Name(this$) {
553
610
  return this$.fields[0].Name;
554
611
  case 14:
555
612
  return `ResizeArray<${GlueType__get_Name(this$.fields[0])}>`;
613
+ case 29: {
614
+ const info_11 = this$.fields[0];
615
+ if (info_11.tag === 14) {
616
+ return `ReadonlyArray<${GlueType__get_Name(info_11.fields[0])}>`;
617
+ }
618
+ else {
619
+ return GlueType__get_Name(info_11);
620
+ }
621
+ }
556
622
  case 17:
557
- return this$.fields[0];
623
+ return this$.fields[0].Name;
624
+ case 7:
625
+ return join(" | ", map(GlueType__get_Name, this$.fields[0].fields[0]));
558
626
  case 19:
559
627
  case 21:
560
628
  case 20:
561
629
  case 10:
562
- case 7:
563
630
  case 15:
564
631
  case 18:
565
632
  case 22:
566
633
  case 0:
567
634
  case 24:
635
+ case 28:
568
636
  case 23:
569
637
  return "obj";
570
638
  case 26: {
571
- if (this$.fields[0].tag === 1) {
639
+ const utilityType = this$.fields[0];
640
+ switch (utilityType.tag) {
641
+ case 2:
642
+ return GlueType__get_Name(utilityType.fields[0]);
643
+ case 3:
644
+ return GlueType__get_Name(utilityType.fields[0]);
645
+ default:
646
+ return "obj";
572
647
  }
573
- return "obj";
574
648
  }
649
+ case 27:
650
+ return "obj";
575
651
  default:
576
652
  return this$.fields[0].Name;
577
653
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/Glutinum.Converter/GlueAST.fs"],"names":["this","value","info","ToText","Name"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YA2KcA;;iCAES,AAAAA;;mBACSC,AAAP,AAAAD;;AACD,mBAAA,SAAA,AAAAA;;mBACN;;AAJQ,mBAAA,AAAAA;;;;;YA\u002BHZA;;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;;;;;;;;;;;;mBAWV;;AAEH,gBAAA,AAAAA;;mBAEwB;;;AAzCd,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;;;;;YAgKZA;;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;;AAC4C,mBAAA,KAAe,OAA7C,IAAmBI,oBAA5B,AAAAJ;;;;;;;;;;;;mBAWnB;;AACCK,gCACJ,AAAAL;oBAAAK;;AAKqC,2BAAA,AAAAD,mBAAA,AAAAC;;AACK,2BAAA,AAAAD,mBAAA,AAAAC;;2BAFlB;;;;mBAGhB;;AApDE,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}
@@ -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 === 4) {
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 === 4) {
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(4, [merged]));
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 === 3) {
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 === 3) {
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(3, [merged]));
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(3, [newModuleInfo])));
68
+ void (result.push(new FSharpType(4, [newModuleInfo])));
69
69
  }
70
70
  }
71
71
  else {
@@ -1 +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}
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,sCACc,OAAA,AAAAA,\u002BBAAgC,AAAAH,wBAEtC,OAAA,AAAAG,mCAAoC,AAAAH;AAGhD,gCAAAJ,QAAQK,OAAU,mBAAqBG;;;AACpC,wCAAS;;;;AAEhB,8BAAAT,SAAY,AAAAK,oBAAoB,AAAAJ;AAChC,0BAAAA,YAAWG;;;;AAEZ,sBAAAH,YAAWG;;;;;AAtBtB,oBAAWF;;AAwBD,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}