@glutinum/cli 0.4.0 → 0.6.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 (173) hide show
  1. package/README.md +74 -7
  2. package/dist/Glutinum.Converter/FsharpAST.js +152 -20
  3. package/dist/Glutinum.Converter/FsharpAST.js.map +1 -1
  4. package/dist/Glutinum.Converter/Generate.js +17 -5
  5. package/dist/Glutinum.Converter/Generate.js.map +1 -1
  6. package/dist/Glutinum.Converter/GlueAST.js +110 -17
  7. package/dist/Glutinum.Converter/GlueAST.js.map +1 -1
  8. package/dist/Glutinum.Converter/Log.js +9 -5
  9. package/dist/Glutinum.Converter/Log.js.map +1 -1
  10. package/dist/Glutinum.Converter/Printer.js +486 -132
  11. package/dist/Glutinum.Converter/Printer.js.map +1 -1
  12. package/dist/Glutinum.Converter/Read.js +8 -5
  13. package/dist/Glutinum.Converter/Read.js.map +1 -1
  14. package/dist/Glutinum.Converter/Reader/ClassDeclaration.js +14 -6
  15. package/dist/Glutinum.Converter/Reader/ClassDeclaration.js.map +1 -1
  16. package/dist/Glutinum.Converter/Reader/Declaration.js +50 -0
  17. package/dist/Glutinum.Converter/Reader/Declaration.js.map +1 -0
  18. package/dist/Glutinum.Converter/Reader/Documentation.js +119 -0
  19. package/dist/Glutinum.Converter/Reader/Documentation.js.map +1 -0
  20. package/dist/Glutinum.Converter/Reader/EnumDeclaration.js +9 -8
  21. package/dist/Glutinum.Converter/Reader/EnumDeclaration.js.map +1 -1
  22. package/dist/Glutinum.Converter/Reader/ExportAssignment.js +42 -0
  23. package/dist/Glutinum.Converter/Reader/ExportAssignment.js.map +1 -0
  24. package/dist/Glutinum.Converter/Reader/FunctionDeclaration.js +13 -4
  25. package/dist/Glutinum.Converter/Reader/FunctionDeclaration.js.map +1 -1
  26. package/dist/Glutinum.Converter/Reader/IndexedAccessType.js +4 -2
  27. package/dist/Glutinum.Converter/Reader/IndexedAccessType.js.map +1 -1
  28. package/dist/Glutinum.Converter/Reader/InterfaceDeclaration.js +3 -3
  29. package/dist/Glutinum.Converter/Reader/InterfaceDeclaration.js.map +1 -1
  30. package/dist/Glutinum.Converter/Reader/ModuleDeclaration.js +3 -3
  31. package/dist/Glutinum.Converter/Reader/ModuleDeclaration.js.map +1 -1
  32. package/dist/Glutinum.Converter/Reader/NamedTupleMember.js +7 -0
  33. package/dist/Glutinum.Converter/Reader/NamedTupleMember.js.map +1 -0
  34. package/dist/Glutinum.Converter/Reader/Node.js +23 -11
  35. package/dist/Glutinum.Converter/Reader/Node.js.map +1 -1
  36. package/dist/Glutinum.Converter/Reader/Parameters.js +3 -3
  37. package/dist/Glutinum.Converter/Reader/Parameters.js.map +1 -1
  38. package/dist/Glutinum.Converter/Reader/TypeAliasDeclaration.js +5 -5
  39. package/dist/Glutinum.Converter/Reader/TypeAliasDeclaration.js.map +1 -1
  40. package/dist/Glutinum.Converter/Reader/TypeNode.js +160 -18
  41. package/dist/Glutinum.Converter/Reader/TypeNode.js.map +1 -1
  42. package/dist/Glutinum.Converter/Reader/TypeOperatorNode.js +32 -21
  43. package/dist/Glutinum.Converter/Reader/TypeOperatorNode.js.map +1 -1
  44. package/dist/Glutinum.Converter/Reader/TypeParameters.js +2 -2
  45. package/dist/Glutinum.Converter/Reader/TypeScriptReader.js +107 -77
  46. package/dist/Glutinum.Converter/Reader/TypeScriptReader.js.map +1 -1
  47. package/dist/Glutinum.Converter/Reader/UnionTypeNode.js +14 -8
  48. package/dist/Glutinum.Converter/Reader/UnionTypeNode.js.map +1 -1
  49. package/dist/Glutinum.Converter/Reader/Utils.js +73 -7
  50. package/dist/Glutinum.Converter/Reader/Utils.js.map +1 -1
  51. package/dist/Glutinum.Converter/Reader/VariableStatement.js +13 -7
  52. package/dist/Glutinum.Converter/Reader/VariableStatement.js.map +1 -1
  53. package/dist/Glutinum.Converter/Transform.js +599 -203
  54. package/dist/Glutinum.Converter/Transform.js.map +1 -1
  55. package/dist/Glutinum.Converter/TypeScript.js +1 -1
  56. package/dist/Glutinum.Converter/Utils/Keywords.js +3 -3
  57. package/dist/Glutinum.Converter/Utils/List.js +62 -0
  58. package/dist/Glutinum.Converter/Utils/List.js.map +1 -0
  59. package/dist/Glutinum.Converter/Utils/Naming.js +96 -17
  60. package/dist/Glutinum.Converter/Utils/Naming.js.map +1 -1
  61. package/dist/Glutinum.Converter/Utils/String.js +6 -1
  62. package/dist/Glutinum.Converter/Utils/String.js.map +1 -1
  63. package/dist/Program.js +9 -10
  64. package/dist/Program.js.map +1 -1
  65. package/package.json +22 -3
  66. package/dist/Glutinum.Converter/Reader/NamedDeclaration.js +0 -36
  67. package/dist/Glutinum.Converter/Reader/NamedDeclaration.js.map +0 -1
  68. package/dist/Glutinum.Converter/Reader/Types.js +0 -16
  69. package/dist/Glutinum.Converter/Reader/Types.js.map +0 -1
  70. package/dist/fable_modules/fable-library.4.5.0/Array.d.ts +0 -120
  71. package/dist/fable_modules/fable-library.4.5.0/Array.js +0 -1204
  72. package/dist/fable_modules/fable-library.4.5.0/Async.d.ts +0 -32
  73. package/dist/fable_modules/fable-library.4.5.0/Async.js +0 -158
  74. package/dist/fable_modules/fable-library.4.5.0/AsyncBuilder.d.ts +0 -59
  75. package/dist/fable_modules/fable-library.4.5.0/AsyncBuilder.js +0 -183
  76. package/dist/fable_modules/fable-library.4.5.0/BigInt.d.ts +0 -115
  77. package/dist/fable_modules/fable-library.4.5.0/BigInt.js +0 -282
  78. package/dist/fable_modules/fable-library.4.5.0/BitConverter.d.ts +0 -27
  79. package/dist/fable_modules/fable-library.4.5.0/BitConverter.js +0 -138
  80. package/dist/fable_modules/fable-library.4.5.0/Boolean.d.ts +0 -3
  81. package/dist/fable_modules/fable-library.4.5.0/Boolean.js +0 -21
  82. package/dist/fable_modules/fable-library.4.5.0/CHANGELOG.md +0 -11
  83. package/dist/fable_modules/fable-library.4.5.0/Char.d.ts +0 -65
  84. package/dist/fable_modules/fable-library.4.5.0/Char.js +0 -169
  85. package/dist/fable_modules/fable-library.4.5.0/Choice.d.ts +0 -138
  86. package/dist/fable_modules/fable-library.4.5.0/Choice.js +0 -227
  87. package/dist/fable_modules/fable-library.4.5.0/Date.d.ts +0 -70
  88. package/dist/fable_modules/fable-library.4.5.0/Date.js +0 -451
  89. package/dist/fable_modules/fable-library.4.5.0/DateOffset.d.ts +0 -63
  90. package/dist/fable_modules/fable-library.4.5.0/DateOffset.js +0 -268
  91. package/dist/fable_modules/fable-library.4.5.0/DateOnly.d.ts +0 -18
  92. package/dist/fable_modules/fable-library.4.5.0/DateOnly.js +0 -124
  93. package/dist/fable_modules/fable-library.4.5.0/Decimal.d.ts +0 -45
  94. package/dist/fable_modules/fable-library.4.5.0/Decimal.js +0 -212
  95. package/dist/fable_modules/fable-library.4.5.0/Double.d.ts +0 -11
  96. package/dist/fable_modules/fable-library.4.5.0/Double.js +0 -46
  97. package/dist/fable_modules/fable-library.4.5.0/Encoding.d.ts +0 -12
  98. package/dist/fable_modules/fable-library.4.5.0/Encoding.js +0 -173
  99. package/dist/fable_modules/fable-library.4.5.0/Event.d.ts +0 -31
  100. package/dist/fable_modules/fable-library.4.5.0/Event.js +0 -93
  101. package/dist/fable_modules/fable-library.4.5.0/FSharp.Collections.d.ts +0 -7
  102. package/dist/fable_modules/fable-library.4.5.0/FSharp.Collections.js +0 -27
  103. package/dist/fable_modules/fable-library.4.5.0/FSharp.Core.d.ts +0 -17
  104. package/dist/fable_modules/fable-library.4.5.0/FSharp.Core.js +0 -69
  105. package/dist/fable_modules/fable-library.4.5.0/Global.d.ts +0 -24
  106. package/dist/fable_modules/fable-library.4.5.0/Global.js +0 -8
  107. package/dist/fable_modules/fable-library.4.5.0/Guid.d.ts +0 -10
  108. package/dist/fable_modules/fable-library.4.5.0/Guid.js +0 -142
  109. package/dist/fable_modules/fable-library.4.5.0/Int32.d.ts +0 -28
  110. package/dist/fable_modules/fable-library.4.5.0/Int32.js +0 -135
  111. package/dist/fable_modules/fable-library.4.5.0/List.d.ts +0 -143
  112. package/dist/fable_modules/fable-library.4.5.0/List.js +0 -1273
  113. package/dist/fable_modules/fable-library.4.5.0/Long.d.ts +0 -3
  114. package/dist/fable_modules/fable-library.4.5.0/Long.js +0 -46
  115. package/dist/fable_modules/fable-library.4.5.0/MailboxProcessor.d.ts +0 -25
  116. package/dist/fable_modules/fable-library.4.5.0/MailboxProcessor.js +0 -93
  117. package/dist/fable_modules/fable-library.4.5.0/Map.d.ts +0 -178
  118. package/dist/fable_modules/fable-library.4.5.0/Map.js +0 -1396
  119. package/dist/fable_modules/fable-library.4.5.0/MapUtil.d.ts +0 -10
  120. package/dist/fable_modules/fable-library.4.5.0/MapUtil.js +0 -112
  121. package/dist/fable_modules/fable-library.4.5.0/MutableMap.d.ts +0 -52
  122. package/dist/fable_modules/fable-library.4.5.0/MutableMap.js +0 -326
  123. package/dist/fable_modules/fable-library.4.5.0/MutableSet.d.ts +0 -39
  124. package/dist/fable_modules/fable-library.4.5.0/MutableSet.js +0 -232
  125. package/dist/fable_modules/fable-library.4.5.0/Native.d.ts +0 -2
  126. package/dist/fable_modules/fable-library.4.5.0/Native.js +0 -8
  127. package/dist/fable_modules/fable-library.4.5.0/Numeric.d.ts +0 -19
  128. package/dist/fable_modules/fable-library.4.5.0/Numeric.js +0 -71
  129. package/dist/fable_modules/fable-library.4.5.0/Observable.d.ts +0 -32
  130. package/dist/fable_modules/fable-library.4.5.0/Observable.js +0 -113
  131. package/dist/fable_modules/fable-library.4.5.0/Option.d.ts +0 -28
  132. package/dist/fable_modules/fable-library.4.5.0/Option.js +0 -96
  133. package/dist/fable_modules/fable-library.4.5.0/README.md +0 -3
  134. package/dist/fable_modules/fable-library.4.5.0/Random.d.ts +0 -37
  135. package/dist/fable_modules/fable-library.4.5.0/Random.js +0 -170
  136. package/dist/fable_modules/fable-library.4.5.0/Range.d.ts +0 -12
  137. package/dist/fable_modules/fable-library.4.5.0/Range.js +0 -45
  138. package/dist/fable_modules/fable-library.4.5.0/Reflection.d.ts +0 -119
  139. package/dist/fable_modules/fable-library.4.5.0/Reflection.js +0 -461
  140. package/dist/fable_modules/fable-library.4.5.0/RegExp.d.ts +0 -10
  141. package/dist/fable_modules/fable-library.4.5.0/RegExp.js +0 -132
  142. package/dist/fable_modules/fable-library.4.5.0/Seq.d.ts +0 -165
  143. package/dist/fable_modules/fable-library.4.5.0/Seq.js +0 -1379
  144. package/dist/fable_modules/fable-library.4.5.0/Seq2.d.ts +0 -18
  145. package/dist/fable_modules/fable-library.4.5.0/Seq2.js +0 -111
  146. package/dist/fable_modules/fable-library.4.5.0/Set.d.ts +0 -190
  147. package/dist/fable_modules/fable-library.4.5.0/Set.js +0 -1789
  148. package/dist/fable_modules/fable-library.4.5.0/String.d.ts +0 -49
  149. package/dist/fable_modules/fable-library.4.5.0/String.js +0 -540
  150. package/dist/fable_modules/fable-library.4.5.0/System.Collections.Generic.d.ts +0 -71
  151. package/dist/fable_modules/fable-library.4.5.0/System.Collections.Generic.js +0 -307
  152. package/dist/fable_modules/fable-library.4.5.0/System.Text.d.ts +0 -30
  153. package/dist/fable_modules/fable-library.4.5.0/System.Text.js +0 -110
  154. package/dist/fable_modules/fable-library.4.5.0/SystemException.d.ts +0 -5
  155. package/dist/fable_modules/fable-library.4.5.0/SystemException.js +0 -5
  156. package/dist/fable_modules/fable-library.4.5.0/TimeOnly.d.ts +0 -15
  157. package/dist/fable_modules/fable-library.4.5.0/TimeOnly.js +0 -122
  158. package/dist/fable_modules/fable-library.4.5.0/TimeSpan.d.ts +0 -34
  159. package/dist/fable_modules/fable-library.4.5.0/TimeSpan.js +0 -177
  160. package/dist/fable_modules/fable-library.4.5.0/Timer.d.ts +0 -19
  161. package/dist/fable_modules/fable-library.4.5.0/Timer.js +0 -67
  162. package/dist/fable_modules/fable-library.4.5.0/Types.d.ts +0 -58
  163. package/dist/fable_modules/fable-library.4.5.0/Types.js +0 -208
  164. package/dist/fable_modules/fable-library.4.5.0/Unicode.13.0.0.d.ts +0 -2
  165. package/dist/fable_modules/fable-library.4.5.0/Unicode.13.0.0.js +0 -4
  166. package/dist/fable_modules/fable-library.4.5.0/Uri.d.ts +0 -29
  167. package/dist/fable_modules/fable-library.4.5.0/Uri.js +0 -142
  168. package/dist/fable_modules/fable-library.4.5.0/Util.d.ts +0 -207
  169. package/dist/fable_modules/fable-library.4.5.0/Util.js +0 -781
  170. package/dist/fable_modules/fable-library.4.5.0/lib/big.d.ts +0 -5
  171. package/dist/fable_modules/fable-library.4.5.0/lib/big.js +0 -826
  172. package/dist/fable_modules/fable-library.4.5.0/package.json +0 -23
  173. package/dist/fable_modules/project_cracked.json +0 -1
@@ -6,23 +6,23 @@ export function readTypeAliasDeclaration(reader, declaration) {
6
6
  switch (matchValue) {
7
7
  case 192: {
8
8
  const unionTypeNode = declaration.type;
9
- typ = reader["Glutinum.Converter.Reader.Types.TypeScriptReader.ReadUnionTypeNodeZ5A082EC2"](unionTypeNode);
9
+ typ = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadUnionTypeNodeZ5A082EC2"](unionTypeNode);
10
10
  break;
11
11
  }
12
12
  case 198: {
13
13
  const typeOperatorNode = declaration.type;
14
- typ = reader["Glutinum.Converter.Reader.Types.TypeScriptReader.ReadTypeOperatorNodeZ6830FC33"](typeOperatorNode);
14
+ typ = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeOperatorNodeZ6830FC33"](typeOperatorNode);
15
15
  break;
16
16
  }
17
17
  case 199: {
18
18
  const declaration_1 = declaration.type;
19
- typ = reader["Glutinum.Converter.Reader.Types.TypeScriptReader.ReadIndexedAccessTypeZ5577BC0A"](declaration_1);
19
+ typ = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadIndexedAccessTypeZ5577BC0A"](declaration_1);
20
20
  break;
21
21
  }
22
22
  default:
23
- typ = reader["Glutinum.Converter.Reader.Types.TypeScriptReader.ReadTypeNode24A678AD"](declaration.type);
23
+ typ = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNode24A678AD"](declaration.type);
24
24
  }
25
- return new GlueType(5, [new GlueTypeAliasDeclaration(declaration.name.getText(), typ, reader["Glutinum.Converter.Reader.Types.TypeScriptReader.ReadTypeParameters4088FB9E"](declaration.typeParameters))]);
25
+ return new GlueType(5, [new GlueTypeAliasDeclaration(declaration.name.getText(), typ, reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeParameters4088FB9E"](declaration.typeParameters))]);
26
26
  }
27
27
 
28
28
  //# sourceMappingURL=TypeAliasDeclaration.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/Glutinum.Converter/Reader/TypeAliasDeclaration.fs"],"names":["typ","matchValue","declaration","unionTypeNode","reader","typeOperatorNode"],"mappings":";;;AAYQA;AACMC,uBAAA,AAAAC;YAAAD;aAAA;AAEEE,kCAAgB,AAAAD;AAEpB,AALJF,kBAKI,AAAAI,sFAAyBD;;;aAJvB;AAOEE,qCAAmB,AAAAH;AACvB,AATJF,kBASI,AAAAI,yFAA4BC;;;aAR1B;AAWEH,kCAAc,AAAAA;AAClB,AAbJF,kBAaI,AAAAI,0FAA6BF;;;;AAG1B,AAhBPF,kBAgBO,AAAAI,gFAAoB,AAAAF;;AAQ5B,WAAA,iBALH,6BACW,AAAAA,4BACAF,KACU,AAAAI,sFAA0B,AAAAF","file":null,"sourcesContent":null,"sourceRoot":null}
1
+ {"version":3,"sources":["../../../src/Glutinum.Converter/Reader/TypeAliasDeclaration.fs"],"names":["typ","matchValue","declaration","unionTypeNode","reader","typeOperatorNode"],"mappings":";;;AAYQA;AACMC,uBAAA,AAAAC;YAAAD;aAAA;AAEEE,kCAAgB,AAAAD;AAEpB,AALJF,kBAKI,AAAAI,uFAAyBD;;;aAJvB;AAOEE,qCAAmB,AAAAH;AACvB,AATJF,kBASI,AAAAI,0FAA4BC;;;aAR1B;AAWEH,kCAAc,AAAAA;AAClB,AAbJF,kBAaI,AAAAI,2FAA6BF;;;;AAE1B,AAfPF,kBAeO,AAAAI,iFAAoB,AAAAF;;AAO5B,WAAA,iBALH,6BACW,AAAAA,4BACAF,KACU,AAAAI,uFAA0B,AAAAF","file":null,"sourcesContent":null,"sourceRoot":null}
@@ -1,12 +1,31 @@
1
- import { GlueClassDeclaration, GlueFunctionType, GlueTypeReference, GlueInterface, GlueTypeUnion, GlueLiteral, GlueType, GluePrimitive } from "../GlueAST.js";
2
- import { $007CHasSymbolFlags$007C_$007C, $007CHasTypeFlags$007C_$007C, generateReaderError } from "./Utils.js";
3
- import { empty, map, choose } from "../../fable_modules/fable-library.4.5.0/List.js";
4
- import { head, toList } from "../../fable_modules/fable-library.4.5.0/Seq.js";
5
- import { value as value_2 } from "../../fable_modules/fable-library.4.5.0/Option.js";
6
- import { interpolate, toText } from "../../fable_modules/fable-library.4.5.0/String.js";
1
+ import { Union } from "../../fable_modules/fable-library-js.4.14.0/Types.js";
2
+ import { union_type, class_type } from "../../fable_modules/fable-library-js.4.14.0/Reflection.js";
3
+ import { GlueTypeLiteral, GlueClassDeclaration, GlueFunctionType, GlueTypeReference, GlueInterface, GlueTypeUnion, GlueLiteral, GlueType, GluePrimitive } from "../GlueAST.js";
4
+ import { tryReadLiteral, $007CHasSymbolFlags$007C_$007C, $007CHasTypeFlags$007C_$007C, generateReaderError } from "./Utils.js";
5
+ import { exists, concat, empty, map, choose } from "../../fable_modules/fable-library-js.4.14.0/List.js";
6
+ import { head, toList } from "../../fable_modules/fable-library-js.4.14.0/Seq.js";
7
+ import { value as value_2 } from "../../fable_modules/fable-library-js.4.14.0/Option.js";
8
+ import { List_distinct } from "../../fable_modules/fable-library-js.4.14.0/Seq2.js";
9
+ import { structuralHash, equals } from "../../fable_modules/fable-library-js.4.14.0/Util.js";
10
+ import { interpolate, toText } from "../../fable_modules/fable-library-js.4.14.0/String.js";
11
+
12
+ class IntersectionTypePropertyResult extends Union {
13
+ constructor(tag, fields) {
14
+ super();
15
+ this.tag = tag;
16
+ this.fields = fields;
17
+ }
18
+ cases() {
19
+ return ["Single", "ForceAny"];
20
+ }
21
+ }
22
+
23
+ function IntersectionTypePropertyResult_$reflection() {
24
+ return union_type("Glutinum.Converter.Reader.TypeNode.IntersectionTypePropertyResult", [], IntersectionTypePropertyResult, () => [[["Item", class_type("TypeScript.Ts.Declaration")]], []]);
25
+ }
7
26
 
8
27
  export function readTypeNode(reader, typeNode) {
9
- const checker = reader["Glutinum.Converter.Reader.Types.TypeScriptReader.get_checker"]();
28
+ const checker = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_checker"]();
10
29
  const matchValue = typeNode.kind | 0;
11
30
  switch (matchValue) {
12
31
  case 106:
@@ -19,10 +38,14 @@ export function readTypeNode(reader, typeNode) {
19
38
  return new GlueType(3, [new GluePrimitive(3, [])]);
20
39
  case 150:
21
40
  return new GlueType(3, [new GluePrimitive(5, [])]);
41
+ case 151:
42
+ return new GlueType(3, [new GluePrimitive(9, [])]);
22
43
  case 154:
23
44
  return new GlueType(3, [new GluePrimitive(0, [])]);
24
45
  case 157:
25
46
  return new GlueType(3, [new GluePrimitive(8, [])]);
47
+ case 159:
48
+ return new GlueType(24, []);
26
49
  case 182:
27
50
  return new GlueType(3, [new GluePrimitive(3, [])]);
28
51
  case 183: {
@@ -72,7 +95,7 @@ export function readTypeNode(reader, typeNode) {
72
95
  const originalType = value_2(patternInput[1].declarations)[0].parent;
73
96
  if (originalType.kind === 264) {
74
97
  const interfaceDeclaration = originalType;
75
- const members = map((declaration) => reader["Glutinum.Converter.Reader.Types.TypeScriptReader.ReadNamedDeclaration2A58F896"](declaration), toList(interfaceDeclaration.members));
98
+ const members = map((declaration) => reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadDeclaration61B89E55"](declaration), toList(interfaceDeclaration.members));
76
99
  return new GlueType(14, [new GlueInterface(interfaceDeclaration.name.getText(), members, empty())]);
77
100
  }
78
101
  else {
@@ -93,7 +116,7 @@ export function readTypeNode(reader, typeNode) {
93
116
  else {
94
117
  let typeArguments_1;
95
118
  const matchValue_5 = typeReferenceNode.typeArguments;
96
- typeArguments_1 = ((matchValue_5 != null) ? map((arg) => reader["Glutinum.Converter.Reader.Types.TypeScriptReader.ReadTypeNodeZ64B23DD2"](arg), toList(matchValue_5)) : empty());
119
+ typeArguments_1 = ((matchValue_5 != null) ? map((arg) => reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNodeZ64B23DD2"](arg), toList(matchValue_5)) : empty());
97
120
  return new GlueType(13, [new GlueTypeReference(typeReferenceNode.typeName.getText(), fullName, typeArguments_1)]);
98
121
  }
99
122
  }
@@ -101,27 +124,146 @@ export function readTypeNode(reader, typeNode) {
101
124
  }
102
125
  case 184: {
103
126
  const functionTypeNode = typeNode;
104
- return new GlueType(16, [new GlueFunctionType(reader["Glutinum.Converter.Reader.Types.TypeScriptReader.ReadTypeNode24A678AD"](functionTypeNode.type), reader["Glutinum.Converter.Reader.Types.TypeScriptReader.ReadParametersZ17143B5B"](functionTypeNode.parameters))]);
127
+ return new GlueType(16, [new GlueFunctionType(reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNode24A678AD"](functionTypeNode.type), reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadParametersZ17143B5B"](functionTypeNode.parameters))]);
105
128
  }
106
129
  case 186: {
107
130
  const typeNodeQuery = typeNode;
108
- const typ_3 = checker.getTypeAtLocation(typeNodeQuery);
109
- const matchValue_6 = typ_3.symbol.flags | 0;
110
- if ($007CHasSymbolFlags$007C_$007C(32, matchValue_6) != null) {
111
- return new GlueType(12, [new GlueClassDeclaration(typ_3.symbol.name, empty(), empty(), empty())]);
131
+ const typ_3 = checker.getTypeAtLocation(typeNodeQuery.exprName);
132
+ const matchValue_6 = typ_3.flags | 0;
133
+ if ($007CHasTypeFlags$007C_$007C(524288, matchValue_6) != null) {
134
+ const matchValue_7 = typ_3.symbol.declarations;
135
+ if (matchValue_7 == null) {
136
+ return new GlueType(3, [new GluePrimitive(6, [])]);
137
+ }
138
+ else {
139
+ const declarations = matchValue_7;
140
+ const declaration_1 = declarations[0];
141
+ const matchValue_8 = declaration_1.kind | 0;
142
+ switch (matchValue_8) {
143
+ case 263:
144
+ return new GlueType(12, [new GlueClassDeclaration(typ_3.symbol.name, empty(), empty(), empty())]);
145
+ case 267:
146
+ return new GlueType(0, []);
147
+ default:
148
+ return reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadNode6C0FD055"](declaration_1);
149
+ }
150
+ }
151
+ }
152
+ else if ($007CHasTypeFlags$007C_$007C(4, matchValue_6) != null) {
153
+ return new GlueType(3, [new GluePrimitive(0, [])]);
154
+ }
155
+ else if ($007CHasTypeFlags$007C_$007C(8, matchValue_6) != null) {
156
+ return new GlueType(3, [new GluePrimitive(5, [])]);
157
+ }
158
+ else if ($007CHasTypeFlags$007C_$007C(16, matchValue_6) != null) {
159
+ return new GlueType(3, [new GluePrimitive(3, [])]);
160
+ }
161
+ else if ($007CHasTypeFlags$007C_$007C(1, matchValue_6) != null) {
162
+ return new GlueType(3, [new GluePrimitive(6, [])]);
163
+ }
164
+ else if ($007CHasTypeFlags$007C_$007C(16384, matchValue_6) != null) {
165
+ return new GlueType(3, [new GluePrimitive(4, [])]);
112
166
  }
113
167
  else {
114
168
  return new GlueType(3, [new GluePrimitive(6, [])]);
115
169
  }
116
170
  }
171
+ case 187: {
172
+ const typeLiteralNode = typeNode;
173
+ return new GlueType(22, [new GlueTypeLiteral(map((declaration_4) => reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadDeclaration61B89E55"](declaration_4), toList(typeLiteralNode.members)))]);
174
+ }
117
175
  case 188: {
118
176
  const arrayTypeNode = typeNode;
119
- return new GlueType(15, [reader["Glutinum.Converter.Reader.Types.TypeScriptReader.ReadTypeNode24A678AD"](arrayTypeNode.elementType)]);
177
+ return new GlueType(15, [reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNode24A678AD"](arrayTypeNode.elementType)]);
178
+ }
179
+ case 189: {
180
+ const tupleTypeNode = typeNode;
181
+ return new GlueType(19, [map((element) => reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNode24A678AD"](element), toList(tupleTypeNode.elements))]);
182
+ }
183
+ case 190: {
184
+ const optionalTypeNode = typeNode;
185
+ return new GlueType(23, [reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNode24A678AD"](optionalTypeNode.type)]);
120
186
  }
121
187
  case 192:
122
- return reader["Glutinum.Converter.Reader.Types.TypeScriptReader.ReadUnionTypeNodeZ5A082EC2"](typeNode);
123
- default:
124
- throw new Error(generateReaderError("type node", toText(interpolate("Unsupported kind %A%P()", [typeNode.kind])), typeNode));
188
+ return reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadUnionTypeNodeZ5A082EC2"](typeNode);
189
+ case 193: {
190
+ const intersectionTypeNode = typeNode;
191
+ const unionOrIntersectionType = checker.getTypeAtLocation(intersectionTypeNode);
192
+ const properties = choose((property) => {
193
+ const matchValue_10 = property.declarations;
194
+ if (matchValue_10 == null) {
195
+ throw new Error(generateReaderError("type node", "Missing declarations", typeNode));
196
+ }
197
+ else {
198
+ const declarations_1 = matchValue_10;
199
+ if (declarations_1.length === 1) {
200
+ return new IntersectionTypePropertyResult(0, [declarations_1[0]]);
201
+ }
202
+ else {
203
+ return new IntersectionTypePropertyResult(1, []);
204
+ }
205
+ }
206
+ }, unionOrIntersectionType.isUnion() ? List_distinct(concat(map((arg_1) => toList(checker.getPropertiesOfType(arg_1)), toList(unionOrIntersectionType.types))), {
207
+ Equals: equals,
208
+ GetHashCode: structuralHash,
209
+ }) : toList(unionOrIntersectionType.getProperties()));
210
+ if (exists((property_1) => {
211
+ if (property_1.tag === 0) {
212
+ if (property_1.fields[0].kind === 174) {
213
+ return true;
214
+ }
215
+ else {
216
+ return false;
217
+ }
218
+ }
219
+ else {
220
+ return true;
221
+ }
222
+ }, properties)) {
223
+ return new GlueType(3, [new GluePrimitive(6, [])]);
224
+ }
225
+ else {
226
+ return new GlueType(21, [choose((_arg) => {
227
+ if (_arg.tag === 1) {
228
+ throw new Error("Sould not happen here");
229
+ }
230
+ else {
231
+ return reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadDeclaration61B89E55"](_arg.fields[0]);
232
+ }
233
+ }, properties)]);
234
+ }
235
+ }
236
+ case 196: {
237
+ const parenthesizedTypeNode = typeNode;
238
+ return reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNode24A678AD"](parenthesizedTypeNode.type);
239
+ }
240
+ case 197: {
241
+ const thisTypeNode = typeNode;
242
+ const typ_4 = checker.getTypeAtLocation(thisTypeNode);
243
+ return new GlueType(18, [typ_4.symbol.name]);
244
+ }
245
+ case 198: {
246
+ const typeOperatorNode = typeNode;
247
+ return reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeOperatorNodeZ6830FC33"](typeOperatorNode);
248
+ }
249
+ case 201: {
250
+ const literalTypeNode = typeNode;
251
+ const matchValue_9 = tryReadLiteral(literalTypeNode.literal);
252
+ if (matchValue_9 == null) {
253
+ throw new Error(generateReaderError("type node - literal type", "Could not read literal type", typeNode));
254
+ }
255
+ else {
256
+ return new GlueType(8, [matchValue_9]);
257
+ }
258
+ }
259
+ case 202:
260
+ return reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadNamedTupleMemberZ6E17C942"](typeNode);
261
+ default: {
262
+ const item = generateReaderError("type node", toText(interpolate("Unsupported kind %A%P()", [typeNode.kind])), typeNode);
263
+ const objectArg = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_Warnings"]();
264
+ void (objectArg.push(item));
265
+ return new GlueType(3, [new GluePrimitive(6, [])]);
266
+ }
125
267
  }
126
268
  }
127
269
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/Glutinum.Converter/Reader/TypeNode.fs"],"names":["checker","reader","matchValue","typeNode","typeReferenceNode","symbolOpt","fullName","symbol","typ","literalType","aliasTypeArguments","patternInput","originalType","interfaceDeclaration","members","declaration","typeArguments","functionTypeNode","typeNodeQuery","arrayTypeNode"],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,2CAAA,kBANF,kBACU,AAAAA,qCACGC,SACO;;;AAKlB,2CAAA;;;;;;AApCT,\u002BBAAA;;;;AAwCJZ,yCAAA,QAAAG;AACJ,wBADI,AACJ,\u002BBAAe,QADXH;AAEsB,\u002BBAAA,kBAAxB,QAAAG;;;AAEIW;AACMd,6CAAA,AAAAE;AAAA,AADNY,2CACM,CAAA,AAAAd,wBAKC,aAAkB,AAAAD,uFADlB,OADHC,iBAFM;AAWX,\u002BBAAA,kBALF,sBACU,AAAAE,sCACIE,UACKU;;;;;aAlI1B;AAgJEC,qCAAmBd;AAMpB,mBAAA,kBAJH,qBACW,AAAAF,gFAAoB,AAAAgB,wBACd,AAAAhB,mFAAsB,AAAAgB;;aApJrC;AAyJEC,kCAAgBf;AAEhBK,0BAAM,AAAAR,0BAA0BkB;AAE9BhB,iCAAA,AAAAM;AACJ,gBADI,AACJ,\u002BBAAe,IADXN;AAQC,uBAAA,kBANH,yBACW,AAAAM,mBACQ,SACL,SACO;;;AAGlB,uBAAA,iBAAmB;;;aAtKxB;AAuIEW,kCAAgBhB;AAIpB,mBAAA,kBAFkB,AAAAF,gFAAoB,AAAAkB;;aAzIpC;AAUF,mBAAA,AAAAlB,sFAAyBE;;AA\u002BJzB,4BACI,oBACI,aACA,OAAA,YAAA,4BAAsB,AAAAA,kBACtBA","file":null,"sourcesContent":null,"sourceRoot":null}
1
+ {"version":3,"sources":["../../../src/Glutinum.Converter/Reader/TypeNode.fs"],"names":["checker","reader","matchValue","typeNode","typeReferenceNode","symbolOpt","fullName","symbol","typ","literalType","aliasTypeArguments","patternInput","originalType","interfaceDeclaration","members","declaration","typeArguments","functionTypeNode","typeNodeQuery","declarations","typeLiteralNode","arrayTypeNode","tupleTypeNode","element","optionalTypeNode","intersectionTypeNode","unionOrIntersectionType","properties","property","_arg1","parenthesizedTypeNode","thisTypeNode","typeOperatorNode","literalTypeNode","item","objectArg"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBQA,oBAAU,A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AKhBD,iCAAA,eAF0B,AAAA\u002BB;AAE1B,gBAAA,AAAA/B;AAGF,gCACI,oBACI,4BACA,\u002BBACAC;;;AANM,uBAAA,iBAAAD;;;aArMhB;AAiUF,mBAAA,AAAAD,0FAA4BE;;AAOzB\u002BB,yBAJH,oBACI,aACA,OAAA,YAAA,4BAAsB,AAAA/B,kBACtBA;AACDgC,8BAAA,AAAAlC;AAAA,kBAAAkC,eAAAD;AAEH,mBAAA,iBAAmB","file":null,"sourcesContent":null,"sourceRoot":null}
@@ -1,35 +1,46 @@
1
1
  import typescript from "typescript";
2
2
  import { generateReaderError } from "./Utils.js";
3
- import { GlueType } from "../GlueAST.js";
4
- import { interpolate, toText } from "../../fable_modules/fable-library.4.5.0/String.js";
3
+ import { GluePrimitive, GlueType } from "../GlueAST.js";
4
+ import { interpolate, toText } from "../../fable_modules/fable-library-js.4.14.0/String.js";
5
5
 
6
6
  export function readTypeOperatorNode(reader, node) {
7
- if (node.operator === 143) {
8
- if (typescript.isTypeReferenceNode(node.type)) {
9
- const typeReferenceNode = node.type;
10
- const symbolOpt = reader["Glutinum.Converter.Reader.Types.TypeScriptReader.get_checker"]().getSymbolAtLocation(typeReferenceNode.typeName);
11
- if (symbolOpt != null) {
12
- const symbol = symbolOpt;
13
- const matchValue_1 = symbol.declarations;
14
- if (matchValue_1 == null) {
15
- throw new Error(generateReaderError("type operator (keyof)", "Missing declarations", node));
7
+ const matchValue = node.operator | 0;
8
+ switch (matchValue) {
9
+ case 143:
10
+ if (typescript.isTypeReferenceNode(node.type)) {
11
+ const typeReferenceNode = node.type;
12
+ const symbolOpt = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_checker"]().getSymbolAtLocation(typeReferenceNode.typeName);
13
+ if (symbolOpt != null) {
14
+ const symbol = symbolOpt;
15
+ const matchValue_1 = symbol.declarations;
16
+ if (matchValue_1 == null) {
17
+ throw new Error(generateReaderError("type operator (keyof)", "Missing declarations", node));
18
+ }
19
+ else {
20
+ const declarations = matchValue_1;
21
+ if (declarations.length !== 1) {
22
+ throw new Error(generateReaderError("type operator (keyof)", "Expected exactly one declaration", node));
23
+ }
24
+ else {
25
+ return new GlueType(9, [reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadNode6C0FD055"](declarations[0])]);
26
+ }
27
+ }
16
28
  }
17
29
  else {
18
- const declarations = matchValue_1;
19
- const interfaceDeclaration = declarations[0];
20
- return new GlueType(9, [reader["Glutinum.Converter.Reader.Types.TypeScriptReader.ReadInterfaceDeclaration1CB6FA10"](interfaceDeclaration)]);
30
+ throw new Error(generateReaderError("type operator (keyof)", "Missing symbol", node));
21
31
  }
22
32
  }
23
33
  else {
24
- throw new Error(generateReaderError("type operator (keyof)", "Missing symbol", node));
34
+ throw new Error(generateReaderError("type operator (keyof)", toText(interpolate("Was expecting a type reference instead got a Node of type %A%P()", [node.type.kind])), node));
25
35
  }
36
+ case 148:
37
+ return reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNode24A678AD"](node.type);
38
+ default: {
39
+ const item = generateReaderError("type operator", toText(interpolate("Unsupported operator %A%P()", [node.operator])), node);
40
+ const objectArg = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_Warnings"]();
41
+ void (objectArg.push(item));
42
+ return new GlueType(3, [new GluePrimitive(6, [])]);
26
43
  }
27
- else {
28
- throw new Error(generateReaderError("type operator (keyof)", toText(interpolate("Was expecting a type reference instead got a Node of type %A%P()", [node.type.kind])), node));
29
- }
30
- }
31
- else {
32
- throw new Error(generateReaderError("type operator", toText(interpolate("Unsupported operator %A%P()", [node.operator])), node));
33
44
  }
34
45
  }
35
46
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/Glutinum.Converter/Reader/TypeOperatorNode.fs"],"names":["node","typeReferenceNode","symbolOpt","reader","symbol","matchValue","declarations","interfaceDeclaration"],"mappings":";;;;;;AAYU,QAAA,AAAAA,kBAAA;AAEF,YAAG,\u002BBAAuB,AAAAA;AAClBC,sCAAoB,AAAAD;AAGpBE,8BACA,AAAAC,6FAAqC,AAAAF;AAEnC,gBAAA,AAAAC;AASCE,\u002BBACGF;AAAAG,qCAAA,AAAAD;AAAA,oBAAA,AAAAC;AASF,oCACI,oBACI,yBACA,wBACAL;;;AAZLM,yCACCD;AAAAE,iDACA,AAAAD,aAAa;AAGd,2BAAA,iBADH,AAAAH,4FAAgCI;;;;AAbpC,gCACI,oBACI,yBACA,kBACAP;;;;AAqBZ,4BACI,oBACI,yBACA,OAAA,YAAA,qEAA\u002BD,AAAAA,mBAC/DA;;;;AAIZ,wBACI,oBACI,iBACA,OAAA,YAAA,gCAA0B,AAAAA,kBAC1BA","file":null,"sourcesContent":null,"sourceRoot":null}
1
+ {"version":3,"sources":["../../../src/Glutinum.Converter/Reader/TypeOperatorNode.fs"],"names":["matchValue","node","typeReferenceNode","symbolOpt","reader","symbol","declarations","item","objectArg"],"mappings":";;;;;;AAYUA,uBAAA,AAAAC;YAAAD;aAAA;AAEF,gBAAG,\u002BBAAuB,AAAAC;AAClBC,0CAAoB,AAAAD;AAGpBE,kCACA,AAAAC,8FAAqC,AAAAF;AAEnC,oBAAA,AAAAC;AAQCE,mCACGF;AAAAH,yCAAA,AAAAK;AAAA,wBAAA,AAAAL;AAkBC,wCAJH,oBACI,yBACA,wBACAC;;;AAhBDK,6CAEHN;AAAA,4BAAG,AAAAM,wBAAsB;AAKlB,4CAJH,oBACI,yBACA,oCACAL;;;AAI\u002BB,mCAAA,iBAAnC,AAAAG,6EAAgB,AAAAE,aAAa;;;;;AAdlC,oCAJH,oBACI,yBACA,kBACAL;;;;AA6BL,gCAJH,oBACI,yBACA,OAAA,YAAA,qEAA\u002BD,AAAAA,mBAC/DA;;aA1CN;AA6C6B,mBAAA,AAAAG,iFAAoB,AAAAH;;AAOhDM,yBAJH,oBACI,iBACA,OAAA,YAAA,gCAA0B,AAAAN,kBAC1BA;AACDO,8BAAA,AAAAJ;AAAA,kBAAAI,eAAAD;AAEH,mBAAA,iBAAmB","file":null,"sourcesContent":null,"sourceRoot":null}
@@ -1,6 +1,6 @@
1
- import { empty, map } from "../../fable_modules/fable-library.4.5.0/List.js";
1
+ import { empty, map } from "../../fable_modules/fable-library-js.4.14.0/List.js";
2
2
  import { GlueTypeParameter } from "../GlueAST.js";
3
- import { toList } from "../../fable_modules/fable-library.4.5.0/Seq.js";
3
+ import { toList } from "../../fable_modules/fable-library-js.4.14.0/Seq.js";
4
4
 
5
5
  export function readTypeParameters(reader, typeParameters) {
6
6
  if (typeParameters != null) {
@@ -1,6 +1,6 @@
1
1
  import { readClassDeclaration } from "./ClassDeclaration.js";
2
- import { GluePrimitive, GlueType } from "../GlueAST.js";
3
2
  import { readEnumDeclaration } from "./EnumDeclaration.js";
3
+ import { GluePrimitive, GlueType } from "../GlueAST.js";
4
4
  import { readFunctionDeclaration } from "./FunctionDeclaration.js";
5
5
  import { readInterfaceDeclaration } from "./InterfaceDeclaration.js";
6
6
  import { readModuleDeclaration } from "./ModuleDeclaration.js";
@@ -8,88 +8,118 @@ import { readNode } from "./Node.js";
8
8
  import { readTypeAliasDeclaration } from "./TypeAliasDeclaration.js";
9
9
  import { readTypeNode } from "./TypeNode.js";
10
10
  import { readVariableStatement } from "./VariableStatement.js";
11
- import { readNamedDeclaration } from "./NamedDeclaration.js";
11
+ import { readDeclaration } from "./Declaration.js";
12
12
  import { readParameters } from "./Parameters.js";
13
13
  import { readUnionTypeNode } from "./UnionTypeNode.js";
14
14
  import { readTypeOperatorNode } from "./TypeOperatorNode.js";
15
15
  import { readIndexedAccessType } from "./IndexedAccessType.js";
16
16
  import { readTypeParameters } from "./TypeParameters.js";
17
- import { TypeScriptReader } from "./Types.js";
17
+ import { readExportAssignment } from "./ExportAssignment.js";
18
+ import { readDocumentationForNode, readDocumentationForSignature } from "./Documentation.js";
19
+ import { readNamedTupleMember } from "./NamedTupleMember.js";
20
+ import { class_type } from "../../fable_modules/fable-library-js.4.14.0/Reflection.js";
21
+
22
+ export class TypeScriptReader {
23
+ constructor(checker) {
24
+ this["checker@25"] = checker;
25
+ this.warnings = [];
26
+ }
27
+ "Glutinum.Converter.Reader.Types.ITypeScriptReader.get_checker"() {
28
+ const _ = this;
29
+ return _["checker@25"];
30
+ }
31
+ "Glutinum.Converter.Reader.Types.ITypeScriptReader.get_Warnings"() {
32
+ const _ = this;
33
+ return _.warnings;
34
+ }
35
+ "Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadClassDeclarationZ4558F325"(classDeclaration) {
36
+ const this$ = this;
37
+ return readClassDeclaration(this$, classDeclaration);
38
+ }
39
+ "Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadEnumDeclaration49F76106"(enumDeclaration) {
40
+ const this$ = this;
41
+ return new GlueType(4, [readEnumDeclaration(this$, enumDeclaration)]);
42
+ }
43
+ "Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadFunctionDeclarationZ72EBD329"(functionDeclaration) {
44
+ const this$ = this;
45
+ return new GlueType(6, [readFunctionDeclaration(this$, functionDeclaration)]);
46
+ }
47
+ "Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadInterfaceDeclaration1CB6FA10"(interfaceDeclaration) {
48
+ const this$ = this;
49
+ return new GlueType(1, [readInterfaceDeclaration(this$, interfaceDeclaration)]);
50
+ }
51
+ "Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadModuleDeclarationC29C54F"(moduleDeclaration) {
52
+ const this$ = this;
53
+ return new GlueType(11, [readModuleDeclaration(this$, moduleDeclaration)]);
54
+ }
55
+ "Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadNode6C0FD055"(node) {
56
+ const this$ = this;
57
+ return readNode(this$, node);
58
+ }
59
+ "Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeAliasDeclarationZ7FA16745"(typeAliasDeclaration) {
60
+ const this$ = this;
61
+ return readTypeAliasDeclaration(this$, typeAliasDeclaration);
62
+ }
63
+ "Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNode24A678AD"(typNode) {
64
+ const this$ = this;
65
+ return this$["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNodeZ64B23DD2"](typNode);
66
+ }
67
+ "Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNodeZ64B23DD2"(typNode) {
68
+ const this$ = this;
69
+ return (typNode == null) ? (new GlueType(3, [new GluePrimitive(4, [])])) : readTypeNode(this$, typNode);
70
+ }
71
+ "Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadVariableStatementZ66C4BA0A"(variableStatement) {
72
+ const this$ = this;
73
+ return readVariableStatement(this$, variableStatement);
74
+ }
75
+ "Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadDeclaration61B89E55"(declaration) {
76
+ const this$ = this;
77
+ return readDeclaration(this$, declaration);
78
+ }
79
+ "Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadParametersZ17143B5B"(parameters) {
80
+ const this$ = this;
81
+ return readParameters(this$, parameters);
82
+ }
83
+ "Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadUnionTypeNodeZ5A082EC2"(unionType) {
84
+ const this$ = this;
85
+ return readUnionTypeNode(this$, unionType);
86
+ }
87
+ "Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeOperatorNodeZ6830FC33"(node) {
88
+ const this$ = this;
89
+ return readTypeOperatorNode(this$, node);
90
+ }
91
+ "Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadIndexedAccessTypeZ5577BC0A"(declaration) {
92
+ const this$ = this;
93
+ return readIndexedAccessType(this$, declaration);
94
+ }
95
+ "Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeParameters4088FB9E"(typeParametersOpt) {
96
+ const this$ = this;
97
+ return readTypeParameters(this$, typeParametersOpt);
98
+ }
99
+ "Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadExportAssignmentZ3497D0FE"(exportAssignment) {
100
+ const this$ = this;
101
+ return readExportAssignment(this$, exportAssignment);
102
+ }
103
+ "Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadDocumentationFromSignature61B89E55"(declaration) {
104
+ const this$ = this;
105
+ return readDocumentationForSignature(this$, declaration);
106
+ }
107
+ "Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadDocumentationFromNode6C0FD055"(node) {
108
+ const this$ = this;
109
+ return readDocumentationForNode(this$, node);
110
+ }
111
+ "Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadNamedTupleMemberZ6E17C942"(namedTupleMember) {
112
+ const this$ = this;
113
+ return readNamedTupleMember(this$, namedTupleMember);
114
+ }
115
+ }
116
+
117
+ export function TypeScriptReader_$reflection() {
118
+ return class_type("Glutinum.Converter.Reader.TypeScriptReader.TypeScriptReader", void 0, TypeScriptReader);
119
+ }
18
120
 
19
- export function typeScriptReader(checker) {
20
- return new (class extends TypeScriptReader {
21
- constructor() {
22
- super(checker);
23
- }
24
- "Glutinum.Converter.Reader.Types.TypeScriptReader.get_checker"() {
25
- return checker;
26
- }
27
- "Glutinum.Converter.Reader.Types.TypeScriptReader.ReadClassDeclarationZ4558F325"(classDeclaration) {
28
- const this$ = this;
29
- return new GlueType(12, [readClassDeclaration(this$, classDeclaration)]);
30
- }
31
- "Glutinum.Converter.Reader.Types.TypeScriptReader.ReadEnumDeclaration49F76106"(enumDeclaration) {
32
- const this$_1 = this;
33
- return new GlueType(4, [readEnumDeclaration(this$_1, enumDeclaration)]);
34
- }
35
- "Glutinum.Converter.Reader.Types.TypeScriptReader.ReadFunctionDeclarationZ72EBD329"(functionDeclaration) {
36
- const this$_2 = this;
37
- return new GlueType(6, [readFunctionDeclaration(this$_2, functionDeclaration)]);
38
- }
39
- "Glutinum.Converter.Reader.Types.TypeScriptReader.ReadInterfaceDeclaration1CB6FA10"(interfaceDeclaration) {
40
- const this$_3 = this;
41
- return new GlueType(1, [readInterfaceDeclaration(this$_3, interfaceDeclaration)]);
42
- }
43
- "Glutinum.Converter.Reader.Types.TypeScriptReader.ReadModuleDeclarationC29C54F"(moduleDeclaration) {
44
- const this$_4 = this;
45
- return new GlueType(11, [readModuleDeclaration(this$_4, moduleDeclaration)]);
46
- }
47
- "Glutinum.Converter.Reader.Types.TypeScriptReader.ReadNode6C0FD055"(node) {
48
- const this$_5 = this;
49
- return readNode(this$_5, node);
50
- }
51
- "Glutinum.Converter.Reader.Types.TypeScriptReader.ReadTypeAliasDeclarationZ7FA16745"(typeAliasDeclaration) {
52
- const this$_6 = this;
53
- return readTypeAliasDeclaration(this$_6, typeAliasDeclaration);
54
- }
55
- "Glutinum.Converter.Reader.Types.TypeScriptReader.ReadTypeNode24A678AD"(typNode) {
56
- const this$_7 = this;
57
- return this$_7["Glutinum.Converter.Reader.Types.TypeScriptReader.ReadTypeNodeZ64B23DD2"](typNode);
58
- }
59
- "Glutinum.Converter.Reader.Types.TypeScriptReader.ReadTypeNodeZ64B23DD2"(typNode_1) {
60
- const this$_8 = this;
61
- return (typNode_1 == null) ? (new GlueType(3, [new GluePrimitive(4, [])])) : readTypeNode(this$_8, typNode_1);
62
- }
63
- "Glutinum.Converter.Reader.Types.TypeScriptReader.ReadVariableStatementZ66C4BA0A"(variableStatement) {
64
- const this$_9 = this;
65
- return readVariableStatement(this$_9, variableStatement);
66
- }
67
- "Glutinum.Converter.Reader.Types.TypeScriptReader.ReadNamedDeclaration2A58F896"(declaration) {
68
- const this$_10 = this;
69
- return readNamedDeclaration(this$_10, declaration);
70
- }
71
- "Glutinum.Converter.Reader.Types.TypeScriptReader.ReadParametersZ17143B5B"(parameters) {
72
- const this$_11 = this;
73
- return readParameters(this$_11, parameters);
74
- }
75
- "Glutinum.Converter.Reader.Types.TypeScriptReader.ReadUnionTypeNodeZ5A082EC2"(unionType) {
76
- const this$_12 = this;
77
- return readUnionTypeNode(this$_12, unionType);
78
- }
79
- "Glutinum.Converter.Reader.Types.TypeScriptReader.ReadTypeOperatorNodeZ6830FC33"(node_1) {
80
- const this$_13 = this;
81
- return readTypeOperatorNode(this$_13, node_1);
82
- }
83
- "Glutinum.Converter.Reader.Types.TypeScriptReader.ReadIndexedAccessTypeZ5577BC0A"(declaration_1) {
84
- const this$_14 = this;
85
- return readIndexedAccessType(this$_14, declaration_1);
86
- }
87
- "Glutinum.Converter.Reader.Types.TypeScriptReader.ReadTypeParameters4088FB9E"(typeParametersOpt) {
88
- const this$_15 = this;
89
- return readTypeParameters(this$_15, typeParametersOpt);
90
- }
91
- }
92
- )();
121
+ export function TypeScriptReader_$ctor_Z51F60704(checker) {
122
+ return new TypeScriptReader(checker);
93
123
  }
94
124
 
95
125
  //# sourceMappingURL=TypeScriptReader.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/Glutinum.Converter/Reader/TypeScriptReader.fs"],"names":["checker","this","classDeclaration","enumDeclaration","functionDeclaration","interfaceDeclaration","moduleDeclaration","node","typeAliasDeclaration","typNode","variableStatement","declaration","parameters","unionType","typeParametersOpt"],"mappings":";;;;;;;;;;;;;;;;;;;;;kBAsB2BA;;;mBACkBA;;;AAE9BC,0BAAAA;AAKA,mBAAA,kBADH,qBAAqBA,OAAKC;;;AAGvBD,4BAAAA;AAIyC,mBAAA,iBAA5C,oBAAoBA,SAAKE;;;AAEtBF,4BAAAA;AAKA,mBAAA,iBADH,wBAAwBA,SAAKG;;;AAG1BH,4BAAAA;AAKA,mBAAA,iBADH,yBAAyBA,SAAKI;;;AAG3BJ,4BAAAA;AAKA,mBAAA,kBADH,sBAAsBA,SAAKK;;;AAGxBL,4BAAAA;AAA0C,mBAAA,SAASA,SAAKM;;;AAExDN,4BAAAA;AAIH,mBAAA,yBAAyBA,SAAKO;;;AAE3BP,4BAAAA;AACH,mBAAA,AAAAA,kFAAuBQ;;;AAEpBR,4BAAAA;AACG,mBAAA,CAAA,AAAAQ,sBAEI,iBAAmB,8BADX,aAAaR,SAAbQ;;;AAGfR,4BAAAA;AAIH,mBAAA,sBAAsBA,SAAKS;;;AAExBT,6BAAAA;AAIH,mBAAA,qBAAqBA,UAAKU;;;AAEvBV,6BAAAA;AAIH,mBAAA,eAAeA,UAAKW;;;AAEjBX,6BAAAA;AACH,mBAAA,kBAAkBA,UAAKY;;;AAEpBZ,6BAAAA;AACH,mBAAA,qBAAqBA,UAAKM;;;AAEvBN,6BAAAA;AAIH,mBAAA,sBAAsBA,UAAKU;;;AAExBV,6BAAAA;AAIH,mBAAA,mBAAmBA,UAAKa","file":null,"sourcesContent":null,"sourceRoot":null}
1
+ {"version":3,"sources":["../../../src/Glutinum.Converter/Reader/TypeScriptReader.fs"],"names":["checker","_","this","classDeclaration","enumDeclaration","functionDeclaration","interfaceDeclaration","moduleDeclaration","node","typeAliasDeclaration","typNode","variableStatement","declaration","parameters","unionType","typeParametersOpt","exportAssignment","namedTupleMember"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAwBsB,6BAAAA;AAClB;;;AAIaC,kBAAAA;AAA4B,eAAA,AAAAA;;;AAE9BA,kBAAAA;AAAa,eAAA,AAAAA;;;AAEbC,sBAAAA;AAIH,eAAA,qBAAqBA,OAAKC;;;AAEvBD,sBAAAA;AAIyC,eAAA,iBAA5C,oBAAoBA,OAAKE;;;AAEtBF,sBAAAA;AAKA,eAAA,iBADH,wBAAwBA,OAAKG;;;AAG1BH,sBAAAA;AAKA,eAAA,iBADH,yBAAyBA,OAAKI;;;AAG3BJ,sBAAAA;AAKA,eAAA,kBADH,sBAAsBA,OAAKK;;;AAGxBL,sBAAAA;AAA0C,eAAA,SAASA,OAAKM;;;AAExDN,sBAAAA;AAIH,eAAA,yBAAyBA,OAAKO;;;AAE3BP,sBAAAA;AACH,eAAA,AAACA,iFAA6CQ;;;AAE3CR,sBAAAA;AACG,eAAA,CAAA,AAAAQ,oBAEI,iBAAmB,8BADX,aAAaR,OAAbQ;;;AAGfR,sBAAAA;AAIH,eAAA,sBAAsBA,OAAKS;;;AAExBT,sBAAAA;AACH,eAAA,gBAAgBA,OAAKU;;;AAElBV,sBAAAA;AAIH,eAAA,eAAeA,OAAKW;;;AAEjBX,sBAAAA;AACH,eAAA,kBAAkBA,OAAKY;;;AAEpBZ,sBAAAA;AACH,eAAA,qBAAqBA,OAAKM;;;AAEvBN,sBAAAA;AAIH,eAAA,sBAAsBA,OAAKU;;;AAExBV,sBAAAA;AAIH,eAAA,mBAAmBA,OAAKa;;;AAErBb,sBAAAA;AAIH,eAAA,qBAAqBA,OAAKc;;;AAEvBd,sBAAAA;AAIH,eAAA,8BAA8BA,OAAKU;;;AAEhCV,sBAAAA;AAIH,eAAA,yBAAyBA,OAAKM;;;AAE3BN,sBAAAA;AAIH,eAAA,qBAAqBA,OAAKe","file":null,"sourcesContent":null,"sourceRoot":null}
@@ -1,12 +1,12 @@
1
1
  import typescript from "typescript";
2
- import { map, empty, singleton, choose, concat } from "../../fable_modules/fable-library.4.5.0/List.js";
3
- import { defaultArgWith } from "../../fable_modules/fable-library.4.5.0/Option.js";
2
+ import { map, empty, singleton, choose, concat } from "../../fable_modules/fable-library-js.4.14.0/List.js";
3
+ import { defaultArgWith } from "../../fable_modules/fable-library-js.4.14.0/Option.js";
4
4
  import { $007CHasTypeFlags$007C_$007C, generateReaderError, tryReadLiteral } from "./Utils.js";
5
5
  import { GlueTypeUnion, GlueTypeReference, GluePrimitive, GlueType } from "../GlueAST.js";
6
- import { toList } from "../../fable_modules/fable-library.4.5.0/Seq.js";
6
+ import { toList } from "../../fable_modules/fable-library-js.4.14.0/Seq.js";
7
7
 
8
8
  function readUnionTypeCases(reader, unionTypeNode) {
9
- const checker = reader["Glutinum.Converter.Reader.Types.TypeScriptReader.get_checker"]();
9
+ const checker = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_checker"]();
10
10
  const removeParenthesizedType = (node_mut) => {
11
11
  removeParenthesizedType:
12
12
  while (true) {
@@ -50,8 +50,8 @@ function readUnionTypeCases(reader, unionTypeNode) {
50
50
  const matchValue_1 = symbol.declarations;
51
51
  if (matchValue_1 == null) {
52
52
  const typ = checker.getTypeOfSymbol(symbol);
53
- const matchValue_2 = typ.flags | 0;
54
- if ($007CHasTypeFlags$007C_$007C(1, matchValue_2) != null) {
53
+ const matchValue_3 = typ.flags | 0;
54
+ if ($007CHasTypeFlags$007C_$007C(1, matchValue_3) != null) {
55
55
  return singleton(new GlueType(3, [new GluePrimitive(6, [])]));
56
56
  }
57
57
  else {
@@ -69,7 +69,13 @@ function readUnionTypeCases(reader, unionTypeNode) {
69
69
  }
70
70
  else {
71
71
  const declaration = declarations[0];
72
- return singleton(reader["Glutinum.Converter.Reader.Types.TypeScriptReader.ReadNode6C0FD055"](declaration));
72
+ if (declaration.kind === 265) {
73
+ return singleton(reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadNode6C0FD055"](declaration));
74
+ }
75
+ else {
76
+ const fullName_1 = checker.getFullyQualifiedName(symbol);
77
+ return singleton(new GlueType(13, [new GlueTypeReference(typeReferenceNode.getText(), fullName_1, empty())]));
78
+ }
73
79
  }
74
80
  }
75
81
  }
@@ -77,7 +83,7 @@ function readUnionTypeCases(reader, unionTypeNode) {
77
83
  return readUnionTypeCases(reader, node_1).fields[0];
78
84
  }
79
85
  else {
80
- return singleton(reader["Glutinum.Converter.Reader.Types.TypeScriptReader.ReadTypeNode24A678AD"](node_1));
86
+ return singleton(reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNode24A678AD"](node_1));
81
87
  }
82
88
  }, map(removeParenthesizedType, toList(unionTypeNode.types)))));
83
89
  }