@glutinum/cli 0.14.1 → 1.0.0-beta.1

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 (39) hide show
  1. package/dist/Glutinum.Converter/FsharpAST.js +38 -4
  2. package/dist/Glutinum.Converter/Generate.js +15 -7
  3. package/dist/Glutinum.Converter/GlueAST.js +45 -36
  4. package/dist/Glutinum.Converter/Hosting.js +918 -0
  5. package/dist/Glutinum.Converter/Merge.js +218 -82
  6. package/dist/Glutinum.Converter/Packages.js +44 -8
  7. package/dist/Glutinum.Converter/Printer.js +77 -49
  8. package/dist/Glutinum.Converter/Read.js +8 -8
  9. package/dist/Glutinum.Converter/Reader/ClassDeclaration.js +7 -7
  10. package/dist/Glutinum.Converter/Reader/Declaration.js +26 -26
  11. package/dist/Glutinum.Converter/Reader/Documentation.js +37 -36
  12. package/dist/Glutinum.Converter/Reader/ExportAssignment.js +5 -5
  13. package/dist/Glutinum.Converter/Reader/ExportDeclaration.js +31 -19
  14. package/dist/Glutinum.Converter/Reader/FunctionDeclaration.js +6 -7
  15. package/dist/Glutinum.Converter/Reader/IndexedAccessType.js +36 -29
  16. package/dist/Glutinum.Converter/Reader/InterfaceDeclaration.js +3 -3
  17. package/dist/Glutinum.Converter/Reader/MappedTypeNode.js +82 -4
  18. package/dist/Glutinum.Converter/Reader/ModuleDeclaration.js +3 -3
  19. package/dist/Glutinum.Converter/Reader/Node.js +20 -20
  20. package/dist/Glutinum.Converter/Reader/Parameters.js +7 -7
  21. package/dist/Glutinum.Converter/Reader/TypeAliasDeclaration.js +5 -5
  22. package/dist/Glutinum.Converter/Reader/TypeNode.js +291 -232
  23. package/dist/Glutinum.Converter/Reader/TypeOperatorNode.js +8 -8
  24. package/dist/Glutinum.Converter/Reader/TypeQueryNode.js +108 -40
  25. package/dist/Glutinum.Converter/Reader/TypeScriptReader.js +2 -2
  26. package/dist/Glutinum.Converter/Reader/Types.js +6 -6
  27. package/dist/Glutinum.Converter/Reader/UnionTypeNode.js +7 -6
  28. package/dist/Glutinum.Converter/Reader/Utils.js +106 -56
  29. package/dist/Glutinum.Converter/Transform.js +2057 -700
  30. package/dist/Glutinum.Converter/TypeScript.Extensions.js +194 -202
  31. package/dist/Glutinum.Converter/Utils/Naming.js +7 -0
  32. package/dist/Glutinum.Converter/Utils/String.js +2 -2
  33. package/dist/Program.js +38 -26
  34. package/package.json +2 -2
  35. package/dist/Glutinum.Converter/TypeScript.js +0 -12
  36. package/src/Glutinum.Converter/js/bootstrap.js +0 -123
  37. package/src/Glutinum.Converter/js/host.js +0 -144
  38. package/src/Glutinum.Converter/js/npm.js +0 -137
  39. package/src/Glutinum.Converter/js/resolve.js +0 -402
@@ -3,20 +3,20 @@ import { Union } from "../../fable_modules/fable-library-js.5.17.2/Types.js";
3
3
  import { union_type, class_type } from "../../fable_modules/fable-library-js.5.17.2/Reflection.js";
4
4
  import { Report_readerError_Z19516DCE } from "./Report.js";
5
5
  import { concat } from "../../fable_modules/fable-library-js.5.17.2/String.js";
6
- import { concat as concat_2, exists as exists_1, head, tail, fold, item as item_5, contains, filter, map as map_1, append as append_1, collect as collect_1, isEmpty, choose, singleton as singleton_1, length, truncate, empty } from "../../fable_modules/fable-library-js.5.17.2/List.js";
7
- import { resolvedBaseTypeArguments, tryReadLiteral, declaredName, isFromEsLib, isFromEs5Lib, modulePathForSymbol, knownExternalTypeNames, isExternalToPackages, importedName, readTypeArguments, getFullNameOrEmpty, defaultTypeArguments, identifierText, symbolAtLocation, isTupleType, Type_NumberLiteral_$007CInt$007CFloat$007COther$007C, Type_StringLiteral_$007CString$007COther$007C, entityNameText, mainDeclaration, resolveAlias, $007CHasTypeFlags$007C_$007C, $007CHasSymbolFlags$007C_$007C } from "./Utils.js";
6
+ import { forAll as forAll_1, concat as concat_2, exists as exists_1, head, tail, fold, item as item_5, contains, filter, map as map_1, append as append_1, collect as collect_1, isEmpty, choose, singleton as singleton_1, length, truncate, empty } from "../../fable_modules/fable-library-js.5.17.2/List.js";
7
+ import { resolvedBaseTypeArguments, tryReadLiteral, declaredName, isFromEsLib, isFromEs5Lib, modulePathForSymbol, knownExternalTypeNames, isExternalToPackages, importedName, typeLiteralId, readTypeArguments, getFullNameOrEmpty, defaultTypeArguments, identifierText, symbolAtLocation, isTupleType, Type_NumberLiteral_$007CInt$007CFloat$007COther$007C, Type_StringLiteral_$007CString$007COther$007C, entityNameText, mainDeclaration, resolveAlias, $007CHasTypeFlags$007C_$007C, $007CHasSymbolFlags$007C_$007C } from "./Utils.js";
8
8
  import { GlueThisType, GlueConditionalType, GlueSubstitution_substitute, GlueConstructSignature, GlueFunctionType, GlueTypeReference, GlueReadonly, GlueRecord, GlueUtilityType, GlueInterface, GlueSubstitution_substituteMember, GlueSubstitution_mentionedTypeParameters, GlueTypeLiteral, GlueTypeUnion, GlueLiteral, GlueClassDeclaration, GluePrimitive, GlueType, GlueMethod, GlueMethodSignature, GlueMember, GlueProperty, GlueAccessor } from "../GlueAST.js";
9
9
  import { Operators_IsNull } from "../../fable_modules/fable-library-js.5.17.2/FSharp.Core.js";
10
10
  import { sortByDescending, contains as contains_1, filter as filter_1, choose as choose_1, ofList as ofList_1, exists, map, concat as concat_1, forAll, tryHead, tryFindIndex, collect, empty as empty_1, singleton, append, delay, toList } from "../../fable_modules/fable-library-js.5.17.2/Seq.js";
11
- import { item as item_4 } from "../../fable_modules/fable-library-js.5.17.2/Array.js";
12
11
  import { unwrap, orElse, value as value_8, defaultArg } from "../../fable_modules/fable-library-js.5.17.2/Option.js";
12
+ import { contains as contains_2, item as item_4 } from "../../fable_modules/fable-library-js.5.17.2/Array.js";
13
13
  import { structuralHash, disposeSafe, comparePrimitives, stringHash, safeHash, equals, Exception } from "../../fable_modules/fable-library-js.5.17.2/Util.js";
14
14
  import { List_distinctBy, List_distinct, distinct } from "../../fable_modules/fable-library-js.5.17.2/Seq2.js";
15
15
  import { FSharpMap__get_IsEmpty, FSharpMap__ContainsKey, ofList } from "../../fable_modules/fable-library-js.5.17.2/Map.js";
16
16
  import { FSharpSet__Contains } from "../../fable_modules/fable-library-js.5.17.2/Set.js";
17
17
  import { sanitizeTypeName } from "../Utils/Naming.js";
18
- import { readTypeQueryNode } from "./TypeQueryNode.js";
19
18
  import { ts } from "@ts-morph/bootstrap";
19
+ import { readTypeQueryNode } from "./TypeQueryNode.js";
20
20
  import { TypeScript_Ts_SyntaxKind__SyntaxKind_get_Name } from "../TypeScript.Extensions.js";
21
21
 
22
22
  class IntersectionTypePropertyResult extends Union {
@@ -152,7 +152,7 @@ function isLibraryName(reader, name) {
152
152
 
153
153
  function isDeferredConditional(typ) {
154
154
  const matchValue = typ.flags;
155
- if ($007CHasTypeFlags$007C_$007C(16777216, matchValue) != null) {
155
+ if ($007CHasTypeFlags$007C_$007C(67108864, matchValue) != null) {
156
156
  return true;
157
157
  }
158
158
  else {
@@ -161,14 +161,14 @@ function isDeferredConditional(typ) {
161
161
  }
162
162
 
163
163
  function inferTypeNodes(node) {
164
- return toList(delay(() => append((node.kind === 195) ? singleton(node) : empty_1(), delay(() => collect(inferTypeNodes, node.getChildren())))));
164
+ return toList(delay(() => append((node.kind === 196) ? singleton(node) : empty_1(), delay(() => collect(inferTypeNodes, node.getChildren())))));
165
165
  }
166
166
 
167
167
  function inferredConstraint(reader, inferTypeNode) {
168
168
  const matchValue_1 = inferTypeNode.typeParameter.constraint;
169
169
  if (matchValue_1 == null) {
170
170
  let atPosition;
171
- if (inferTypeNode.parent.kind === 183) {
171
+ if (inferTypeNode.parent.kind === 184) {
172
172
  const typeReferenceNode = inferTypeNode.parent;
173
173
  let position;
174
174
  const option_1 = typeReferenceNode.typeArguments;
@@ -194,7 +194,7 @@ function inferredConstraint(reader, inferTypeNode) {
194
194
  if (option_9 != null) {
195
195
  const declaration = option_9;
196
196
  const matchValue = declaration.kind;
197
- option_13 = ((matchValue === 263) ? declaration.typeParameters : ((matchValue === 264) ? declaration.typeParameters : ((matchValue === 265) ? declaration.typeParameters : undefined)));
197
+ option_13 = ((matchValue === 264) ? declaration.typeParameters : ((matchValue === 265) ? declaration.typeParameters : ((matchValue === 266) ? declaration.typeParameters : undefined)));
198
198
  }
199
199
  else {
200
200
  option_13 = undefined;
@@ -204,7 +204,7 @@ function inferredConstraint(reader, inferTypeNode) {
204
204
  const option_11 = position;
205
205
  if (option_11 != null) {
206
206
  const position_1 = option_11 | 0;
207
- atPosition = ((position_1 < typeParameters.length) ? item_4(position_1, typeParameters).constraint : undefined);
207
+ atPosition = ((position_1 < ~~typeParameters.length) ? (typeParameters[position_1]).constraint : undefined);
208
208
  }
209
209
  else {
210
210
  atPosition = undefined;
@@ -250,10 +250,10 @@ function truncateToDeclaredArity(reader, symbolOpt, typeArguments) {
250
250
  const declaration = option_8;
251
251
  const matchValue = declaration.kind;
252
252
  switch (matchValue) {
253
- case 263:
254
253
  case 264:
255
- case 265: {
256
- declaredArity = defaultArg((option_5 = declaration.typeParameters, (option_5 != null) ? ((_arg = option_5, _arg.length)) : undefined), 0);
254
+ case 265:
255
+ case 266: {
256
+ declaredArity = defaultArg((option_5 = declaration.typeParameters, (option_5 != null) ? ((_arg = option_5, ~~_arg.length)) : undefined), 0);
257
257
  break;
258
258
  }
259
259
  default:
@@ -285,7 +285,7 @@ function truncateToDeclaredArity(reader, symbolOpt, typeArguments) {
285
285
  }
286
286
 
287
287
  function isGlobalThisQuery(typeNode) {
288
- if (typeNode.kind === 186) {
288
+ if (typeNode.kind === 187) {
289
289
  return entityNameText(typeNode.exprName) === "globalThis";
290
290
  }
291
291
  else {
@@ -297,7 +297,7 @@ function readTypeUsingFlags(reader, typ) {
297
297
  let declarations;
298
298
  const matchValue = typ.flags;
299
299
  let matchResult;
300
- if ($007CHasTypeFlags$007C_$007C(524288, matchValue) != null) {
300
+ if ($007CHasTypeFlags$007C_$007C(1048576, matchValue) != null) {
301
301
  if (Operators_IsNull(typ.symbol)) {
302
302
  matchResult = 0;
303
303
  }
@@ -312,7 +312,7 @@ function readTypeUsingFlags(reader, typ) {
312
312
  case 0:
313
313
  return new GlueType(/* Primitive */ 3, [GluePrimitive.Any]);
314
314
  default:
315
- if ($007CHasTypeFlags$007C_$007C(524288, matchValue) != null) {
315
+ if ($007CHasTypeFlags$007C_$007C(1048576, matchValue) != null) {
316
316
  const matchValue_1 = typ.symbol.declarations;
317
317
  if (matchValue_1 == null) {
318
318
  return new GlueType(/* Primitive */ 3, [GluePrimitive.Any]);
@@ -322,10 +322,10 @@ function readTypeUsingFlags(reader, typ) {
322
322
  const declaration = item_4(0, declarations_1);
323
323
  const matchValue_2 = declaration.kind;
324
324
  switch (matchValue_2) {
325
- case 263:
326
- return new GlueType(/* ClassDeclaration */ 12, [new GlueClassDeclaration(empty(), reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_checker"]().getFullyQualifiedName(typ.symbol), typ.symbol.name, empty(), empty(), empty(), empty(), true)]);
327
325
  case 264:
328
- case 265: {
326
+ return new GlueType(/* ClassDeclaration */ 12, [new GlueClassDeclaration(empty(), reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_checker"]().getFullyQualifiedName(typ.symbol), typ.symbol.name, empty(), empty(), empty(), empty(), true)]);
327
+ case 265:
328
+ case 266: {
329
329
  const flags = 1 | 16384;
330
330
  const matchValue_3 = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_checker"]().typeToTypeNode(typ, undefined, flags);
331
331
  if (matchValue_3 == null) {
@@ -336,7 +336,7 @@ function readTypeUsingFlags(reader, typ) {
336
336
  return reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNode24A678AD"](typeNode);
337
337
  }
338
338
  }
339
- case 267:
339
+ case 268:
340
340
  return GlueType.Discard;
341
341
  default:
342
342
  return reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadNode6C0FD055"](declaration);
@@ -346,19 +346,19 @@ function readTypeUsingFlags(reader, typ) {
346
346
  throw new Exception("Match failure: Microsoft.FSharp.Core.FSharpOption`1");
347
347
  }
348
348
  }
349
- else if ($007CHasTypeFlags$007C_$007C(4, matchValue) != null) {
349
+ else if ($007CHasTypeFlags$007C_$007C(32, matchValue) != null) {
350
350
  return new GlueType(/* Primitive */ 3, [GluePrimitive.String$]);
351
351
  }
352
- else if ($007CHasTypeFlags$007C_$007C(8, matchValue) != null) {
352
+ else if ($007CHasTypeFlags$007C_$007C(64, matchValue) != null) {
353
353
  return new GlueType(/* Primitive */ 3, [GluePrimitive.Number$]);
354
354
  }
355
- else if ($007CHasTypeFlags$007C_$007C(16, matchValue) != null) {
355
+ else if ($007CHasTypeFlags$007C_$007C(256, matchValue) != null) {
356
356
  return new GlueType(/* Primitive */ 3, [GluePrimitive.Bool]);
357
357
  }
358
358
  else if ($007CHasTypeFlags$007C_$007C(1, matchValue) != null) {
359
359
  return new GlueType(/* Primitive */ 3, [GluePrimitive.Any]);
360
360
  }
361
- else if ($007CHasTypeFlags$007C_$007C(16384, matchValue) != null) {
361
+ else if ($007CHasTypeFlags$007C_$007C(16, matchValue) != null) {
362
362
  return new GlueType(/* Primitive */ 3, [GluePrimitive.Unit]);
363
363
  }
364
364
  else {
@@ -372,13 +372,13 @@ export function UtilityType_readExclude(reader, typeReferenceNode) {
372
372
  const typ = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_checker"]().getTypeFromTypeNode(typeReferenceNode);
373
373
  const matchValue = typ.flags;
374
374
  let matchResult;
375
- if ($007CHasTypeFlags$007C_$007C(128, matchValue) != null) {
375
+ if ($007CHasTypeFlags$007C_$007C(1024, matchValue) != null) {
376
376
  matchResult = 0;
377
377
  }
378
- else if ($007CHasTypeFlags$007C_$007C(256, matchValue) != null) {
378
+ else if ($007CHasTypeFlags$007C_$007C(2048, matchValue) != null) {
379
379
  matchResult = 0;
380
380
  }
381
- else if ($007CHasTypeFlags$007C_$007C(1048576, matchValue) != null) {
381
+ else if ($007CHasTypeFlags$007C_$007C(134217728, matchValue) != null) {
382
382
  matchResult = 0;
383
383
  }
384
384
  else {
@@ -386,13 +386,13 @@ export function UtilityType_readExclude(reader, typeReferenceNode) {
386
386
  }
387
387
  switch (matchResult) {
388
388
  case 0:
389
- return new GlueType(/* Union */ 7, [new GlueTypeUnion((matchValue_1 = typ.flags, ($007CHasTypeFlags$007C_$007C(128, matchValue_1) != null) ? ((activePatternResult_4 = Type_StringLiteral_$007CString$007COther$007C(typ), (activePatternResult_4.tag === 1) ? (((item = Report_readerError_Z19516DCE("Exclude", "Expected a string literal", typeReferenceNode, "/_//src/Glutinum.Converter/Reader/TypeNode.fs", 295), (objectArg = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_Warnings"](), void (objectArg.push(item)))), empty())) : singleton_1(new GlueType(/* Literal */ 8, [new GlueLiteral(/* String */ 0, [activePatternResult_4.fields[0]])])))) : (($007CHasTypeFlags$007C_$007C(256, matchValue_1) != null) ? ((activePatternResult_6 = Type_NumberLiteral_$007CInt$007CFloat$007COther$007C(typ), (activePatternResult_6.tag === 1) ? singleton_1(new GlueType(/* Literal */ 8, [new GlueLiteral(/* Float */ 2, [activePatternResult_6.fields[0]])])) : ((activePatternResult_6.tag === 2) ? (((item_1 = Report_readerError_Z19516DCE("Exclude", "Expected a number literal", typeReferenceNode, "/_//src/Glutinum.Converter/Reader/TypeNode.fs", 310), (objectArg_1 = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_Warnings"](), void (objectArg_1.push(item_1)))), empty())) : singleton_1(new GlueType(/* Literal */ 8, [new GlueLiteral(/* Int */ 1, [activePatternResult_6.fields[0]])]))))) : choose((typ_1) => {
389
+ return new GlueType(/* Union */ 7, [new GlueTypeUnion((matchValue_1 = typ.flags, ($007CHasTypeFlags$007C_$007C(1024, matchValue_1) != null) ? ((activePatternResult_4 = Type_StringLiteral_$007CString$007COther$007C(typ), (activePatternResult_4.tag === 1) ? (((item = Report_readerError_Z19516DCE("Exclude", "Expected a string literal", typeReferenceNode, "/_//src/Glutinum.Converter/Reader/TypeNode.fs", 295), (objectArg = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_Warnings"](), void (objectArg.push(item)))), empty())) : singleton_1(new GlueType(/* Literal */ 8, [new GlueLiteral(/* String */ 0, [activePatternResult_4.fields[0]])])))) : (($007CHasTypeFlags$007C_$007C(2048, matchValue_1) != null) ? ((activePatternResult_6 = Type_NumberLiteral_$007CInt$007CFloat$007COther$007C(typ), (activePatternResult_6.tag === 1) ? singleton_1(new GlueType(/* Literal */ 8, [new GlueLiteral(/* Float */ 2, [activePatternResult_6.fields[0]])])) : ((activePatternResult_6.tag === 2) ? (((item_1 = Report_readerError_Z19516DCE("Exclude", "Expected a number literal", typeReferenceNode, "/_//src/Glutinum.Converter/Reader/TypeNode.fs", 310), (objectArg_1 = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_Warnings"](), void (objectArg_1.push(item_1)))), empty())) : singleton_1(new GlueType(/* Literal */ 8, [new GlueLiteral(/* Int */ 1, [activePatternResult_6.fields[0]])]))))) : choose((typ_1) => {
390
390
  const matchValue_2 = typ_1.flags;
391
- if ($007CHasTypeFlags$007C_$007C(128, matchValue_2) != null) {
391
+ if ($007CHasTypeFlags$007C_$007C(1024, matchValue_2) != null) {
392
392
  const literalType = typ_1;
393
393
  return new GlueType(/* Literal */ 8, [new GlueLiteral(/* String */ 0, [literalType.value])]);
394
394
  }
395
- else if ($007CHasTypeFlags$007C_$007C(256, matchValue_2) != null) {
395
+ else if ($007CHasTypeFlags$007C_$007C(2048, matchValue_2) != null) {
396
396
  const activePatternResult_9 = Type_NumberLiteral_$007CInt$007CFloat$007COther$007C(typ_1);
397
397
  switch (activePatternResult_9.tag) {
398
398
  case 1:
@@ -413,36 +413,36 @@ export function UtilityType_readExclude(reader, typeReferenceNode) {
413
413
  }, toList(typ.types)))))]);
414
414
  default: {
415
415
  let matchResult_1;
416
- if ($007CHasTypeFlags$007C_$007C(16777216, matchValue) != null) {
417
- if ((matchValue_3 = typeReferenceNode.typeArguments, (matchValue_3 != null) && (((typeArguments = matchValue_3, typeArguments.length > 1)) && ((typeArguments_1 = matchValue_3, (excluded = item_4(0, typeArguments_1), (isNullish = ((typeNode) => {
416
+ if ($007CHasTypeFlags$007C_$007C(67108864, matchValue) != null) {
417
+ if ((matchValue_3 = typeReferenceNode.typeArguments, (matchValue_3 != null) && (((typeArguments = matchValue_3, ~~typeArguments.length > 1)) && ((typeArguments_1 = matchValue_3, (excluded = (typeArguments_1[0]), (isNullish = ((typeNode) => {
418
418
  const matchValue_4 = typeNode.kind;
419
419
  switch (matchValue_4) {
420
420
  case 157:
421
421
  return true;
422
- case 192:
422
+ case 193:
423
423
  return forAll(isNullish, typeNode.types);
424
- case 201:
424
+ case 202:
425
425
  return typeNode.literal.kind === 106;
426
426
  default:
427
427
  return false;
428
428
  }
429
- }), (isNullish(item_4(1, typeArguments_1)) ? true : (excluded.kind === 199)) ? true : ((excluded.kind === 183) && ((matchValue_5 = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_checker"]().getSymbolAtLocation(excluded.typeName), (matchValue_5 == null) ? false : ((symbol = matchValue_5, (matchValue_6 = symbol.flags, $007CHasSymbolFlags$007C_$007C(262144, matchValue_6) != null))))))))))))) {
429
+ }), (isNullish(typeArguments_1[1]) ? true : (excluded.kind === 200)) ? true : ((excluded.kind === 184) && ((matchValue_5 = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_checker"]().getSymbolAtLocation(excluded.typeName), (matchValue_5 == null) ? false : ((symbol = matchValue_5, (matchValue_6 = symbol.flags, $007CHasSymbolFlags$007C_$007C(262144, matchValue_6) != null))))))))))))) {
430
430
  matchResult_1 = 0;
431
431
  }
432
432
  else if ($007CHasTypeFlags$007C_$007C(1, matchValue) != null) {
433
- if ((matchValue_7 = typeReferenceNode.typeArguments, (matchValue_7 != null) && (((typeArguments_2 = matchValue_7, typeArguments_2.length > 1)) && ((typeArguments_3 = matchValue_7, (excluded_1 = item_4(0, typeArguments_3), (isNullish_1 = ((typeNode_1) => {
433
+ if ((matchValue_7 = typeReferenceNode.typeArguments, (matchValue_7 != null) && (((typeArguments_2 = matchValue_7, ~~typeArguments_2.length > 1)) && ((typeArguments_3 = matchValue_7, (excluded_1 = (typeArguments_3[0]), (isNullish_1 = ((typeNode_1) => {
434
434
  const matchValue_8 = typeNode_1.kind;
435
435
  switch (matchValue_8) {
436
436
  case 157:
437
437
  return true;
438
- case 192:
438
+ case 193:
439
439
  return forAll(isNullish_1, typeNode_1.types);
440
- case 201:
440
+ case 202:
441
441
  return typeNode_1.literal.kind === 106;
442
442
  default:
443
443
  return false;
444
444
  }
445
- }), (isNullish_1(item_4(1, typeArguments_3)) ? true : (excluded_1.kind === 199)) ? true : ((excluded_1.kind === 183) && ((matchValue_9 = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_checker"]().getSymbolAtLocation(excluded_1.typeName), (matchValue_9 == null) ? false : ((symbol_1 = matchValue_9, (matchValue_10 = symbol_1.flags, $007CHasSymbolFlags$007C_$007C(262144, matchValue_10) != null))))))))))))) {
445
+ }), (isNullish_1(typeArguments_3[1]) ? true : (excluded_1.kind === 200)) ? true : ((excluded_1.kind === 184) && ((matchValue_9 = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_checker"]().getSymbolAtLocation(excluded_1.typeName), (matchValue_9 == null) ? false : ((symbol_1 = matchValue_9, (matchValue_10 = symbol_1.flags, $007CHasSymbolFlags$007C_$007C(262144, matchValue_10) != null))))))))))))) {
446
446
  matchResult_1 = 0;
447
447
  }
448
448
  else {
@@ -454,19 +454,19 @@ export function UtilityType_readExclude(reader, typeReferenceNode) {
454
454
  }
455
455
  }
456
456
  else if ($007CHasTypeFlags$007C_$007C(1, matchValue) != null) {
457
- if ((matchValue_11 = typeReferenceNode.typeArguments, (matchValue_11 != null) && (((typeArguments_4 = matchValue_11, typeArguments_4.length > 1)) && ((typeArguments_5 = matchValue_11, (excluded_2 = item_4(0, typeArguments_5), (isNullish_2 = ((typeNode_2) => {
457
+ if ((matchValue_11 = typeReferenceNode.typeArguments, (matchValue_11 != null) && (((typeArguments_4 = matchValue_11, ~~typeArguments_4.length > 1)) && ((typeArguments_5 = matchValue_11, (excluded_2 = (typeArguments_5[0]), (isNullish_2 = ((typeNode_2) => {
458
458
  const matchValue_12 = typeNode_2.kind;
459
459
  switch (matchValue_12) {
460
460
  case 157:
461
461
  return true;
462
- case 192:
462
+ case 193:
463
463
  return forAll(isNullish_2, typeNode_2.types);
464
- case 201:
464
+ case 202:
465
465
  return typeNode_2.literal.kind === 106;
466
466
  default:
467
467
  return false;
468
468
  }
469
- }), (isNullish_2(item_4(1, typeArguments_5)) ? true : (excluded_2.kind === 199)) ? true : ((excluded_2.kind === 183) && ((matchValue_13 = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_checker"]().getSymbolAtLocation(excluded_2.typeName), (matchValue_13 == null) ? false : ((symbol_2 = matchValue_13, (matchValue_14 = symbol_2.flags, $007CHasSymbolFlags$007C_$007C(262144, matchValue_14) != null))))))))))))) {
469
+ }), (isNullish_2(typeArguments_5[1]) ? true : (excluded_2.kind === 200)) ? true : ((excluded_2.kind === 184) && ((matchValue_13 = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_checker"]().getSymbolAtLocation(excluded_2.typeName), (matchValue_13 == null) ? false : ((symbol_2 = matchValue_13, (matchValue_14 = symbol_2.flags, $007CHasSymbolFlags$007C_$007C(262144, matchValue_14) != null))))))))))))) {
470
470
  matchResult_1 = 0;
471
471
  }
472
472
  else {
@@ -478,15 +478,15 @@ export function UtilityType_readExclude(reader, typeReferenceNode) {
478
478
  }
479
479
  switch (matchResult_1) {
480
480
  case 0:
481
- return reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNode24A678AD"](item_4(0, value_8(typeReferenceNode.typeArguments)));
481
+ return reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNode24A678AD"](value_8(typeReferenceNode.typeArguments)[0]);
482
482
  default:
483
- if ($007CHasTypeFlags$007C_$007C(4, matchValue) != null) {
483
+ if ($007CHasTypeFlags$007C_$007C(32, matchValue) != null) {
484
484
  return new GlueType(/* Primitive */ 3, [GluePrimitive.String$]);
485
485
  }
486
- else if ($007CHasTypeFlags$007C_$007C(8, matchValue) != null) {
486
+ else if ($007CHasTypeFlags$007C_$007C(64, matchValue) != null) {
487
487
  return new GlueType(/* Primitive */ 3, [GluePrimitive.Number$]);
488
488
  }
489
- else if ($007CHasTypeFlags$007C_$007C(16, matchValue) != null) {
489
+ else if ($007CHasTypeFlags$007C_$007C(256, matchValue) != null) {
490
490
  return new GlueType(/* Primitive */ 3, [GluePrimitive.Bool]);
491
491
  }
492
492
  else {
@@ -526,7 +526,7 @@ const UtilityType_expansionsInProgress = [];
526
526
 
527
527
  export function UtilityType_tryExpandAnonymousObjectApplication(reader, typeReferenceNode) {
528
528
  let matchValue, typeArguments, typNode;
529
- if (!((matchValue = typeReferenceNode.typeArguments, (matchValue == null) ? false : ((typeArguments = matchValue, typeArguments.length > 0))))) {
529
+ if (!((matchValue = typeReferenceNode.typeArguments, (matchValue == null) ? false : ((typeArguments = matchValue, ~~typeArguments.length > 0))))) {
530
530
  return undefined;
531
531
  }
532
532
  else {
@@ -540,8 +540,8 @@ export function UtilityType_tryExpandAnonymousObjectApplication(reader, typeRefe
540
540
  isNamedDeclaration = ((matchValue_1 == null) ? false : exists((declaration) => {
541
541
  const matchValue_2 = declaration.kind;
542
542
  switch (matchValue_2) {
543
- case 263:
544
543
  case 264:
544
+ case 265:
545
545
  return true;
546
546
  default:
547
547
  return false;
@@ -561,9 +561,9 @@ export function UtilityType_tryExpandAnonymousObjectApplication(reader, typeRefe
561
561
  const isInProgress = exists((inProgress) => (inProgress === typ), UtilityType_expansionsInProgress);
562
562
  let isGenericMapped;
563
563
  const matchValue_5 = typ.flags;
564
- isGenericMapped = (($007CHasTypeFlags$007C_$007C(524288, matchValue_5) != null) && (((typ.objectFlags & 32) !== 0) && exists((argument) => {
564
+ isGenericMapped = (($007CHasTypeFlags$007C_$007C(1048576, matchValue_5) != null) && (((typ.objectFlags & 32) !== 0) && exists((argument) => {
565
565
  const matchValue_6 = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_checker"]().getTypeFromTypeNode(argument).flags;
566
- if ($007CHasTypeFlags$007C_$007C(262144, matchValue_6) != null) {
566
+ if ($007CHasTypeFlags$007C_$007C(524288, matchValue_6) != null) {
567
567
  return true;
568
568
  }
569
569
  else {
@@ -573,7 +573,7 @@ export function UtilityType_tryExpandAnonymousObjectApplication(reader, typeRefe
573
573
  const isArrayLike = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_checker"]().isArrayLikeType(typ);
574
574
  const matchValue_7 = typ.flags;
575
575
  let matchResult;
576
- if ($007CHasTypeFlags$007C_$007C(524288, matchValue_7) != null) {
576
+ if ($007CHasTypeFlags$007C_$007C(1048576, matchValue_7) != null) {
577
577
  if ((isTupleType(typ) ? true : (isArrayLike && !isNamedDeclaration)) && !isInProgress) {
578
578
  matchResult = 0;
579
579
  }
@@ -597,7 +597,7 @@ export function UtilityType_tryExpandAnonymousObjectApplication(reader, typeRefe
597
597
  }
598
598
  default: {
599
599
  let matchResult_1;
600
- if ($007CHasTypeFlags$007C_$007C(524288, matchValue_7) != null) {
600
+ if ($007CHasTypeFlags$007C_$007C(1048576, matchValue_7) != null) {
601
601
  if ((!isNamedDeclaration && !isInProgress) && !isGenericMapped) {
602
602
  matchResult_1 = 0;
603
603
  }
@@ -622,20 +622,20 @@ export function UtilityType_tryExpandAnonymousObjectApplication(reader, typeRefe
622
622
  return undefined;
623
623
  }
624
624
  else {
625
- return new GlueType(/* TypeLiteral */ 21, [new GlueTypeLiteral(members)]);
625
+ return new GlueType(/* TypeLiteral */ 22, [new GlueTypeLiteral(members, undefined)]);
626
626
  }
627
627
  }
628
628
  default: {
629
629
  let matchResult_2;
630
- if ($007CHasTypeFlags$007C_$007C(4, matchValue_7) != null) {
630
+ if ($007CHasTypeFlags$007C_$007C(32, matchValue_7) != null) {
631
631
  if (isTypeAliasApplication) {
632
632
  matchResult_2 = 0;
633
633
  }
634
- else if ($007CHasTypeFlags$007C_$007C(8, matchValue_7) != null) {
634
+ else if ($007CHasTypeFlags$007C_$007C(64, matchValue_7) != null) {
635
635
  if (isTypeAliasApplication) {
636
636
  matchResult_2 = 0;
637
637
  }
638
- else if ($007CHasTypeFlags$007C_$007C(16, matchValue_7) != null) {
638
+ else if ($007CHasTypeFlags$007C_$007C(256, matchValue_7) != null) {
639
639
  if (isTypeAliasApplication) {
640
640
  matchResult_2 = 0;
641
641
  }
@@ -647,7 +647,7 @@ export function UtilityType_tryExpandAnonymousObjectApplication(reader, typeRefe
647
647
  matchResult_2 = 1;
648
648
  }
649
649
  }
650
- else if ($007CHasTypeFlags$007C_$007C(16, matchValue_7) != null) {
650
+ else if ($007CHasTypeFlags$007C_$007C(256, matchValue_7) != null) {
651
651
  if (isTypeAliasApplication) {
652
652
  matchResult_2 = 0;
653
653
  }
@@ -659,11 +659,11 @@ export function UtilityType_tryExpandAnonymousObjectApplication(reader, typeRefe
659
659
  matchResult_2 = 1;
660
660
  }
661
661
  }
662
- else if ($007CHasTypeFlags$007C_$007C(8, matchValue_7) != null) {
662
+ else if ($007CHasTypeFlags$007C_$007C(64, matchValue_7) != null) {
663
663
  if (isTypeAliasApplication) {
664
664
  matchResult_2 = 0;
665
665
  }
666
- else if ($007CHasTypeFlags$007C_$007C(16, matchValue_7) != null) {
666
+ else if ($007CHasTypeFlags$007C_$007C(256, matchValue_7) != null) {
667
667
  if (isTypeAliasApplication) {
668
668
  matchResult_2 = 0;
669
669
  }
@@ -675,7 +675,7 @@ export function UtilityType_tryExpandAnonymousObjectApplication(reader, typeRefe
675
675
  matchResult_2 = 1;
676
676
  }
677
677
  }
678
- else if ($007CHasTypeFlags$007C_$007C(16, matchValue_7) != null) {
678
+ else if ($007CHasTypeFlags$007C_$007C(256, matchValue_7) != null) {
679
679
  if (isTypeAliasApplication) {
680
680
  matchResult_2 = 0;
681
681
  }
@@ -707,7 +707,7 @@ function UtilityType_baseTypeOf(reader, typeNode) {
707
707
  const matchValue = typ.flags;
708
708
  let matchResult;
709
709
  if ($007CHasTypeFlags$007C_$007C(1, matchValue) != null) {
710
- if ((typeNode.pos < 0) && (typeNode.kind === 183)) {
710
+ if ((typeNode.pos < 0) && (typeNode.kind === 184)) {
711
711
  matchResult = 0;
712
712
  }
713
713
  else {
@@ -731,13 +731,13 @@ function UtilityType_literalKeysOf(typeNode_mut) {
731
731
  const typeNode = typeNode_mut;
732
732
  const matchValue = typeNode.kind;
733
733
  switch (matchValue) {
734
- case 192:
734
+ case 193:
735
735
  return collect_1(UtilityType_literalKeysOf, toList(typeNode.types));
736
- case 196: {
736
+ case 197: {
737
737
  typeNode_mut = typeNode.type;
738
738
  continue UtilityType_literalKeysOf;
739
739
  }
740
- case 201: {
740
+ case 202: {
741
741
  const literal = typeNode.literal;
742
742
  if (literal.kind === 11) {
743
743
  return singleton_1(literal.text);
@@ -806,9 +806,9 @@ function UtilityType_withoutForeignTypeParameters(reader, bound, members) {
806
806
  }
807
807
 
808
808
  export function UtilityType_readPartial(reader, typeReferenceNode) {
809
- const baseType = UtilityType_baseTypeOf(reader, item_4(0, value_8(typeReferenceNode.typeArguments)));
809
+ const baseType = UtilityType_baseTypeOf(reader, value_8(typeReferenceNode.typeArguments)[0]);
810
810
  if (exists((typ) => (typ === baseType), UtilityType_partialsBeingRead)) {
811
- const item = Report_readerError_Z19516DCE("Partial", "Recursive Partial is not supported, defaulting to obj", typeReferenceNode, "/_//src/Glutinum.Converter/Reader/TypeNode.fs", 626);
811
+ const item = Report_readerError_Z19516DCE("Partial", "Recursive Partial is not supported, defaulting to obj", typeReferenceNode, "/_//src/Glutinum.Converter/Reader/TypeNode.fs", 628);
812
812
  const objectArg = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_Warnings"]();
813
813
  void (objectArg.push(item));
814
814
  return new GlueType(/* Primitive */ 3, [GluePrimitive.Any]);
@@ -822,7 +822,7 @@ export function UtilityType_readPartial(reader, typeReferenceNode) {
822
822
  return reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNodeZ64B23DD2"](typNode);
823
823
  }
824
824
  else {
825
- const baseNode = item_4(0, value_8(typeReferenceNode.typeArguments));
825
+ const baseNode = value_8(typeReferenceNode.typeArguments)[0];
826
826
  let members;
827
827
  const matchValue = baseType.flags;
828
828
  let matchResult;
@@ -845,7 +845,7 @@ export function UtilityType_readPartial(reader, typeReferenceNode) {
845
845
  default: {
846
846
  let matchResult_1;
847
847
  if ($007CHasTypeFlags$007C_$007C(1, matchValue) != null) {
848
- if ((baseNode.pos < 0) && (baseNode.kind === 187)) {
848
+ if ((baseNode.pos < 0) && (baseNode.kind === 188)) {
849
849
  matchResult_1 = 0;
850
850
  }
851
851
  else {
@@ -858,12 +858,12 @@ export function UtilityType_readPartial(reader, typeReferenceNode) {
858
858
  switch (matchResult_1) {
859
859
  case 0: {
860
860
  const matchValue_1 = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNode24A678AD"](baseNode);
861
- members = ((matchValue_1.tag === 21) ? matchValue_1.fields[0].Members : empty());
861
+ members = ((matchValue_1.tag === 22) ? matchValue_1.fields[0].Members : empty());
862
862
  break;
863
863
  }
864
864
  default:
865
865
  if ($007CHasTypeFlags$007C_$007C(1, matchValue) != null) {
866
- const item_1 = Report_readerError_Z19516DCE("partial inner type", "Was not able to resolve the inner type, and defaulting to any. If the base type is defined, in another file, please make sure to include it in the input files", typeReferenceNode, "/_//src/Glutinum.Converter/Reader/TypeNode.fs", 669);
866
+ const item_1 = Report_readerError_Z19516DCE("partial inner type", "Was not able to resolve the inner type, and defaulting to any. If the base type is defined, in another file, please make sure to include it in the input files", typeReferenceNode, "/_//src/Glutinum.Converter/Reader/TypeNode.fs", 671);
867
867
  const objectArg_1 = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_Warnings"]();
868
868
  void (objectArg_1.push(item_1));
869
869
  members = empty();
@@ -874,11 +874,11 @@ export function UtilityType_readPartial(reader, typeReferenceNode) {
874
874
  }
875
875
  }
876
876
  }
877
- const defaults = defaultTypeArguments(reader, item_4(0, value_8(typeReferenceNode.typeArguments)));
877
+ const defaults = defaultTypeArguments(reader, value_8(typeReferenceNode.typeArguments)[0]);
878
878
  let members_2;
879
879
  const members_1 = map_1((glueMember) => GlueSubstitution_substituteMember(defaults, glueMember), members);
880
880
  members_2 = ((typeReferenceNode.pos < 0) ? UtilityType_withoutForeignTypeParameters(reader, defaults, members_1) : members_1);
881
- return new GlueType(/* UtilityType */ 26, [new GlueUtilityType(/* Partial */ 0, [new GlueInterface(empty(), getFullNameOrEmpty(reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_checker"](), typeReferenceNode), entityNameText(typeReferenceNode.typeName), members_2, empty(), empty())])]);
881
+ return new GlueType(/* UtilityType */ 27, [new GlueUtilityType(/* Partial */ 0, [new GlueInterface(empty(), getFullNameOrEmpty(reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_checker"](), typeReferenceNode), entityNameText(typeReferenceNode.typeName), members_2, empty(), empty())])]);
882
882
  }
883
883
  }
884
884
  finally {
@@ -889,24 +889,25 @@ export function UtilityType_readPartial(reader, typeReferenceNode) {
889
889
 
890
890
  export function UtilityType_readRecord(reader, typeReferenceNode) {
891
891
  const typeArguments = readTypeArguments(reader, typeReferenceNode);
892
- return new GlueType(/* UtilityType */ 26, [new GlueUtilityType(/* Record */ 1, [new GlueRecord(item_5(0, typeArguments), item_5(1, typeArguments))])]);
892
+ return new GlueType(/* UtilityType */ 27, [new GlueUtilityType(/* Record */ 1, [new GlueRecord(item_5(0, typeArguments), item_5(1, typeArguments))])]);
893
893
  }
894
894
 
895
895
  export function UtilityType_readReturnType(reader, typeReferenceNode) {
896
+ let matchValue_4, matchValue_1, symbol, matchValue_2, declarations, declarations_1;
896
897
  const rawTyp = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_checker"]().getTypeFromTypeNode(typeReferenceNode);
897
898
  let typ;
898
899
  const matchValue = rawTyp.flags;
899
900
  let matchResult;
900
- if ($007CHasTypeFlags$007C_$007C(16777216, matchValue) != null) {
901
+ if ($007CHasTypeFlags$007C_$007C(67108864, matchValue) != null) {
901
902
  matchResult = 0;
902
903
  }
903
- else if ($007CHasTypeFlags$007C_$007C(8388608, matchValue) != null) {
904
+ else if ($007CHasTypeFlags$007C_$007C(33554432, matchValue) != null) {
904
905
  matchResult = 0;
905
906
  }
906
- else if ($007CHasTypeFlags$007C_$007C(33554432, matchValue) != null) {
907
+ else if ($007CHasTypeFlags$007C_$007C(16777216, matchValue) != null) {
907
908
  matchResult = 0;
908
909
  }
909
- else if ($007CHasTypeFlags$007C_$007C(4194304, matchValue) != null) {
910
+ else if ($007CHasTypeFlags$007C_$007C(2097152, matchValue) != null) {
910
911
  matchResult = 0;
911
912
  }
912
913
  else {
@@ -920,13 +921,13 @@ export function UtilityType_readReturnType(reader, typeReferenceNode) {
920
921
  default:
921
922
  typ = rawTyp;
922
923
  }
923
- const matchValue_1 = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_checker"]().typeToTypeNode(typ, undefined, undefined);
924
- if (matchValue_1 == null) {
925
- return new GlueType(/* UtilityType */ 26, [new GlueUtilityType(/* ReturnType */ 2, [readTypeUsingFlags(reader, typ)])]);
924
+ const matchValue_3 = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_checker"]().typeToTypeNode(typ, undefined, undefined);
925
+ if (matchValue_3 == null) {
926
+ return new GlueType(/* UtilityType */ 27, [new GlueUtilityType(/* ReturnType */ 2, [readTypeUsingFlags(reader, typ)])]);
926
927
  }
927
928
  else {
928
- const typeNode = matchValue_1;
929
- return new GlueType(/* UtilityType */ 26, [new GlueUtilityType(/* ReturnType */ 2, [reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNode24A678AD"](typeNode)])]);
929
+ const typeNode = matchValue_3;
930
+ return new GlueType(/* UtilityType */ 27, [new GlueUtilityType(/* ReturnType */ 2, [(matchValue_4 = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNode24A678AD"](typeNode), (matchValue_4.tag === 22) ? ((matchValue_4.fields[0].Id == null) ? (new GlueType(/* TypeLiteral */ 22, [new GlueTypeLiteral(matchValue_4.fields[0].Members, (matchValue_1 = typ.getSymbol(), (matchValue_1 == null) ? undefined : ((symbol = matchValue_1, (matchValue_2 = symbol.declarations, (matchValue_2 != null) ? (((declarations = matchValue_2, declarations.length > 0)) ? ((declarations_1 = matchValue_2, typeLiteralId(item_4(0, declarations_1)))) : undefined) : undefined)))))])) : matchValue_4) : matchValue_4)])]);
930
931
  }
931
932
  }
932
933
 
@@ -934,24 +935,24 @@ export function UtilityType_readThisParameterType(reader, typeReferenceNode) {
934
935
  const typ = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_checker"]().getTypeFromTypeNode(typeReferenceNode);
935
936
  const matchValue = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_checker"]().typeToTypeNode(typ, undefined, undefined);
936
937
  if (matchValue == null) {
937
- return new GlueType(/* UtilityType */ 26, [new GlueUtilityType(/* ThisParameterType */ 3, [readTypeUsingFlags(reader, typ)])]);
938
+ return new GlueType(/* UtilityType */ 27, [new GlueUtilityType(/* ThisParameterType */ 3, [readTypeUsingFlags(reader, typ)])]);
938
939
  }
939
940
  else {
940
941
  const typeNode = matchValue;
941
- return new GlueType(/* UtilityType */ 26, [new GlueUtilityType(/* ThisParameterType */ 3, [reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNode24A678AD"](typeNode)])]);
942
+ return new GlueType(/* UtilityType */ 27, [new GlueUtilityType(/* ThisParameterType */ 3, [reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNode24A678AD"](typeNode)])]);
942
943
  }
943
944
  }
944
945
 
945
946
  export function UtilityType_readOmit(reader, typeReferenceNode) {
946
947
  let option_1, matchValue_3, item_1, objectArg_2, objectArg_3, members_3;
947
948
  let keysToOmitType;
948
- const node = item_4(1, value_8(typeReferenceNode.typeArguments));
949
+ const node = value_8(typeReferenceNode.typeArguments)[1];
949
950
  const objectArg = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_checker"]();
950
951
  keysToOmitType = objectArg.getTypeFromTypeNode(node);
951
952
  const tryReadValueOfKeys = (typ) => {
952
953
  const activePatternResult = Type_StringLiteral_$007CString$007COther$007C(typ);
953
954
  if (activePatternResult.tag === 1) {
954
- const item = Report_readerError_Z19516DCE("keysToOmit", "Expected a string literal", typeReferenceNode, "/_//src/Glutinum.Converter/Reader/TypeNode.fs", 768);
955
+ const item = Report_readerError_Z19516DCE("keysToOmit", "Expected a string literal", typeReferenceNode, "/_//src/Glutinum.Converter/Reader/TypeNode.fs", 782);
955
956
  const objectArg_1 = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_Warnings"]();
956
957
  void (objectArg_1.push(item));
957
958
  return undefined;
@@ -976,13 +977,13 @@ export function UtilityType_readOmit(reader, typeReferenceNode) {
976
977
  }
977
978
  switch (matchResult) {
978
979
  case 0: {
979
- keysToOmit = ofList_1(UtilityType_literalKeysOf(item_4(1, value_8(typeReferenceNode.typeArguments))));
980
+ keysToOmit = ofList_1(UtilityType_literalKeysOf(value_8(typeReferenceNode.typeArguments)[1]));
980
981
  break;
981
982
  }
982
983
  default:
983
984
  keysToOmit = (keysToOmitType.isUnion() ? choose_1(tryReadValueOfKeys, keysToOmitType.types) : defaultArg((option_1 = tryReadValueOfKeys(keysToOmitType), (option_1 != null) ? singleton(option_1) : undefined), []));
984
985
  }
985
- const baseType = UtilityType_baseTypeOf(reader, item_4(0, value_8(typeReferenceNode.typeArguments)));
986
+ const baseType = UtilityType_baseTypeOf(reader, value_8(typeReferenceNode.typeArguments)[0]);
986
987
  let literalMembers;
987
988
  const matchValue_1 = baseType.flags;
988
989
  let matchResult_1;
@@ -999,8 +1000,8 @@ export function UtilityType_readOmit(reader, typeReferenceNode) {
999
1000
  }
1000
1001
  switch (matchResult_1) {
1001
1002
  case 0: {
1002
- const matchValue_2 = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNode24A678AD"](item_4(0, value_8(typeReferenceNode.typeArguments)));
1003
- literalMembers = ((matchValue_2.tag === 20) ? matchValue_2.fields[0] : ((matchValue_2.tag === 21) ? matchValue_2.fields[0].Members : undefined));
1003
+ const matchValue_2 = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNode24A678AD"](value_8(typeReferenceNode.typeArguments)[0]);
1004
+ literalMembers = ((matchValue_2.tag === 20) ? matchValue_2.fields[0] : ((matchValue_2.tag === 22) ? matchValue_2.fields[0].Members : undefined));
1004
1005
  break;
1005
1006
  }
1006
1007
  default:
@@ -1009,7 +1010,7 @@ export function UtilityType_readOmit(reader, typeReferenceNode) {
1009
1010
  const members_1 = collect_1((property) => {
1010
1011
  const matchValue_4 = property.declarations;
1011
1012
  if (matchValue_4 == null) {
1012
- throw new Exception(Report_readerError_Z19516DCE("type node", "Missing declarations", typeReferenceNode, "/_//src/Glutinum.Converter/Reader/TypeNode.fs", 827));
1013
+ throw new Exception(Report_readerError_Z19516DCE("type node", "Missing declarations", typeReferenceNode, "/_//src/Glutinum.Converter/Reader/TypeNode.fs", 841));
1013
1014
  }
1014
1015
  else {
1015
1016
  return map_1((declaration) => readInstantiatedMember(reader, typeReferenceNode, property, declaration), toList(matchValue_4));
@@ -1017,9 +1018,9 @@ export function UtilityType_readOmit(reader, typeReferenceNode) {
1017
1018
  }, toList(filter_1((prop) => !contains_1(prop.name, keysToOmit, {
1018
1019
  Equals: (x, y) => (x === y),
1019
1020
  GetHashCode: (x) => (stringHash(x) | 0),
1020
- }), (matchValue_3 = baseType.flags, ($007CHasTypeFlags$007C_$007C(1, matchValue_3) != null) ? ((literalMembers != null) ? [] : (($007CHasTypeFlags$007C_$007C(1, matchValue_3) != null) ? (((item_1 = Report_readerError_Z19516DCE("omit base type", "Was not able to resolve the base type, and defaulting to any. If the base type is defined, in another file, please make sure to include it in the input files", typeReferenceNode, "/_//src/Glutinum.Converter/Reader/TypeNode.fs", 802), (objectArg_2 = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_Warnings"](), void (objectArg_2.push(item_1)))), [])) : ((objectArg_3 = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_checker"](), objectArg_3.getPropertiesOfType(baseType))))) : (($007CHasTypeFlags$007C_$007C(1, matchValue_3) != null) ? (((item_1 = Report_readerError_Z19516DCE("omit base type", "Was not able to resolve the base type, and defaulting to any. If the base type is defined, in another file, please make sure to include it in the input files", typeReferenceNode, "/_//src/Glutinum.Converter/Reader/TypeNode.fs", 802), (objectArg_2 = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_Warnings"](), void (objectArg_2.push(item_1)))), [])) : ((objectArg_3 = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_checker"](), objectArg_3.getPropertiesOfType(baseType))))))));
1021
- const defaults = defaultTypeArguments(reader, item_4(0, value_8(typeReferenceNode.typeArguments)));
1022
- return new GlueType(/* UtilityType */ 26, [new GlueUtilityType(/* Omit */ 4, [(members_3 = map_1((glueMember_2) => GlueSubstitution_substituteMember(defaults, glueMember_2), (literalMembers == null) ? members_1 : filter((glueMember_1) => {
1021
+ }), (matchValue_3 = baseType.flags, ($007CHasTypeFlags$007C_$007C(1, matchValue_3) != null) ? ((literalMembers != null) ? [] : (($007CHasTypeFlags$007C_$007C(1, matchValue_3) != null) ? (((item_1 = Report_readerError_Z19516DCE("omit base type", "Was not able to resolve the base type, and defaulting to any. If the base type is defined, in another file, please make sure to include it in the input files", typeReferenceNode, "/_//src/Glutinum.Converter/Reader/TypeNode.fs", 816), (objectArg_2 = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_Warnings"](), void (objectArg_2.push(item_1)))), [])) : ((objectArg_3 = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_checker"](), objectArg_3.getPropertiesOfType(baseType))))) : (($007CHasTypeFlags$007C_$007C(1, matchValue_3) != null) ? (((item_1 = Report_readerError_Z19516DCE("omit base type", "Was not able to resolve the base type, and defaulting to any. If the base type is defined, in another file, please make sure to include it in the input files", typeReferenceNode, "/_//src/Glutinum.Converter/Reader/TypeNode.fs", 816), (objectArg_2 = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_Warnings"](), void (objectArg_2.push(item_1)))), [])) : ((objectArg_3 = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_checker"](), objectArg_3.getPropertiesOfType(baseType))))))));
1022
+ const defaults = defaultTypeArguments(reader, value_8(typeReferenceNode.typeArguments)[0]);
1023
+ return new GlueType(/* UtilityType */ 27, [new GlueUtilityType(/* Omit */ 4, [(members_3 = map_1((glueMember_2) => GlueSubstitution_substituteMember(defaults, glueMember_2), (literalMembers == null) ? members_1 : filter((glueMember_1) => {
1023
1024
  let matchValue_5;
1024
1025
  const glueMember = glueMember_1;
1025
1026
  switch (glueMember.tag) {
@@ -1064,10 +1065,10 @@ export function UtilityType_readReadonly(reader, typeReferenceNode) {
1064
1065
  const typ = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_checker"]().getTypeFromTypeNode(typeReferenceNode);
1065
1066
  const matchValue = typ.flags;
1066
1067
  let matchResult;
1067
- if ($007CHasTypeFlags$007C_$007C(524288, matchValue) != null) {
1068
+ if ($007CHasTypeFlags$007C_$007C(1048576, matchValue) != null) {
1068
1069
  matchResult = 0;
1069
1070
  }
1070
- else if ($007CHasTypeFlags$007C_$007C(2097152, matchValue) != null) {
1071
+ else if ($007CHasTypeFlags$007C_$007C(268435456, matchValue) != null) {
1071
1072
  matchResult = 0;
1072
1073
  }
1073
1074
  else {
@@ -1075,15 +1076,15 @@ export function UtilityType_readReadonly(reader, typeReferenceNode) {
1075
1076
  }
1076
1077
  switch (matchResult) {
1077
1078
  case 0:
1078
- return new GlueType(/* UtilityType */ 26, [new GlueUtilityType(/* Readonly */ 5, [new GlueReadonly(/* Members */ 0, [UtilityType_readMembers(reader, typeReferenceNode, typ)])])]);
1079
+ return new GlueType(/* UtilityType */ 27, [new GlueUtilityType(/* Readonly */ 5, [new GlueReadonly(/* Members */ 0, [UtilityType_readMembers(reader, typeReferenceNode, typ)])])]);
1079
1080
  default:
1080
- if ($007CHasTypeFlags$007C_$007C(1048576, matchValue) != null) {
1081
+ if ($007CHasTypeFlags$007C_$007C(134217728, matchValue) != null) {
1081
1082
  const unionType = typ;
1082
1083
  try {
1083
- return new GlueType(/* UtilityType */ 26, [new GlueUtilityType(/* Readonly */ 5, [new GlueReadonly(/* Union */ 1, [toList(choose_1((innerType) => {
1084
+ return new GlueType(/* UtilityType */ 27, [new GlueUtilityType(/* Readonly */ 5, [new GlueReadonly(/* Union */ 1, [toList(choose_1((innerType) => {
1084
1085
  let copyOfStruct, Name;
1085
- if ((copyOfStruct = innerType.flags, (copyOfStruct & 524288) !== 0)) {
1086
- return (Name = item_4(0, value_8(innerType.aliasTypeArguments)).symbol.name, new GlueInterface(empty(), reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_checker"]().getFullyQualifiedName(item_4(0, value_8(innerType.aliasTypeArguments)).symbol), Name, UtilityType_readMembers(reader, typeReferenceNode, innerType), empty(), empty()));
1086
+ if ((copyOfStruct = innerType.flags, (copyOfStruct & 1048576) !== 0)) {
1087
+ return (Name = (value_8(innerType.aliasTypeArguments)[0]).symbol.name, new GlueInterface(empty(), reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_checker"]().getFullyQualifiedName((value_8(innerType.aliasTypeArguments)[0]).symbol), Name, UtilityType_readMembers(reader, typeReferenceNode, innerType), empty(), empty()));
1087
1088
  }
1088
1089
  else {
1089
1090
  return undefined;
@@ -1091,7 +1092,7 @@ export function UtilityType_readReadonly(reader, typeReferenceNode) {
1091
1092
  }, unionType.types))])])]);
1092
1093
  }
1093
1094
  catch (matchValue_1) {
1094
- const item = Report_readerError_Z19516DCE("Readonly", "Unable to read the members of the union type", typeReferenceNode, "/_//src/Glutinum.Converter/Reader/TypeNode.fs", 909);
1095
+ const item = Report_readerError_Z19516DCE("Readonly", "Unable to read the members of the union type", typeReferenceNode, "/_//src/Glutinum.Converter/Reader/TypeNode.fs", 923);
1095
1096
  const objectArg = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_Warnings"]();
1096
1097
  void (objectArg.push(item));
1097
1098
  return new GlueType(/* Primitive */ 3, [GluePrimitive.Any]);
@@ -1104,7 +1105,7 @@ export function UtilityType_readReadonly(reader, typeReferenceNode) {
1104
1105
  }
1105
1106
 
1106
1107
  export function readTypeNode(reader, typeNode) {
1107
- let option_11, symbol_4, matchValue_13, matchValue_20, option_14, arg_2, symbol_5, symbol_7, symbol_8, symbol_9, matchValue_26, option_21, symbol_11, matchValue_27;
1108
+ let option_11, symbol_4, matchValue_14, matchValue_23, option_14, arg_2, symbol_5, symbol_7, symbol_8, symbol_9, matchValue_29, option_21, symbol_11, matchValue_30;
1108
1109
  const checker = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_checker"]();
1109
1110
  const matchValue = typeNode.kind;
1110
1111
  switch (matchValue) {
@@ -1132,20 +1133,20 @@ export function readTypeNode(reader, typeNode) {
1132
1133
  return GlueType.Unknown;
1133
1134
  case 163:
1134
1135
  return new GlueType(/* Primitive */ 3, [GluePrimitive.BigInt$]);
1135
- case 182: {
1136
- const matchValue_11 = typeNode.assertsModifier;
1137
- if (matchValue_11 == null) {
1136
+ case 183: {
1137
+ const matchValue_12 = typeNode.assertsModifier;
1138
+ if (matchValue_12 == null) {
1138
1139
  return new GlueType(/* Primitive */ 3, [GluePrimitive.Bool]);
1139
1140
  }
1140
1141
  else {
1141
1142
  return new GlueType(/* Primitive */ 3, [GluePrimitive.Unit]);
1142
1143
  }
1143
1144
  }
1144
- case 183: {
1145
+ case 184: {
1145
1146
  const typeReferenceNode = typeNode;
1146
1147
  const symbolOpt = symbolAtLocation(checker, typeReferenceNode.typeName);
1147
1148
  const readTypeReference = (isStandardLibrary) => {
1148
- let symbol_2, matchValue_4, declarations, typNode, option_7, valueDeclaration, matchValue_6;
1149
+ let symbol_2, matchValue_4, declarations, typNode, option_7, valueDeclaration, matchValue_6, matchValue_7;
1149
1150
  if ((symbolOpt == null) ? false : ((symbol_2 = symbolOpt, (matchValue_4 = symbol_2.flags, $007CHasSymbolFlags$007C_$007C(262144, matchValue_4) != null)))) {
1150
1151
  return new GlueType(/* TypeParameter */ 16, [value_8(symbolOpt).name]);
1151
1152
  }
@@ -1182,7 +1183,7 @@ export function readTypeNode(reader, typeNode) {
1182
1183
  switch (matchResult) {
1183
1184
  case 0: {
1184
1185
  const declaration = item_4(0, declarations_1);
1185
- isConditionalAlias = ((declaration.kind === 265) && (declaration.type.kind === 194));
1186
+ isConditionalAlias = ((declaration.kind === 266) && (declaration.type.kind === 195));
1186
1187
  break;
1187
1188
  }
1188
1189
  default:
@@ -1200,7 +1201,7 @@ export function readTypeNode(reader, typeNode) {
1200
1201
  if ($007CHasTypeFlags$007C_$007C(1, matchValue_3) != null) {
1201
1202
  matchResult_1 = 0;
1202
1203
  }
1203
- else if ($007CHasTypeFlags$007C_$007C(131072, matchValue_3) != null) {
1204
+ else if ($007CHasTypeFlags$007C_$007C(262144, matchValue_3) != null) {
1204
1205
  matchResult_1 = 0;
1205
1206
  }
1206
1207
  else {
@@ -1225,7 +1226,7 @@ export function readTypeNode(reader, typeNode) {
1225
1226
  }
1226
1227
  }
1227
1228
  if (matchValue_5 == null) {
1228
- const isQualified = typeReferenceNode.typeName.kind === 166;
1229
+ const isQualified = typeReferenceNode.typeName.kind === 167;
1229
1230
  const writtenName = () => {
1230
1231
  if (isQualified) {
1231
1232
  return typeReferenceNode.typeName.right.text;
@@ -1240,11 +1241,18 @@ export function readTypeNode(reader, typeNode) {
1240
1241
  }
1241
1242
  else {
1242
1243
  const symbol_3 = symbolOpt;
1243
- name = defaultArg(orElse(importedName(checker, symbol_3), (option_7 = symbol_3.valueDeclaration, (option_7 != null) ? ((valueDeclaration = option_7, (matchValue_6 = valueDeclaration.kind, (matchValue_6 === 266) ? (isQualified ? symbol_3.name : writtenName()) : ((matchValue_6 === 306) ? (valueDeclaration.symbol.parent.getName()) : writtenName())))) : undefined)), writtenName());
1244
+ name = defaultArg(orElse(importedName(checker, symbol_3), (option_7 = symbol_3.valueDeclaration, (option_7 != null) ? ((valueDeclaration = option_7, (matchValue_6 = valueDeclaration.kind, (matchValue_6 === 267) ? (isQualified ? symbol_3.name : writtenName()) : ((matchValue_6 === 307) ? (valueDeclaration.symbol.parent.getName()) : writtenName())))) : undefined)), writtenName());
1244
1245
  }
1245
1246
  const isUnresolved = ((reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_PackageContext"]() != null) && (symbolOpt == null)) && (typeReferenceNode.pos >= 0);
1246
1247
  const isExternal = isExternalToPackages(checker, reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_PackageContext"](), symbolOpt);
1247
- if (isUnresolved ? true : (isExternal && !FSharpSet__Contains(knownExternalTypeNames, name))) {
1248
+ if ((((name === "...") ? true : ((matchValue_7 = typeReferenceNode.typeArguments, (matchValue_7 == null) ? false : exists((typeArgument) => {
1249
+ if (typeArgument.kind === 184) {
1250
+ return typeArgument.typeName.escapedText === "...";
1251
+ }
1252
+ else {
1253
+ return false;
1254
+ }
1255
+ }, matchValue_7)))) ? true : isUnresolved) ? true : (isExternal && !FSharpSet__Contains(knownExternalTypeNames, name))) {
1248
1256
  return new GlueType(/* Primitive */ 3, [GluePrimitive.Any]);
1249
1257
  }
1250
1258
  else {
@@ -1257,11 +1265,11 @@ export function readTypeNode(reader, typeNode) {
1257
1265
  }
1258
1266
  };
1259
1267
  if (((entityNameText(typeReferenceNode.typeName) === "NoInfer") && (typeReferenceNode.typeArguments != null)) && ((((option_11 = symbolOpt, (option_11 != null) ? ((symbol_4 = option_11, symbol_4.declarations)) : undefined)) == null) ? true : isFromEs5Lib(symbolOpt))) {
1260
- return reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNode24A678AD"](item_4(0, value_8(typeReferenceNode.typeArguments)));
1268
+ return reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNode24A678AD"](value_8(typeReferenceNode.typeArguments)[0]);
1261
1269
  }
1262
1270
  else if (isFromEs5Lib(symbolOpt)) {
1263
- const matchValue_10 = getFullNameOrEmpty(checker, typeReferenceNode.typeName);
1264
- switch (matchValue_10) {
1271
+ const matchValue_11 = getFullNameOrEmpty(checker, typeReferenceNode.typeName);
1272
+ switch (matchValue_11) {
1265
1273
  case "Exclude":
1266
1274
  return UtilityType_readExclude(reader, typeReferenceNode);
1267
1275
  case "Uppercase":
@@ -1269,8 +1277,8 @@ export function readTypeNode(reader, typeNode) {
1269
1277
  case "Capitalize":
1270
1278
  case "Uncapitalize": {
1271
1279
  const literals = (typ_1) => {
1272
- const matchValue_7 = typ_1.flags;
1273
- if ($007CHasTypeFlags$007C_$007C(128, matchValue_7) != null) {
1280
+ const matchValue_8 = typ_1.flags;
1281
+ if ($007CHasTypeFlags$007C_$007C(1024, matchValue_8) != null) {
1274
1282
  const activePatternResult_4 = Type_StringLiteral_$007CString$007COther$007C(typ_1);
1275
1283
  if (activePatternResult_4.tag === 1) {
1276
1284
  return undefined;
@@ -1279,7 +1287,7 @@ export function readTypeNode(reader, typeNode) {
1279
1287
  return singleton_1(new GlueType(/* Literal */ 8, [new GlueLiteral(/* String */ 0, [activePatternResult_4.fields[0]])]));
1280
1288
  }
1281
1289
  }
1282
- else if ($007CHasTypeFlags$007C_$007C(1048576, matchValue_7) != null) {
1290
+ else if ($007CHasTypeFlags$007C_$007C(134217728, matchValue_8) != null) {
1283
1291
  return fold((acc, cases) => {
1284
1292
  let matchResult_2, acc_1, cases_1;
1285
1293
  if (acc != null) {
@@ -1311,17 +1319,17 @@ export function readTypeNode(reader, typeNode) {
1311
1319
  return new GlueType(/* Primitive */ 3, [GluePrimitive.String$]);
1312
1320
  }
1313
1321
  else {
1314
- const matchValue_9 = literals(checker.getTypeFromTypeNode(typeReferenceNode));
1322
+ const matchValue_10 = literals(checker.getTypeFromTypeNode(typeReferenceNode));
1315
1323
  let matchResult_3, single, cases_2;
1316
- if (matchValue_9 != null) {
1317
- if (!isEmpty(matchValue_9)) {
1318
- if (isEmpty(tail(matchValue_9))) {
1324
+ if (matchValue_10 != null) {
1325
+ if (!isEmpty(matchValue_10)) {
1326
+ if (isEmpty(tail(matchValue_10))) {
1319
1327
  matchResult_3 = 0;
1320
- single = head(matchValue_9);
1328
+ single = head(matchValue_10);
1321
1329
  }
1322
1330
  else {
1323
1331
  matchResult_3 = 1;
1324
- cases_2 = matchValue_9;
1332
+ cases_2 = matchValue_10;
1325
1333
  }
1326
1334
  }
1327
1335
  else {
@@ -1361,7 +1369,7 @@ export function readTypeNode(reader, typeNode) {
1361
1369
  return readTypeReference(isFromEsLib(symbolOpt));
1362
1370
  }
1363
1371
  }
1364
- case 184: {
1372
+ case 185: {
1365
1373
  const functionTypeNode = typeNode;
1366
1374
  let typeParameters;
1367
1375
  const collectEnclosing = (node_mut, acc_2_mut) => {
@@ -1376,7 +1384,7 @@ export function readTypeNode(reader, typeNode) {
1376
1384
  acc_2_mut = acc_2;
1377
1385
  continue collectEnclosing;
1378
1386
  }
1379
- else if (node.kind === 168) {
1387
+ else if (node.kind === 169) {
1380
1388
  return empty();
1381
1389
  }
1382
1390
  else {
@@ -1389,36 +1397,36 @@ export function readTypeNode(reader, typeNode) {
1389
1397
  break;
1390
1398
  }
1391
1399
  };
1392
- const matchValue_12 = List_distinctBy((typeParameter) => identifierText(typeParameter.name), collectEnclosing(functionTypeNode, empty()), {
1400
+ const matchValue_13 = List_distinctBy((typeParameter) => identifierText(typeParameter.name), collectEnclosing(functionTypeNode, empty()), {
1393
1401
  Equals: (x, y) => (x === y),
1394
1402
  GetHashCode: (x) => (stringHash(x) | 0),
1395
1403
  });
1396
- typeParameters = (isEmpty(matchValue_12) ? empty() : reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeParameters4088FB9E"](Array.from(matchValue_12)));
1397
- return new GlueType(/* FunctionType */ 15, [new GlueFunctionType(reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadDocumentationFromNode6C0FD055"](typeNode), reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNode24A678AD"](functionTypeNode.type), typeParameters, (matchValue_13 = functionTypeNode.typeParameters, (matchValue_13 == null) ? empty() : toList(map((typeParameter_1) => identifierText(typeParameter_1.name), matchValue_13))), reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadParametersZ17143B5B"](functionTypeNode.parameters))]);
1404
+ typeParameters = (isEmpty(matchValue_13) ? empty() : reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeParameters4BD418D9"]((ts.factory).createNodeArray(Array.from(matchValue_13))));
1405
+ return new GlueType(/* FunctionType */ 15, [new GlueFunctionType(reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadDocumentationFromNode6C0FD055"](typeNode), reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNode24A678AD"](functionTypeNode.type), typeParameters, (matchValue_14 = functionTypeNode.typeParameters, (matchValue_14 == null) ? empty() : toList(map((typeParameter_1) => identifierText(typeParameter_1.name), matchValue_14))), reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadParameters716C1F42"](functionTypeNode.parameters))]);
1398
1406
  }
1399
- case 185: {
1407
+ case 186: {
1400
1408
  const constructorTypeNode = typeNode;
1401
- return new GlueType(/* ConstructorType */ 28, [new GlueConstructSignature(reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadParametersZ17143B5B"](constructorTypeNode.parameters), reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNode24A678AD"](constructorTypeNode.type))]);
1409
+ return new GlueType(/* ConstructorType */ 29, [new GlueConstructSignature(reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadParameters716C1F42"](constructorTypeNode.parameters), reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNode24A678AD"](constructorTypeNode.type))]);
1402
1410
  }
1403
- case 186:
1411
+ case 187:
1404
1412
  return readTypeQueryNode(reader, typeNode);
1405
- case 187: {
1413
+ case 188: {
1406
1414
  const typeLiteralNode = typeNode;
1407
- return new GlueType(/* TypeLiteral */ 21, [new GlueTypeLiteral(map_1((declaration_6) => reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadDeclaration61B89E55"](declaration_6), toList(typeLiteralNode.members)))]);
1415
+ return new GlueType(/* TypeLiteral */ 22, [new GlueTypeLiteral(map_1((declaration_7) => reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadDeclaration61B89E55"](declaration_7), toList(typeLiteralNode.members)), typeLiteralId(typeLiteralNode))]);
1408
1416
  }
1409
- case 188: {
1417
+ case 189: {
1410
1418
  const arrayTypeNode = typeNode;
1411
1419
  return new GlueType(/* Array */ 14, [reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNode24A678AD"](arrayTypeNode.elementType)]);
1412
1420
  }
1413
- case 189: {
1421
+ case 190: {
1414
1422
  const tupleTypeNode = typeNode;
1415
1423
  const elements = map_1((value_4) => value_4, toList(tupleTypeNode.elements));
1416
- if (exists_1((element) => (element.kind === 191), elements)) {
1424
+ if (exists_1((element) => (element.kind === 192), elements)) {
1417
1425
  const elementTypes = List_distinct(map_1((element_1) => {
1418
- if (element_1.kind === 191) {
1419
- const matchValue_18 = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNode24A678AD"](element_1.type);
1420
- if (matchValue_18.tag === 14) {
1421
- return matchValue_18.fields[0];
1426
+ if (element_1.kind === 192) {
1427
+ const matchValue_21 = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNode24A678AD"](element_1.type);
1428
+ if (matchValue_21.tag === 14) {
1429
+ return matchValue_21.fields[0];
1422
1430
  }
1423
1431
  else {
1424
1432
  return new GlueType(/* Primitive */ 3, [GluePrimitive.Any]);
@@ -1429,7 +1437,7 @@ export function readTypeNode(reader, typeNode) {
1429
1437
  }
1430
1438
  }, elements), {
1431
1439
  Equals: equals,
1432
- GetHashCode: (x_2) => (safeHash(x_2) | 0),
1440
+ GetHashCode: (x_3) => (safeHash(x_3) | 0),
1433
1441
  });
1434
1442
  let matchResult_4, elementType_2;
1435
1443
  if (!isEmpty(elementTypes)) {
@@ -1455,25 +1463,25 @@ export function readTypeNode(reader, typeNode) {
1455
1463
  return new GlueType(/* TupleType */ 18, [map_1((typNode_3) => reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNode24A678AD"](typNode_3), elements)]);
1456
1464
  }
1457
1465
  }
1458
- case 190: {
1466
+ case 191: {
1459
1467
  const optionalTypeNode = typeNode;
1460
- return new GlueType(/* OptionalType */ 22, [reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNode24A678AD"](optionalTypeNode.type)]);
1468
+ return new GlueType(/* OptionalType */ 23, [reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNode24A678AD"](optionalTypeNode.type)]);
1461
1469
  }
1462
- case 191:
1463
- return reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNode24A678AD"](typeNode.type);
1464
1470
  case 192:
1465
- return reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadUnionTypeNodeZ5A082EC2"](typeNode);
1471
+ return reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNode24A678AD"](typeNode.type);
1466
1472
  case 193:
1473
+ return reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadUnionTypeNodeZ5A082EC2"](typeNode);
1474
+ case 194:
1467
1475
  if (exists((inProgress) => (inProgress === checker.getTypeAtLocation(typeNode)), intersectionsInProgress)) {
1468
1476
  return new GlueType(/* Primitive */ 3, [GluePrimitive.Any]);
1469
1477
  }
1470
1478
  else if (exists(isGlobalThisQuery, typeNode.types)) {
1471
- const matchValue_19 = toList(filter_1((arg_3) => !isGlobalThisQuery(arg_3), typeNode.types));
1479
+ const matchValue_22 = toList(filter_1((arg_3) => !isGlobalThisQuery(arg_3), typeNode.types));
1472
1480
  let matchResult_5, single_1;
1473
- if (!isEmpty(matchValue_19)) {
1474
- if (isEmpty(tail(matchValue_19))) {
1481
+ if (!isEmpty(matchValue_22)) {
1482
+ if (isEmpty(tail(matchValue_22))) {
1475
1483
  matchResult_5 = 0;
1476
- single_1 = head(matchValue_19);
1484
+ single_1 = head(matchValue_22);
1477
1485
  }
1478
1486
  else {
1479
1487
  matchResult_5 = 1;
@@ -1500,21 +1508,21 @@ export function readTypeNode(reader, typeNode) {
1500
1508
  };
1501
1509
  try {
1502
1510
  const properties_1 = choose((property_1) => {
1503
- const matchValue_21 = property_1.declarations;
1504
- if (matchValue_21 == null) {
1511
+ const matchValue_24 = property_1.declarations;
1512
+ if (matchValue_24 == null) {
1505
1513
  return new IntersectionTypePropertyResult(/* WithoutDeclaration */ 1, [property_1]);
1506
1514
  }
1507
1515
  else {
1508
- const declarations_3 = matchValue_21;
1516
+ const declarations_3 = matchValue_24;
1509
1517
  if (declarations_3.length === 1) {
1510
1518
  return new IntersectionTypePropertyResult(/* Single */ 0, [property_1, item_4(0, declarations_3)]);
1511
1519
  }
1512
1520
  else if (forAll((declaration_2) => {
1513
- if (declaration_2.kind === 171) {
1521
+ if (declaration_2.kind === 172) {
1514
1522
  return true;
1515
1523
  }
1516
1524
  else {
1517
- return declaration_2.kind === 172;
1525
+ return declaration_2.kind === 173;
1518
1526
  }
1519
1527
  }, declarations_3)) {
1520
1528
  return new IntersectionTypePropertyResult(/* WithoutDeclaration */ 1, [property_1]);
@@ -1525,20 +1533,20 @@ export function readTypeNode(reader, typeNode) {
1525
1533
  }
1526
1534
  }, unionOrIntersectionType.isUnion() ? List_distinct(concat_2(map_1((arg_4) => toList(checker.getPropertiesOfType(arg_4)), toList(unionOrIntersectionType.types))), {
1527
1535
  Equals: equals,
1528
- GetHashCode: (x_3) => (structuralHash(x_3) | 0),
1529
- }) : ((matchValue_20 = toList(unionOrIntersectionType.getProperties()), isEmpty(matchValue_20) ? ((intersectionTypeNode.pos >= 0) ? List_distinctBy((property) => property.name, collect_1((constituent) => {
1536
+ GetHashCode: (x_4) => (structuralHash(x_4) | 0),
1537
+ }) : ((matchValue_23 = toList(unionOrIntersectionType.getProperties()), isEmpty(matchValue_23) ? ((intersectionTypeNode.pos >= 0) ? List_distinctBy((property) => property.name, collect_1((constituent) => {
1530
1538
  let type_1;
1531
1539
  return toList((type_1 = checker.getTypeAtLocation(constituent), checker.getPropertiesOfType(type_1)));
1532
1540
  }, toList(intersectionTypeNode.types)), {
1533
- Equals: (x_4, y_4) => (x_4 === y_4),
1534
- GetHashCode: (x_4) => (stringHash(x_4) | 0),
1535
- }) : matchValue_20) : matchValue_20)));
1541
+ Equals: (x_5, y_5) => (x_5 === y_5),
1542
+ GetHashCode: (x_5) => (stringHash(x_5) | 0),
1543
+ }) : matchValue_23) : matchValue_23)));
1536
1544
  const hasUnsupportedProperties = exists_1((property_2) => {
1537
1545
  switch (property_2.tag) {
1538
1546
  case 1:
1539
1547
  return false;
1540
1548
  case 0:
1541
- if (property_2.fields[1].kind === 174) {
1549
+ if (property_2.fields[1].kind === 175) {
1542
1550
  return true;
1543
1551
  }
1544
1552
  else {
@@ -1550,7 +1558,7 @@ export function readTypeNode(reader, typeNode) {
1550
1558
  }, properties_1);
1551
1559
  const callSignatures = unionOrIntersectionType.isUnion() ? empty() : choose((signature) => {
1552
1560
  const flags_1 = 1 | 16384;
1553
- const synthesized = checker.signatureToSignatureDeclaration(signature, 179, typeNode, flags_1);
1561
+ const synthesized = checker.signatureToSignatureDeclaration(signature, 180, typeNode, flags_1);
1554
1562
  if (synthesized == null) {
1555
1563
  return undefined;
1556
1564
  }
@@ -1567,28 +1575,55 @@ export function readTypeNode(reader, typeNode) {
1567
1575
  }
1568
1576
  }
1569
1577
  }, toList(checker.getSignaturesOfType(unionOrIntersectionType, 0)));
1570
- return hasUnsupportedProperties ? (new GlueType(/* Primitive */ 3, [GluePrimitive.Any])) : (new GlueType(/* IntersectionType */ 20, [append_1(choose((_arg) => {
1571
- switch (_arg.tag) {
1572
- case 1:
1573
- return readPropertyWithoutDeclaration(reader, typeNode, _arg.fields[0]);
1574
- case 2:
1575
- throw new Exception("Sould not happen here");
1576
- default:
1577
- return readInstantiatedMember(reader, typeNode, _arg.fields[0], _arg.fields[1]);
1578
- }
1579
- }, properties_1), callSignatures)]));
1578
+ if (hasUnsupportedProperties) {
1579
+ const references = map_1((constituent_1) => {
1580
+ if (constituent_1.kind === 184) {
1581
+ return reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNode24A678AD"](constituent_1);
1582
+ }
1583
+ else {
1584
+ return GlueType.Discard;
1585
+ }
1586
+ }, toList(intersectionTypeNode.types));
1587
+ return (!isEmpty(references) && forAll_1((_arg) => {
1588
+ if (_arg.tag === 13) {
1589
+ return true;
1590
+ }
1591
+ else {
1592
+ return false;
1593
+ }
1594
+ }, references)) ? (new GlueType(/* IntersectionOfReferences */ 21, [references])) : (new GlueType(/* Primitive */ 3, [GluePrimitive.Any]));
1595
+ }
1596
+ else {
1597
+ return new GlueType(/* IntersectionType */ 20, [append_1(choose((_arg_1) => {
1598
+ switch (_arg_1.tag) {
1599
+ case 1:
1600
+ return readPropertyWithoutDeclaration(reader, typeNode, _arg_1.fields[0]);
1601
+ case 2:
1602
+ throw new Exception("Sould not happen here");
1603
+ default:
1604
+ return readInstantiatedMember(reader, typeNode, _arg_1.fields[0], _arg_1.fields[1]);
1605
+ }
1606
+ }, properties_1), append_1(callSignatures, collect_1((constituent_2) => {
1607
+ if (constituent_2.kind === 188) {
1608
+ return map_1((declaration_6) => reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadDeclaration61B89E55"](declaration_6), filter((element_2) => (element_2.kind === 182), toList(constituent_2.members)));
1609
+ }
1610
+ else {
1611
+ return empty();
1612
+ }
1613
+ }, toList(intersectionTypeNode.types))))]);
1614
+ }
1580
1615
  }
1581
1616
  finally {
1582
1617
  disposeSafe(_guard);
1583
1618
  }
1584
1619
  }
1585
- case 194: {
1620
+ case 195: {
1586
1621
  const conditionalTypeNode = typeNode;
1587
1622
  const typ_4 = checker.getTypeAtLocation(conditionalTypeNode);
1588
1623
  if (isDeferredConditional(typ_4)) {
1589
1624
  const warningsCount = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_Warnings"]().length | 0;
1590
1625
  const inferred = ofList(map_1((inferTypeNode) => [inferTypeNode.typeParameter.name.getText(), inferredConstraint(reader, inferTypeNode)], inferTypeNodes(conditionalTypeNode.extendsType)), {
1591
- Compare: (x_5, y_5) => (comparePrimitives(x_5, y_5) | 0),
1626
+ Compare: (x_6, y_6) => (comparePrimitives(x_6, y_6) | 0),
1592
1627
  });
1593
1628
  const conditionalType = new GlueConditionalType(reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNode24A678AD"](conditionalTypeNode.checkType), reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNode24A678AD"](conditionalTypeNode.extendsType), GlueSubstitution_substitute(inferred, reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNode24A678AD"](conditionalTypeNode.trueType)), reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNode24A678AD"](conditionalTypeNode.falseType));
1594
1629
  if (reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_Warnings"]().length > warningsCount) {
@@ -1596,24 +1631,24 @@ export function readTypeNode(reader, typeNode) {
1596
1631
  return new GlueType(/* Primitive */ 3, [GluePrimitive.Any]);
1597
1632
  }
1598
1633
  else {
1599
- return new GlueType(/* ConditionalType */ 32, [conditionalType]);
1634
+ return new GlueType(/* ConditionalType */ 33, [conditionalType]);
1600
1635
  }
1601
1636
  }
1602
1637
  else {
1603
- const matchValue_28 = readTypeUsingFlags(reader, typ_4);
1638
+ const matchValue_31 = readTypeUsingFlags(reader, typ_4);
1604
1639
  let matchResult_6, forward;
1605
- if (matchValue_28.tag === 3) {
1606
- if (matchValue_28.fields[0].tag === 6) {
1640
+ if (matchValue_31.tag === 3) {
1641
+ if (matchValue_31.fields[0].tag === 6) {
1607
1642
  matchResult_6 = 0;
1608
1643
  }
1609
1644
  else {
1610
1645
  matchResult_6 = 1;
1611
- forward = matchValue_28;
1646
+ forward = matchValue_31;
1612
1647
  }
1613
1648
  }
1614
1649
  else {
1615
1650
  matchResult_6 = 1;
1616
- forward = matchValue_28;
1651
+ forward = matchValue_31;
1617
1652
  }
1618
1653
  switch (matchResult_6) {
1619
1654
  case 0:
@@ -1623,31 +1658,31 @@ export function readTypeNode(reader, typeNode) {
1623
1658
  }
1624
1659
  }
1625
1660
  }
1626
- case 195:
1661
+ case 196:
1627
1662
  return inferredConstraint(reader, typeNode);
1628
- case 196: {
1663
+ case 197: {
1629
1664
  const parenthesizedTypeNode = typeNode;
1630
1665
  return reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNode24A678AD"](parenthesizedTypeNode.type);
1631
1666
  }
1632
- case 197: {
1667
+ case 198: {
1633
1668
  const thisTypeNode = typeNode;
1634
1669
  const typ_2 = checker.getTypeAtLocation(thisTypeNode);
1635
1670
  let typParameters_1;
1636
- const matchValue_16 = Operators_IsNull(typ_2.symbol) ? undefined : typ_2.symbol.declarations;
1637
- typParameters_1 = ((matchValue_16 == null) ? empty() : defaultArg((option_14 = tryHead(sortByDescending((typeParameters_1) => (typeParameters_1.length | 0), choose_1((declaration_1) => {
1638
- const matchValue_17 = declaration_1.kind;
1639
- switch (matchValue_17) {
1640
- case 263:
1641
- case 264: {
1671
+ const matchValue_19 = Operators_IsNull(typ_2.symbol) ? undefined : typ_2.symbol.declarations;
1672
+ typParameters_1 = ((matchValue_19 == null) ? empty() : defaultArg((option_14 = tryHead(sortByDescending((typeParameters_1) => (~~typeParameters_1.length | 0), choose_1((declaration_1) => {
1673
+ const matchValue_20 = declaration_1.kind;
1674
+ switch (matchValue_20) {
1675
+ case 264:
1676
+ case 265: {
1642
1677
  const classDeclaration = declaration_1;
1643
1678
  return classDeclaration.typeParameters;
1644
1679
  }
1645
1680
  default:
1646
1681
  return undefined;
1647
1682
  }
1648
- }, matchValue_16), {
1649
- Compare: (x_1, y_1) => (comparePrimitives(x_1, y_1) | 0),
1650
- })), (option_14 != null) ? ((arg_2 = option_14, reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeParameters4088FB9E"](arg_2))) : undefined), empty()));
1683
+ }, matchValue_19), {
1684
+ Compare: (x_2, y_2) => (comparePrimitives(x_2, y_2) | 0),
1685
+ })), (option_14 != null) ? ((arg_2 = option_14, reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeParameters4BD418D9"](arg_2))) : undefined), empty()));
1651
1686
  if (Operators_IsNull(typ_2.symbol)) {
1652
1687
  return new GlueType(/* Primitive */ 3, [GluePrimitive.Any]);
1653
1688
  }
@@ -1655,33 +1690,33 @@ export function readTypeNode(reader, typeNode) {
1655
1690
  return new GlueType(/* ThisType */ 17, [new GlueThisType(defaultArg(declaredName(typ_2.symbol), typ_2.symbol.name), typParameters_1)]);
1656
1691
  }
1657
1692
  }
1658
- case 198: {
1693
+ case 199: {
1659
1694
  const typeOperatorNode = typeNode;
1660
1695
  return reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeOperatorNodeZ6830FC33"](typeOperatorNode);
1661
1696
  }
1662
- case 199: {
1697
+ case 200: {
1663
1698
  const indexedAccessType = typeNode;
1664
1699
  return reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadIndexedAccessTypeZ5577BC0A"](indexedAccessType);
1665
1700
  }
1666
- case 200:
1701
+ case 201:
1667
1702
  return reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadMappedTypeNode28272C00"](typeNode);
1668
- case 201: {
1703
+ case 202: {
1669
1704
  const literalTypeNode = typeNode;
1670
- const matchValue_15 = tryReadLiteral(checker, literalTypeNode.literal);
1671
- if (matchValue_15 == null) {
1672
- throw new Exception(Report_readerError_Z19516DCE("type node - literal type", "Could not read literal type", typeNode, "/_//src/Glutinum.Converter/Reader/TypeNode.fs", 1217));
1705
+ const matchValue_18 = tryReadLiteral(checker, literalTypeNode.literal);
1706
+ if (matchValue_18 == null) {
1707
+ throw new Exception(Report_readerError_Z19516DCE("type node - literal type", "Could not read literal type", typeNode, "/_//src/Glutinum.Converter/Reader/TypeNode.fs", 1276));
1673
1708
  }
1674
1709
  else {
1675
- return new GlueType(/* Literal */ 8, [matchValue_15]);
1710
+ return new GlueType(/* Literal */ 8, [matchValue_18]);
1676
1711
  }
1677
1712
  }
1678
- case 202:
1713
+ case 203:
1679
1714
  return reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadNamedTupleMemberZ6E17C942"](typeNode);
1680
- case 203: {
1715
+ case 204: {
1681
1716
  const templateLiteralTypeNode = typeNode;
1682
1717
  const readResolvedLiterals = (typ_6) => {
1683
- const matchValue_29 = typ_6.flags;
1684
- if ($007CHasTypeFlags$007C_$007C(128, matchValue_29) != null) {
1718
+ const matchValue_32 = typ_6.flags;
1719
+ if ($007CHasTypeFlags$007C_$007C(1024, matchValue_32) != null) {
1685
1720
  const activePatternResult_7 = Type_StringLiteral_$007CString$007COther$007C(typ_6);
1686
1721
  if (activePatternResult_7.tag === 1) {
1687
1722
  return empty();
@@ -1690,52 +1725,76 @@ export function readTypeNode(reader, typeNode) {
1690
1725
  return singleton_1(new GlueType(/* Literal */ 8, [new GlueLiteral(/* String */ 0, [activePatternResult_7.fields[0]])]));
1691
1726
  }
1692
1727
  }
1693
- else if ($007CHasTypeFlags$007C_$007C(1048576, matchValue_29) != null) {
1728
+ else if ($007CHasTypeFlags$007C_$007C(134217728, matchValue_32) != null) {
1694
1729
  return collect_1(readResolvedLiterals, toList(typ_6.types));
1695
1730
  }
1696
1731
  else {
1697
1732
  return empty();
1698
1733
  }
1699
1734
  };
1700
- const matchValue_30 = readResolvedLiterals(checker.getTypeAtLocation(templateLiteralTypeNode));
1701
- if (!isEmpty(matchValue_30)) {
1702
- if (isEmpty(tail(matchValue_30))) {
1703
- return head(matchValue_30);
1735
+ const matchValue_33 = readResolvedLiterals(checker.getTypeAtLocation(templateLiteralTypeNode));
1736
+ if (!isEmpty(matchValue_33)) {
1737
+ if (isEmpty(tail(matchValue_33))) {
1738
+ return head(matchValue_33);
1704
1739
  }
1705
1740
  else {
1706
- return new GlueType(/* Union */ 7, [new GlueTypeUnion(matchValue_30)]);
1741
+ return new GlueType(/* Union */ 7, [new GlueTypeUnion(matchValue_33)]);
1707
1742
  }
1708
1743
  }
1709
1744
  else {
1710
1745
  return GlueType.TemplateLiteral;
1711
1746
  }
1712
1747
  }
1713
- case 205: {
1748
+ case 206: {
1714
1749
  const importTypeNode = typeNode;
1715
- const matchValue_14 = importTypeNode.qualifier;
1716
- if (matchValue_14 == null) {
1717
- return new GlueType(/* Primitive */ 3, [GluePrimitive.Any]);
1750
+ let unresolvedModule;
1751
+ if (importTypeNode.pos < 0) {
1752
+ unresolvedModule = undefined;
1718
1753
  }
1719
- else if (importTypeNode.isTypeOf) {
1720
- const qualifier_1 = matchValue_14;
1721
- const typNode_1 = ts.factory.createTypeQueryNode(qualifier_1);
1722
- return reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNode24A678AD"](typNode_1);
1754
+ else if (importTypeNode.argument.kind === 202) {
1755
+ const literal = importTypeNode.argument.literal;
1756
+ unresolvedModule = ((symbolAtLocation(checker, literal) != null) ? undefined : literal.text);
1723
1757
  }
1724
1758
  else {
1725
- const qualifier_2 = matchValue_14;
1726
- const typNode_2 = ts.factory.createTypeReferenceNode(qualifier_2, unwrap(importTypeNode.typeArguments));
1727
- return reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNode24A678AD"](typNode_2);
1759
+ unresolvedModule = undefined;
1760
+ }
1761
+ const matchValue_16 = importTypeNode.qualifier;
1762
+ if (unresolvedModule == null) {
1763
+ if (matchValue_16 == null) {
1764
+ return new GlueType(/* Primitive */ 3, [GluePrimitive.Any]);
1765
+ }
1766
+ else if (importTypeNode.isTypeOf) {
1767
+ const qualifier_1 = matchValue_16;
1768
+ const typNode_1 = (ts.factory).createTypeQueryNode(qualifier_1);
1769
+ return reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNode24A678AD"](typNode_1);
1770
+ }
1771
+ else {
1772
+ const qualifier_2 = matchValue_16;
1773
+ const typNode_2 = (ts.factory).createTypeReferenceNode(qualifier_2, unwrap(importTypeNode.typeArguments));
1774
+ return reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNode24A678AD"](typNode_2);
1775
+ }
1776
+ }
1777
+ else {
1778
+ const moduleName = unresolvedModule;
1779
+ const warning = concat("\'", moduleName, "\' is not installed, the types imported from it are generated as \'obj\'");
1780
+ if (!contains_2(warning, reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_Warnings"](), {
1781
+ Equals: (x_1, y_1) => (x_1 === y_1),
1782
+ GetHashCode: (x_1) => (stringHash(x_1) | 0),
1783
+ })) {
1784
+ void (reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_Warnings"]().push(warning));
1785
+ }
1786
+ return new GlueType(/* Primitive */ 3, [GluePrimitive.Any]);
1728
1787
  }
1729
1788
  }
1730
- case 233: {
1789
+ case 234: {
1731
1790
  const expression = typeNode;
1732
1791
  const typ_3 = checker.getTypeFromTypeNode(expression);
1733
1792
  const symbolOpt_1 = orElse(orElse(typ_3.aliasSymbol, Operators_IsNull(typ_3.symbol) ? undefined : typ_3.symbol), checker.getSymbolAtLocation(expression.expression));
1734
- const matchValue_23 = isFromEs5Lib(symbolOpt_1);
1735
- const matchValue_24 = getFullNameOrEmpty(checker, expression.expression);
1793
+ const matchValue_26 = isFromEs5Lib(symbolOpt_1);
1794
+ const matchValue_27 = getFullNameOrEmpty(checker, expression.expression);
1736
1795
  let matchResult_7;
1737
- if (matchValue_23) {
1738
- if (matchValue_24 === "Omit") {
1796
+ if (matchValue_26) {
1797
+ if (matchValue_27 === "Omit") {
1739
1798
  matchResult_7 = 0;
1740
1799
  }
1741
1800
  else {
@@ -1749,24 +1808,24 @@ export function readTypeNode(reader, typeNode) {
1749
1808
  case 0:
1750
1809
  return UtilityType_readOmit(reader, expression);
1751
1810
  default: {
1752
- const isQualified_1 = expression.expression.kind === 211;
1811
+ const isQualified_1 = expression.expression.kind === 212;
1753
1812
  const name_1 = (symbolOpt_1 != null) ? (((symbol_5 = symbolOpt_1, symbol_5.name === "default")) ? ((symbol_7 = symbolOpt_1, defaultArg(declaredName(symbol_7), symbol_7.name))) : ((!isFromEs5Lib(symbolOpt_1)) ? ((symbol_8 = symbolOpt_1, symbol_8.name)) : (isQualified_1 ? expression.expression.name.text : expression.expression.getText()))) : (isQualified_1 ? expression.expression.name.text : expression.expression.getText());
1754
1813
  const isExternal_1 = isExternalToPackages(checker, reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_PackageContext"](), symbolOpt_1);
1755
1814
  if (((symbolOpt_1 == null) ? false : ((symbol_9 = symbolOpt_1, (symbol_9.name === "__type") ? true : (symbol_9.name === "__object")))) ? true : ((isExternal_1 && !FSharpSet__Contains(knownExternalTypeNames, name_1)) && !(isFromEs5Lib(symbolOpt_1) && (name_1 === "Partial")))) {
1756
1815
  return GlueType.Discard;
1757
1816
  }
1758
1817
  else {
1759
- return new GlueType(/* TypeReference */ 13, [new GlueTypeReference((name_1.indexOf(".") >= 0) ? name_1 : sanitizeTypeName(name_1), (matchValue_26 = ((option_21 = symbolOpt_1, (option_21 != null) ? resolveAlias(checker, option_21) : undefined)), (matchValue_26 == null) ? getFullNameOrEmpty(checker, expression.expression) : ((symbol_11 = matchValue_26, checker.getFullyQualifiedName(symbol_11)))), isLibraryName(reader, name_1) ? empty() : modulePathForSymbol(checker, reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_PackageContext"](), isQualified_1, symbolOpt_1), (matchValue_27 = readTypeArguments(reader, expression), isEmpty(matchValue_27) ? map_1((argument) => {
1818
+ return new GlueType(/* TypeReference */ 13, [new GlueTypeReference((name_1.indexOf(".") >= 0) ? name_1 : sanitizeTypeName(name_1), (matchValue_29 = ((option_21 = symbolOpt_1, (option_21 != null) ? resolveAlias(checker, option_21) : undefined)), (matchValue_29 == null) ? getFullNameOrEmpty(checker, expression.expression) : ((symbol_11 = matchValue_29, checker.getFullyQualifiedName(symbol_11)))), isLibraryName(reader, name_1) ? empty() : modulePathForSymbol(checker, reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_PackageContext"](), isQualified_1, symbolOpt_1), (matchValue_30 = readTypeArguments(reader, expression), isEmpty(matchValue_30) ? map_1((argument) => {
1760
1819
  const flags_2 = 1 | 16384;
1761
1820
  const typNode_4 = checker.typeToTypeNode(argument, undefined, flags_2);
1762
1821
  return reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNodeZ64B23DD2"](typNode_4);
1763
- }, resolvedBaseTypeArguments(checker, expression)) : matchValue_27), (isFromEs5Lib(symbolOpt_1) ? true : isExternal_1) ? true : isLibraryName(reader, name_1))]);
1822
+ }, resolvedBaseTypeArguments(checker, expression)) : matchValue_30), (isFromEs5Lib(symbolOpt_1) ? true : isExternal_1) ? true : isLibraryName(reader, name_1))]);
1764
1823
  }
1765
1824
  }
1766
1825
  }
1767
1826
  }
1768
1827
  default: {
1769
- const item = Report_readerError_Z19516DCE("type node", concat("Unsupported kind ", TypeScript_Ts_SyntaxKind__SyntaxKind_get_Name(typeNode.kind)), typeNode, "/_//src/Glutinum.Converter/Reader/TypeNode.fs", 1671);
1828
+ const item = Report_readerError_Z19516DCE("type node", concat("Unsupported kind ", TypeScript_Ts_SyntaxKind__SyntaxKind_get_Name(typeNode.kind)), typeNode, "/_//src/Glutinum.Converter/Reader/TypeNode.fs", 1766);
1770
1829
  const objectArg = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_Warnings"]();
1771
1830
  void (objectArg.push(item));
1772
1831
  return new GlueType(/* Primitive */ 3, [GluePrimitive.Any]);