@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.
- package/dist/Glutinum.Converter/FsharpAST.js +38 -4
- package/dist/Glutinum.Converter/Generate.js +15 -7
- package/dist/Glutinum.Converter/GlueAST.js +45 -36
- package/dist/Glutinum.Converter/Hosting.js +918 -0
- package/dist/Glutinum.Converter/Merge.js +218 -82
- package/dist/Glutinum.Converter/Packages.js +44 -8
- package/dist/Glutinum.Converter/Printer.js +77 -49
- package/dist/Glutinum.Converter/Read.js +8 -8
- package/dist/Glutinum.Converter/Reader/ClassDeclaration.js +7 -7
- package/dist/Glutinum.Converter/Reader/Declaration.js +26 -26
- package/dist/Glutinum.Converter/Reader/Documentation.js +37 -36
- package/dist/Glutinum.Converter/Reader/ExportAssignment.js +5 -5
- package/dist/Glutinum.Converter/Reader/ExportDeclaration.js +31 -19
- package/dist/Glutinum.Converter/Reader/FunctionDeclaration.js +6 -7
- package/dist/Glutinum.Converter/Reader/IndexedAccessType.js +36 -29
- package/dist/Glutinum.Converter/Reader/InterfaceDeclaration.js +3 -3
- package/dist/Glutinum.Converter/Reader/MappedTypeNode.js +82 -4
- package/dist/Glutinum.Converter/Reader/ModuleDeclaration.js +3 -3
- package/dist/Glutinum.Converter/Reader/Node.js +20 -20
- package/dist/Glutinum.Converter/Reader/Parameters.js +7 -7
- package/dist/Glutinum.Converter/Reader/TypeAliasDeclaration.js +5 -5
- package/dist/Glutinum.Converter/Reader/TypeNode.js +291 -232
- package/dist/Glutinum.Converter/Reader/TypeOperatorNode.js +8 -8
- package/dist/Glutinum.Converter/Reader/TypeQueryNode.js +108 -40
- package/dist/Glutinum.Converter/Reader/TypeScriptReader.js +2 -2
- package/dist/Glutinum.Converter/Reader/Types.js +6 -6
- package/dist/Glutinum.Converter/Reader/UnionTypeNode.js +7 -6
- package/dist/Glutinum.Converter/Reader/Utils.js +106 -56
- package/dist/Glutinum.Converter/Transform.js +2057 -700
- package/dist/Glutinum.Converter/TypeScript.Extensions.js +194 -202
- package/dist/Glutinum.Converter/Utils/Naming.js +7 -0
- package/dist/Glutinum.Converter/Utils/String.js +2 -2
- package/dist/Program.js +38 -26
- package/package.json +2 -2
- package/dist/Glutinum.Converter/TypeScript.js +0 -12
- package/src/Glutinum.Converter/js/bootstrap.js +0 -123
- package/src/Glutinum.Converter/js/host.js +0 -144
- package/src/Glutinum.Converter/js/npm.js +0 -137
- package/src/Glutinum.Converter/js/resolve.js +0 -402
|
@@ -3,11 +3,12 @@ import { toString } from "../fable_modules/fable-library-js.5.17.2/Types.js";
|
|
|
3
3
|
import { StringBuilder__AppendLine, StringBuilder__Append_Z721C83C5, StringBuilder_$ctor } from "../fable_modules/fable-library-js.5.17.2/System.Text.js";
|
|
4
4
|
import { class_type } from "../fable_modules/fable-library-js.5.17.2/Reflection.js";
|
|
5
5
|
import { max } from "../fable_modules/fable-library-js.5.17.2/Double.js";
|
|
6
|
-
import { trimStart, interpolate, join, replace, concat, isNullOrWhiteSpace, replicate } from "../fable_modules/fable-library-js.5.17.2/String.js";
|
|
6
|
+
import { trimStart, interpolate, substring, join, replace, concat, isNullOrWhiteSpace, replicate } from "../fable_modules/fable-library-js.5.17.2/String.js";
|
|
7
7
|
import { isDigit2 } from "../fable_modules/fable-library-js.5.17.2/Char.js";
|
|
8
8
|
import { splitLines, replace as replace_1, removeSingleQuote, removeDoubleQuote, capitalizeFirstLetter } from "./Utils/String.js";
|
|
9
9
|
import { tail as tail_1, cons, head, mapIndexed, empty, forAll, ofArray, concat as concat_1, partition, singleton, append, choose, filter, iterateIndexed, isEmpty, iterate, map, length, exists } from "../fable_modules/fable-library-js.5.17.2/List.js";
|
|
10
10
|
import { disposeSafe, getEnumerator, int32ToString, Exception } from "../fable_modules/fable-library-js.5.17.2/Util.js";
|
|
11
|
+
import { sanitizeTypeParameterName } from "./Utils/Naming.js";
|
|
11
12
|
import { escape, create, isMatch, replace as replace_2 } from "../fable_modules/fable-library-js.5.17.2/RegExp.js";
|
|
12
13
|
import { removeConsecutiveEmptyLines, trimEmptyLines } from "./Utils/List.js";
|
|
13
14
|
import { singleton as singleton_1, append as append_1, delay, toList } from "../fable_modules/fable-library-js.5.17.2/Seq.js";
|
|
@@ -172,13 +173,18 @@ function attributeToText(fsharpAttribute) {
|
|
|
172
173
|
return "[<ParamArray>]";
|
|
173
174
|
case 24:
|
|
174
175
|
return "[<Interface>]";
|
|
176
|
+
case 25:
|
|
177
|
+
return "[<AutoOpen>]";
|
|
175
178
|
case 11:
|
|
176
179
|
if (fsharpAttribute.fields[0] == null) {
|
|
177
180
|
return "[<Obsolete>]";
|
|
178
181
|
}
|
|
179
182
|
else {
|
|
180
183
|
const message_1 = fsharpAttribute.fields[0];
|
|
181
|
-
if ((message_1.indexOf("
|
|
184
|
+
if ((message_1.indexOf("``") >= 0) ? true : (message_1.indexOf("\"\"\"") >= 0)) {
|
|
185
|
+
return concat("[<Obsolete(\"", replace(replace(replace(replace(replace(message_1, "\\", "\\\\"), "\"", "\\\""), "\r", "\\r"), "\n", "\\n"), "\t", "\\t"), "\")>]");
|
|
186
|
+
}
|
|
187
|
+
else if ((message_1.indexOf("\n") >= 0) ? true : (message_1.indexOf("\"") >= 0)) {
|
|
182
188
|
return concat("[<Obsolete(\"\"\"", message_1, "\"\"\")>]");
|
|
183
189
|
}
|
|
184
190
|
else {
|
|
@@ -231,7 +237,7 @@ export function printTypeParametersDeclaration(printer, typeParameters) {
|
|
|
231
237
|
Printer__WriteInline_Z721C83C5(innterPrinter, ", ");
|
|
232
238
|
}
|
|
233
239
|
if (typeParameter.tag === 1) {
|
|
234
|
-
Printer__WriteInline_Z721C83C5(innterPrinter, concat("\'", typeParameter.fields[0].Name));
|
|
240
|
+
Printer__WriteInline_Z721C83C5(innterPrinter, concat("\'", sanitizeTypeParameterName(typeParameter.fields[0].Name)));
|
|
235
241
|
}
|
|
236
242
|
else {
|
|
237
243
|
Printer__WriteInline_Z721C83C5(innterPrinter, `'T${index}`);
|
|
@@ -271,6 +277,7 @@ export function printTypeParametersDeclaration(printer, typeParameters) {
|
|
|
271
277
|
|
|
272
278
|
export function printTypeNameWithTypeParameters(name, typeParameters) {
|
|
273
279
|
const printer = Printer_$ctor();
|
|
280
|
+
const name_1 = name.startsWith("\'") ? ("\'" + sanitizeTypeParameterName(substring(name, 1))) : name;
|
|
274
281
|
if (!isEmpty(typeParameters)) {
|
|
275
282
|
Printer__WriteInline_Z721C83C5(printer, "<");
|
|
276
283
|
iterateIndexed((index, typeParameter) => {
|
|
@@ -278,7 +285,7 @@ export function printTypeNameWithTypeParameters(name, typeParameters) {
|
|
|
278
285
|
Printer__WriteInline_Z721C83C5(printer, ", ");
|
|
279
286
|
}
|
|
280
287
|
if (typeParameter.tag === 1) {
|
|
281
|
-
Printer__WriteInline_Z721C83C5(printer, concat("\'", typeParameter.fields[0].Name));
|
|
288
|
+
Printer__WriteInline_Z721C83C5(printer, concat("\'", sanitizeTypeParameterName(typeParameter.fields[0].Name)));
|
|
282
289
|
}
|
|
283
290
|
else {
|
|
284
291
|
Printer__WriteInline_Z721C83C5(printer, printType(typeParameter.fields[0]));
|
|
@@ -286,7 +293,7 @@ export function printTypeNameWithTypeParameters(name, typeParameters) {
|
|
|
286
293
|
}, typeParameters);
|
|
287
294
|
Printer__WriteInline_Z721C83C5(printer, ">");
|
|
288
295
|
}
|
|
289
|
-
return concat(
|
|
296
|
+
return concat(name_1, Printer__ToStringWithoutTrailNewLine(printer));
|
|
290
297
|
}
|
|
291
298
|
|
|
292
299
|
export function printType(fsharpType) {
|
|
@@ -364,7 +371,7 @@ export function printType(fsharpType) {
|
|
|
364
371
|
}
|
|
365
372
|
}
|
|
366
373
|
case 13:
|
|
367
|
-
return concat("\'", fsharpType.fields[0]);
|
|
374
|
+
return concat("\'", sanitizeTypeParameterName(fsharpType.fields[0]));
|
|
368
375
|
case 3:
|
|
369
376
|
return printType(fsharpType.fields[0]) + " option";
|
|
370
377
|
case 14:
|
|
@@ -386,6 +393,7 @@ export function printType(fsharpType) {
|
|
|
386
393
|
return printTypeNameWithTypeParameters(delegateInfo.Name, delegateInfo.TypeParameters);
|
|
387
394
|
}
|
|
388
395
|
case 4:
|
|
396
|
+
case 21:
|
|
389
397
|
case 6:
|
|
390
398
|
case 10:
|
|
391
399
|
return "obj";
|
|
@@ -524,6 +532,15 @@ function printXmlDoc(printer, elements) {
|
|
|
524
532
|
}, patternInput[1]);
|
|
525
533
|
}
|
|
526
534
|
|
|
535
|
+
function printParameterType(typ) {
|
|
536
|
+
if (typ.tag === 12) {
|
|
537
|
+
return concat("(", printType(typ), ")");
|
|
538
|
+
}
|
|
539
|
+
else {
|
|
540
|
+
return printType(typ);
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
|
|
527
544
|
export function printParameters(printer, parameters) {
|
|
528
545
|
if (length(parameters) === 0) {
|
|
529
546
|
Printer__WriteInline_Z721C83C5(printer, "unit");
|
|
@@ -537,7 +554,7 @@ export function printParameters(printer, parameters) {
|
|
|
537
554
|
if (p.IsOptional) {
|
|
538
555
|
Printer__WriteInline_Z721C83C5(printer, "?");
|
|
539
556
|
}
|
|
540
|
-
Printer__WriteInline_Z721C83C5(printer, concat(p.Name, ": ",
|
|
557
|
+
Printer__WriteInline_Z721C83C5(printer, concat(p.Name, ": ", printParameterType(p.Type)));
|
|
541
558
|
if (hasParamArrayAttribute(p.Attributes)) {
|
|
542
559
|
Printer__WriteInline_Z721C83C5(printer, " []");
|
|
543
560
|
}
|
|
@@ -565,6 +582,10 @@ function printInterface(printer, interfaceInfo) {
|
|
|
565
582
|
printXmlDoc(printer, propertyInfo.XmlDoc);
|
|
566
583
|
printAttributes(printer, propertyInfo.Attributes);
|
|
567
584
|
if (propertyInfo.IsStatic) {
|
|
585
|
+
if (propertyInfo.Body.tag === 1) {
|
|
586
|
+
Printer__Write_Z721C83C5(printer, concat("[<Emit(\"\"\"", ((((((("import { " + interfaceInfo.OriginalName) + " } from \"") + Printer__get_ImportSpecifier(printer)) + "\";\n") + interfaceInfo.OriginalName) + ".") + propertyInfo.OriginalName) + "{{=$0}}", "\"\"\")>]"));
|
|
587
|
+
Printer__get_NewLine(printer);
|
|
588
|
+
}
|
|
568
589
|
Printer__Write_Z721C83C5(printer, "static member inline ");
|
|
569
590
|
FSharpAccessibility_printInline(printer, propertyInfo.Accessibility);
|
|
570
591
|
Printer__WriteInline_Z721C83C5(printer, propertyInfo.Name);
|
|
@@ -573,14 +594,7 @@ function printInterface(printer, interfaceInfo) {
|
|
|
573
594
|
Printer__Write_Z721C83C5(printer, concat("with get () : ", printType(propertyInfo.Type), " ="));
|
|
574
595
|
Printer__get_NewLine(printer);
|
|
575
596
|
Printer__get_Indent(printer);
|
|
576
|
-
|
|
577
|
-
Printer__Write_Z721C83C5(printer, `emitJsExpr () $$"""
|
|
578
|
-
import { ${interfaceInfo.OriginalName} } from "${Printer__get_ImportSpecifier(printer)}";
|
|
579
|
-
${interfaceInfo.OriginalName}.${propertyInfo.OriginalName}"""`);
|
|
580
|
-
}
|
|
581
|
-
else {
|
|
582
|
-
Printer__Write_Z721C83C5(printer, "nativeOnly");
|
|
583
|
-
}
|
|
597
|
+
Printer__Write_Z721C83C5(printer, "nativeOnly");
|
|
584
598
|
Printer__get_Unindent(printer);
|
|
585
599
|
Printer__get_Unindent(printer);
|
|
586
600
|
};
|
|
@@ -595,20 +609,13 @@ ${interfaceInfo.OriginalName}.${propertyInfo.OriginalName}"""`);
|
|
|
595
609
|
Printer__WriteInline_Z721C83C5(printer, concat("set (value: ", printType(propertyInfo.Type), ") ="));
|
|
596
610
|
Printer__get_NewLine(printer);
|
|
597
611
|
Printer__get_Indent(printer);
|
|
598
|
-
|
|
599
|
-
Printer__Write_Z721C83C5(printer, `emitJsExpr (value) $$"""
|
|
600
|
-
import { ${interfaceInfo.OriginalName} } from "${Printer__get_ImportSpecifier(printer)}";
|
|
601
|
-
${interfaceInfo.OriginalName}.${propertyInfo.OriginalName} = $0"""`);
|
|
602
|
-
}
|
|
603
|
-
else {
|
|
604
|
-
Printer__Write_Z721C83C5(printer, "nativeOnly");
|
|
605
|
-
}
|
|
612
|
+
Printer__Write_Z721C83C5(printer, "nativeOnly");
|
|
606
613
|
Printer__get_Unindent(printer);
|
|
607
614
|
Printer__get_Unindent(printer);
|
|
608
615
|
};
|
|
609
|
-
const
|
|
610
|
-
if (
|
|
611
|
-
const accessor =
|
|
616
|
+
const matchValue_1 = propertyInfo.Accessor;
|
|
617
|
+
if (matchValue_1 != null) {
|
|
618
|
+
const accessor = matchValue_1;
|
|
612
619
|
Printer__get_NewLine(printer);
|
|
613
620
|
switch (accessor.tag) {
|
|
614
621
|
case 1: {
|
|
@@ -640,7 +647,7 @@ ${interfaceInfo.OriginalName}.${propertyInfo.OriginalName} = $0"""`);
|
|
|
640
647
|
Printer__WriteInline_Z721C83C5(printer, " -> ");
|
|
641
648
|
}
|
|
642
649
|
const option = p_1.IsOptional ? " option" : "";
|
|
643
|
-
Printer__WriteInline_Z721C83C5(printer, concat(p_1.Name, ": ",
|
|
650
|
+
Printer__WriteInline_Z721C83C5(printer, concat(p_1.Name, ": ", printParameterType(p_1.Type), option));
|
|
644
651
|
}, propertyInfo.Parameters);
|
|
645
652
|
if (length(propertyInfo.Parameters) > 0) {
|
|
646
653
|
Printer__WriteInline_Z721C83C5(printer, " -> ");
|
|
@@ -666,47 +673,37 @@ ${interfaceInfo.OriginalName}.${propertyInfo.OriginalName} = $0"""`);
|
|
|
666
673
|
const staticMemberInfo = _arg.fields[0];
|
|
667
674
|
printXmlDoc(printer, staticMemberInfo.XmlDoc);
|
|
668
675
|
printCompactAttributesAndNewLine(printer, staticMemberInfo.Attributes);
|
|
676
|
+
const macroArguments = join(", ", mapIndexed((index_2, _arg_2) => (`$${index_2}`), staticMemberInfo.Parameters));
|
|
677
|
+
Printer__Write_Z721C83C5(printer, `[<Emit("""import { ${interfaceInfo.OriginalName} } from "${Printer__get_ImportSpecifier(printer)}";
|
|
678
|
+
${interfaceInfo.OriginalName}.${staticMemberInfo.OriginalName}(${macroArguments})""")>]`);
|
|
679
|
+
Printer__get_NewLine(printer);
|
|
669
680
|
Printer__Write_Z721C83C5(printer, concat("static member inline ", staticMemberInfo.Name, " "));
|
|
670
681
|
printTypeParametersDeclaration(printer, staticMemberInfo.TypeParameters);
|
|
671
682
|
if (isEmpty(staticMemberInfo.Parameters)) {
|
|
672
683
|
Printer__WriteInline_Z721C83C5(printer, "() : ");
|
|
673
684
|
Printer__WriteInline_Z721C83C5(printer, printType(staticMemberInfo.Type));
|
|
674
|
-
Printer__WriteInline_Z721C83C5(printer, " =");
|
|
675
|
-
Printer__get_Indent(printer);
|
|
676
|
-
Printer__get_NewLine(printer);
|
|
677
|
-
Printer__Write_Z721C83C5(printer, `emitJsExpr () $$"""
|
|
678
|
-
import { ${interfaceInfo.OriginalName} } from "${Printer__get_ImportSpecifier(printer)}";
|
|
679
|
-
${interfaceInfo.OriginalName}.${staticMemberInfo.OriginalName}()"""`);
|
|
685
|
+
Printer__WriteInline_Z721C83C5(printer, " = nativeOnly");
|
|
680
686
|
Printer__get_NewLine(printer);
|
|
681
|
-
Printer__get_Unindent(printer);
|
|
682
687
|
}
|
|
683
688
|
else {
|
|
684
689
|
Printer__WriteInline_Z721C83C5(printer, "(");
|
|
685
|
-
iterateIndexed((
|
|
686
|
-
if (
|
|
690
|
+
iterateIndexed((index_3, p_2) => {
|
|
691
|
+
if (index_3 !== 0) {
|
|
687
692
|
Printer__WriteInline_Z721C83C5(printer, ", ");
|
|
688
693
|
}
|
|
689
694
|
printInlineAttributes(printer, p_2.Attributes);
|
|
690
695
|
if (p_2.IsOptional) {
|
|
691
696
|
Printer__WriteInline_Z721C83C5(printer, "?");
|
|
692
697
|
}
|
|
693
|
-
Printer__WriteInline_Z721C83C5(printer, concat(p_2.Name, ": ",
|
|
698
|
+
Printer__WriteInline_Z721C83C5(printer, concat(p_2.Name, ": ", printParameterType(p_2.Type)));
|
|
694
699
|
if (hasParamArrayAttribute(p_2.Attributes)) {
|
|
695
700
|
Printer__WriteInline_Z721C83C5(printer, " []");
|
|
696
701
|
}
|
|
697
702
|
}, staticMemberInfo.Parameters);
|
|
698
703
|
Printer__WriteInline_Z721C83C5(printer, "): ");
|
|
699
704
|
Printer__WriteInline_Z721C83C5(printer, printType(staticMemberInfo.Type));
|
|
700
|
-
Printer__WriteInline_Z721C83C5(printer, " =");
|
|
701
|
-
Printer__get_NewLine(printer);
|
|
702
|
-
Printer__get_Indent(printer);
|
|
703
|
-
const forwardedArgments = join(", ", map((p_3) => p_3.Name, staticMemberInfo.Parameters));
|
|
704
|
-
const macroArguments = join(", ", mapIndexed((index_3, _arg_2) => (`$${index_3}`), staticMemberInfo.Parameters));
|
|
705
|
-
Printer__Write_Z721C83C5(printer, `emitJsExpr (${forwardedArgments}) $$"""
|
|
706
|
-
import { ${interfaceInfo.OriginalName} } from "${Printer__get_ImportSpecifier(printer)}";
|
|
707
|
-
${interfaceInfo.OriginalName}.${staticMemberInfo.OriginalName}(${macroArguments})"""`);
|
|
705
|
+
Printer__WriteInline_Z721C83C5(printer, " = nativeOnly");
|
|
708
706
|
Printer__get_NewLine(printer);
|
|
709
|
-
Printer__get_Unindent(printer);
|
|
710
707
|
}
|
|
711
708
|
break;
|
|
712
709
|
}
|
|
@@ -737,7 +734,7 @@ ${interfaceInfo.OriginalName}.${staticMemberInfo.OriginalName}(${macroArguments}
|
|
|
737
734
|
if (p.IsOptional) {
|
|
738
735
|
Printer__WriteInline_Z721C83C5(printer, "?");
|
|
739
736
|
}
|
|
740
|
-
Printer__WriteInline_Z721C83C5(printer, concat(p.Name, ": ",
|
|
737
|
+
Printer__WriteInline_Z721C83C5(printer, concat(p.Name, ": ", printParameterType(p.Type)));
|
|
741
738
|
if (hasParamArrayAttribute(p.Attributes)) {
|
|
742
739
|
Printer__WriteInline_Z721C83C5(printer, " []");
|
|
743
740
|
}
|
|
@@ -791,7 +788,7 @@ function printPrimaryConstructor(printer, constructor) {
|
|
|
791
788
|
else {
|
|
792
789
|
Printer__Write_Z721C83C5(printer, "");
|
|
793
790
|
}
|
|
794
|
-
Printer__WriteInline_Z721C83C5(printer, concat(p.Name, ": ",
|
|
791
|
+
Printer__WriteInline_Z721C83C5(printer, concat(p.Name, ": ", printParameterType(p.Type)));
|
|
795
792
|
if (hasParamArrayAttribute(p.Attributes)) {
|
|
796
793
|
Printer__WriteInline_Z721C83C5(printer, " []");
|
|
797
794
|
}
|
|
@@ -824,7 +821,7 @@ function printClass(printer, classInfo) {
|
|
|
824
821
|
if (p.IsOptional) {
|
|
825
822
|
Printer__WriteInline_Z721C83C5(printer, "?");
|
|
826
823
|
}
|
|
827
|
-
Printer__WriteInline_Z721C83C5(printer, concat(p.Name, ": ",
|
|
824
|
+
Printer__WriteInline_Z721C83C5(printer, concat(p.Name, ": ", printParameterType(p.Type)));
|
|
828
825
|
if (hasParamArrayAttribute(p.Attributes)) {
|
|
829
826
|
Printer__WriteInline_Z721C83C5(printer, " []");
|
|
830
827
|
}
|
|
@@ -1030,6 +1027,37 @@ function print(printer_mut, fsharpTypes_mut) {
|
|
|
1030
1027
|
printDelegate(printer, fsharpType.fields[0]);
|
|
1031
1028
|
break;
|
|
1032
1029
|
}
|
|
1030
|
+
case 21: {
|
|
1031
|
+
const extensionInfo = fsharpType.fields[0];
|
|
1032
|
+
printAttributes(printer, singleton(FSharpAttribute.AutoOpen));
|
|
1033
|
+
Printer__Write_Z721C83C5(printer, concat("module ", extensionInfo.ModuleName, " ="));
|
|
1034
|
+
Printer__get_NewLine(printer);
|
|
1035
|
+
Printer__get_Indent(printer);
|
|
1036
|
+
Printer__get_NewLine(printer);
|
|
1037
|
+
Printer__Write_Z721C83C5(printer, concat("type ", printTypeNameWithTypeParameters(extensionInfo.TargetName, extensionInfo.TypeParameters), " with"));
|
|
1038
|
+
Printer__get_NewLine(printer);
|
|
1039
|
+
Printer__get_Indent(printer);
|
|
1040
|
+
const enumerator = getEnumerator(extensionInfo.Members);
|
|
1041
|
+
try {
|
|
1042
|
+
while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
|
|
1043
|
+
const extensionMember = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
|
|
1044
|
+
const parameters = join(", ", map((parameter) => concat(parameter.Name, ": ", printParameterType(parameter.Type)), extensionMember.Parameters));
|
|
1045
|
+
const arguments$ = join(", ", map((_arg) => _arg.Name, extensionMember.Parameters));
|
|
1046
|
+
Printer__Write_Z721C83C5(printer, `member inline this.${extensionMember.Name}(${parameters}) : ${printType(extensionMember.ReturnType)} =`);
|
|
1047
|
+
Printer__get_NewLine(printer);
|
|
1048
|
+
Printer__get_Indent(printer);
|
|
1049
|
+
Printer__Write_Z721C83C5(printer, `this.${extensionMember.Name}.Invoke(${arguments$})`);
|
|
1050
|
+
Printer__get_NewLine(printer);
|
|
1051
|
+
Printer__get_Unindent(printer);
|
|
1052
|
+
}
|
|
1053
|
+
}
|
|
1054
|
+
finally {
|
|
1055
|
+
disposeSafe(enumerator);
|
|
1056
|
+
}
|
|
1057
|
+
Printer__get_Unindent(printer);
|
|
1058
|
+
Printer__get_Unindent(printer);
|
|
1059
|
+
break;
|
|
1060
|
+
}
|
|
1033
1061
|
case 7:
|
|
1034
1062
|
case 8:
|
|
1035
1063
|
case 18:
|
|
@@ -31,7 +31,7 @@ export function readSourceFile(checker, sourceFile) {
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
function isScript(sourceFile) {
|
|
34
|
-
if (!ts.isExternalModule(sourceFile)) {
|
|
34
|
+
if (!(ts.isExternalModule(sourceFile))) {
|
|
35
35
|
return promotedAmbientModule(sourceFile) == null;
|
|
36
36
|
}
|
|
37
37
|
else {
|
|
@@ -60,7 +60,7 @@ function declarationKey(glueType) {
|
|
|
60
60
|
|
|
61
61
|
function dropShadowedReExports(types) {
|
|
62
62
|
const localKeys = ofSeq_1(choose((glueType) => {
|
|
63
|
-
if (glueType.tag ===
|
|
63
|
+
if (glueType.tag === 32) {
|
|
64
64
|
return undefined;
|
|
65
65
|
}
|
|
66
66
|
else {
|
|
@@ -73,7 +73,7 @@ function dropShadowedReExports(types) {
|
|
|
73
73
|
let modulePath;
|
|
74
74
|
const seen = tupledArg[0];
|
|
75
75
|
const acc = tupledArg[1];
|
|
76
|
-
if (glueType_1.tag ===
|
|
76
|
+
if (glueType_1.tag === 32) {
|
|
77
77
|
const reExport = glueType_1.fields[0];
|
|
78
78
|
const matchValue = declarationKey(reExport.Declaration);
|
|
79
79
|
if (matchValue == null) {
|
|
@@ -133,7 +133,7 @@ function readStatements(reader, sourceFile) {
|
|
|
133
133
|
const matchValue = statement.kind;
|
|
134
134
|
let matchResult;
|
|
135
135
|
switch (matchValue) {
|
|
136
|
-
case
|
|
136
|
+
case 265: {
|
|
137
137
|
if (isMergedInterfaceDeclaration(reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_checker"](), reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_PackageContext"](), statement)) {
|
|
138
138
|
matchResult = 1;
|
|
139
139
|
}
|
|
@@ -142,7 +142,7 @@ function readStatements(reader, sourceFile) {
|
|
|
142
142
|
}
|
|
143
143
|
break;
|
|
144
144
|
}
|
|
145
|
-
case
|
|
145
|
+
case 268: {
|
|
146
146
|
if ((promoted == null) ? false : (promoted === statement)) {
|
|
147
147
|
matchResult = 2;
|
|
148
148
|
}
|
|
@@ -151,7 +151,7 @@ function readStatements(reader, sourceFile) {
|
|
|
151
151
|
}
|
|
152
152
|
break;
|
|
153
153
|
}
|
|
154
|
-
case
|
|
154
|
+
case 279: {
|
|
155
155
|
matchResult = 0;
|
|
156
156
|
break;
|
|
157
157
|
}
|
|
@@ -209,7 +209,7 @@ export function readPackages(checker, packageContext, sourceFiles) {
|
|
|
209
209
|
const moduleDeclaration = matchValue_1;
|
|
210
210
|
importSpecifier = removeSurroundingQuotes(moduleDeclaration.name.text);
|
|
211
211
|
}
|
|
212
|
-
const fileModule = (types_2) => (new FSharpChoice$2(/* Choice2Of2 */ 1, [new GlueType(/* FileModule */
|
|
212
|
+
const fileModule = (types_2) => (new FSharpChoice$2(/* Choice2Of2 */ 1, [new GlueType(/* FileModule */ 31, [new GlueFileModule(PackageContext__FileModuleName_Z11793CAF(packageContext, package$_1, fileName), importSpecifier, false, package$_1.HasRuntime, types_2)])]));
|
|
213
213
|
if (fileName === package$_1.EntryFile) {
|
|
214
214
|
return new FSharpChoice$2(/* Choice1Of2 */ 0, [[types_1, isScript(sourceFile_2)]]);
|
|
215
215
|
}
|
|
@@ -277,7 +277,7 @@ export function readPackages(checker, packageContext, sourceFiles) {
|
|
|
277
277
|
}
|
|
278
278
|
}, patternInput_2[1]);
|
|
279
279
|
patternInput_3 = [append(entryTypes_1, append((globals.length === 0) ? empty_1() : singleton(new GlueType(/* ModuleDeclaration */ 11, [new GlueModuleDeclaration(empty_1(), "global", false, false, true, false, ofSeq(globals))])), fileModules_1)), entryIsGlobal];
|
|
280
|
-
return singleton(new GlueType(/* FileModule */
|
|
280
|
+
return singleton(new GlueType(/* FileModule */ 31, [new GlueFileModule(package$_2.ModuleName, package$_2.RuntimeName, patternInput_3[1], package$_2.HasRuntime, patternInput_3[0])]));
|
|
281
281
|
}, packageContext.Packages);
|
|
282
282
|
const Warnings = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_Warnings"]();
|
|
283
283
|
return {
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
import { map, choose, partition } from "../../fable_modules/fable-library-js.5.17.2/List.js";
|
|
3
3
|
import { toList } from "../../fable_modules/fable-library-js.5.17.2/Seq.js";
|
|
4
4
|
import { GlueType, GlueClassDeclaration, GlueConstructor } from "../GlueAST.js";
|
|
5
|
-
import { isExportAssignmentTarget, isExportedDeclaration, readHeritageClauses, getFullNameOrEmpty,
|
|
5
|
+
import { isExportAssignmentTarget, isExportedDeclaration, readHeritageClauses, getFullNameOrEmpty, ModifierUtil_HasModifier_742AC9D } from "./Utils.js";
|
|
6
6
|
import { singleton } from "../../fable_modules/fable-library-js.5.17.2/Set.js";
|
|
7
7
|
import { comparePrimitives } from "../../fable_modules/fable-library-js.5.17.2/Util.js";
|
|
8
8
|
|
|
9
9
|
export function readClassDeclaration(reader, classDeclaration) {
|
|
10
10
|
const name = classDeclaration.name;
|
|
11
11
|
const patternInput = partition((m) => {
|
|
12
|
-
if (m.kind ===
|
|
12
|
+
if (m.kind === 177) {
|
|
13
13
|
return true;
|
|
14
14
|
}
|
|
15
15
|
else {
|
|
@@ -17,23 +17,23 @@ export function readClassDeclaration(reader, classDeclaration) {
|
|
|
17
17
|
}
|
|
18
18
|
}, toList(classDeclaration.members));
|
|
19
19
|
const constructors_1 = choose((m_1) => {
|
|
20
|
-
if (m_1.kind ===
|
|
20
|
+
if (m_1.kind === 177) {
|
|
21
21
|
const constructor = m_1;
|
|
22
|
-
return new GlueConstructor(reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadDocumentationFromSignature61B89E55"](constructor), reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.
|
|
22
|
+
return new GlueConstructor(reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadDocumentationFromSignature61B89E55"](constructor), reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadParameters716C1F42"](constructor.parameters));
|
|
23
23
|
}
|
|
24
24
|
else {
|
|
25
25
|
return undefined;
|
|
26
26
|
}
|
|
27
27
|
}, patternInput[0]);
|
|
28
28
|
const members_2 = map((declaration) => reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadDeclaration61B89E55"](declaration), toList(patternInput[1]));
|
|
29
|
-
const isDefaultExport =
|
|
30
|
-
const classDeclaration_1 = new GlueType(/* ClassDeclaration */ 12, [new GlueClassDeclaration(reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadDocumentationFromNode6C0FD055"](classDeclaration), getFullNameOrEmpty(reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_checker"](), classDeclaration), name.getText(), constructors_1, members_2, reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.
|
|
29
|
+
const isDefaultExport = ModifierUtil_HasModifier_742AC9D(classDeclaration.modifiers, 90);
|
|
30
|
+
const classDeclaration_1 = new GlueType(/* ClassDeclaration */ 12, [new GlueClassDeclaration(reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadDocumentationFromNode6C0FD055"](classDeclaration), getFullNameOrEmpty(reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_checker"](), classDeclaration), name.getText(), constructors_1, members_2, reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeParameters4BD418D9"](classDeclaration.typeParameters), readHeritageClauses(reader, classDeclaration.heritageClauses), (isDefaultExport ? true : isExportedDeclaration(classDeclaration, singleton(name.getText(), {
|
|
31
31
|
Compare: (x, y) => (comparePrimitives(x, y) | 0),
|
|
32
32
|
}))) ? true : isExportAssignmentTarget(classDeclaration, singleton(name.getText(), {
|
|
33
33
|
Compare: (x_1, y_1) => (comparePrimitives(x_1, y_1) | 0),
|
|
34
34
|
})))]);
|
|
35
35
|
if (isDefaultExport) {
|
|
36
|
-
return new GlueType(/* ExportDefault */
|
|
36
|
+
return new GlueType(/* ExportDefault */ 25, [classDeclaration_1]);
|
|
37
37
|
}
|
|
38
38
|
else {
|
|
39
39
|
return classDeclaration_1;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import { Operators_IsNull } from "../../fable_modules/fable-library-js.5.17.2/FSharp.Core.js";
|
|
3
3
|
import { Exception, defaultOf } from "../../fable_modules/fable-library-js.5.17.2/Util.js";
|
|
4
|
-
import { resolveAlias, readMemberTypeParameters,
|
|
4
|
+
import { resolveAlias, readMemberTypeParameters, ModifierUtil_GetAccessor_2944DA29, identifierText, ModifierUtil_HasModifier_742AC9D, ModifierUtil_GetAccessor_Z1CCFC6BA } from "./Utils.js";
|
|
5
5
|
import { GlueAccessor, GlueType, GluePrimitive, GlueIndexSignature, GlueConstructSignature, GlueCallSignature, GlueSetAccessor, GlueGetAccessor, GlueMethod, GlueMethodSignature, GlueMember, GlueProperty } from "../GlueAST.js";
|
|
6
6
|
import { defaultArg } from "../../fable_modules/fable-library-js.5.17.2/Option.js";
|
|
7
7
|
import { exists } from "../../fable_modules/fable-library-js.5.17.2/Seq.js";
|
|
@@ -19,55 +19,55 @@ export function readDeclaration(reader, declaration) {
|
|
|
19
19
|
let name_1, matchValue_1, Name_1, Documentation_2, Type_1, IsOptional_1, Documentation_1, option_1, matchValue_2, matchValue_5, typeNode, declarations, target_2, matchValue_4;
|
|
20
20
|
const matchValue = declaration.kind;
|
|
21
21
|
switch (matchValue) {
|
|
22
|
-
case
|
|
22
|
+
case 172: {
|
|
23
23
|
const propertySignature = declaration;
|
|
24
24
|
const name = propertySignature.name;
|
|
25
|
-
return new GlueMember(/* Property */ 1, [new GlueProperty((name_1 = propertySignature.name, !Operators_IsNull(name_1.text) ? name_1.text : ((name_1.pos < 0) ? ((matchValue_1 = name_1.escapedText, (matchValue_1 === defaultOf()) ? "computed" : matchValue_1)) : (name_1.getText()))), reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadDocumentationFromNode6C0FD055"](name), reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNodeZ64B23DD2"](propertySignature.type), false, propertySignature.questionToken != null,
|
|
25
|
+
return new GlueMember(/* Property */ 1, [new GlueProperty((name_1 = propertySignature.name, !Operators_IsNull(name_1.text) ? name_1.text : ((name_1.pos < 0) ? ((matchValue_1 = name_1.escapedText, (matchValue_1 === defaultOf()) ? "computed" : matchValue_1)) : (name_1.getText()))), reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadDocumentationFromNode6C0FD055"](name), reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNodeZ64B23DD2"](propertySignature.type), false, propertySignature.questionToken != null, ModifierUtil_GetAccessor_Z1CCFC6BA(propertySignature.modifiers), false)]);
|
|
26
26
|
}
|
|
27
|
-
case
|
|
27
|
+
case 173: {
|
|
28
28
|
const propertyDeclaration = declaration;
|
|
29
29
|
const name_4 = propertyDeclaration.name;
|
|
30
|
-
const hasPrivateModifier =
|
|
30
|
+
const hasPrivateModifier = ModifierUtil_HasModifier_742AC9D(propertyDeclaration.modifiers, 123);
|
|
31
31
|
const isPrivateIdentifier = name_4.kind === 81;
|
|
32
|
-
return new GlueMember(/* Property */ 1, [(Name_1 = identifierText(name_4), (Documentation_2 = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadDocumentationFromNode6C0FD055"](name_4), (Type_1 = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNodeZ64B23DD2"](propertyDeclaration.type), (IsOptional_1 = (propertyDeclaration.questionToken != null), new GlueProperty(Name_1, Documentation_2, Type_1,
|
|
32
|
+
return new GlueMember(/* Property */ 1, [(Name_1 = identifierText(name_4), (Documentation_2 = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadDocumentationFromNode6C0FD055"](name_4), (Type_1 = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNodeZ64B23DD2"](propertyDeclaration.type), (IsOptional_1 = (propertyDeclaration.questionToken != null), new GlueProperty(Name_1, Documentation_2, Type_1, ModifierUtil_HasModifier_742AC9D(propertyDeclaration.modifiers, 126), IsOptional_1, ModifierUtil_GetAccessor_2944DA29(propertyDeclaration.modifiers), hasPrivateModifier ? true : isPrivateIdentifier)))))]);
|
|
33
33
|
}
|
|
34
|
-
case
|
|
34
|
+
case 174: {
|
|
35
35
|
const methodSignature = declaration;
|
|
36
36
|
const name_3 = methodSignature.name;
|
|
37
|
-
return new GlueMember(/* MethodSignature */ 6, [(Documentation_1 = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadDocumentationFromNode6C0FD055"](name_3), new GlueMethodSignature(identifierText(name_3), Documentation_1, readMemberTypeParameters(reader, methodSignature.typeParameters), reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.
|
|
37
|
+
return new GlueMember(/* MethodSignature */ 6, [(Documentation_1 = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadDocumentationFromNode6C0FD055"](name_3), new GlueMethodSignature(identifierText(name_3), Documentation_1, readMemberTypeParameters(reader, methodSignature.typeParameters), reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadParameters716C1F42"](methodSignature.parameters), reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNodeZ64B23DD2"](methodSignature.type)))]);
|
|
38
38
|
}
|
|
39
|
-
case
|
|
39
|
+
case 175: {
|
|
40
40
|
const methodDeclaration = declaration;
|
|
41
41
|
const name_2 = methodDeclaration.name;
|
|
42
|
-
return new GlueMember(/* Method */ 0, [new GlueMethod(identifierText(name_2), reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadDocumentationFromNode6C0FD055"](name_2), readMemberTypeParameters(reader, methodDeclaration.typeParameters), reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.
|
|
42
|
+
return new GlueMember(/* Method */ 0, [new GlueMethod(identifierText(name_2), reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadDocumentationFromNode6C0FD055"](name_2), readMemberTypeParameters(reader, methodDeclaration.typeParameters), reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadParameters716C1F42"](methodDeclaration.parameters), reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNodeZ64B23DD2"](methodDeclaration.type), methodDeclaration.questionToken != null, defaultArg((option_1 = methodDeclaration.modifiers, (option_1 != null) ? exists((modifier) => (modifier.kind === 126), option_1) : undefined), false))]);
|
|
43
43
|
}
|
|
44
|
-
case
|
|
44
|
+
case 178: {
|
|
45
45
|
const getAccessorDeclaration = declaration;
|
|
46
46
|
const name_5 = getAccessorDeclaration.name;
|
|
47
|
-
const hasPrivateModifier_1 =
|
|
47
|
+
const hasPrivateModifier_1 = ModifierUtil_HasModifier_742AC9D(getAccessorDeclaration.modifiers, 123);
|
|
48
48
|
const isPrivateIdentifier_1 = name_5.kind === 81;
|
|
49
|
-
return new GlueMember(/* GetAccessor */ 2, [new GlueGetAccessor(identifierText(name_5), reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadDocumentationFromNode6C0FD055"](name_5), reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNodeZ64B23DD2"](getAccessorDeclaration.type),
|
|
49
|
+
return new GlueMember(/* GetAccessor */ 2, [new GlueGetAccessor(identifierText(name_5), reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadDocumentationFromNode6C0FD055"](name_5), reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNodeZ64B23DD2"](getAccessorDeclaration.type), ModifierUtil_HasModifier_742AC9D(getAccessorDeclaration.modifiers, 126), hasPrivateModifier_1 ? true : isPrivateIdentifier_1)]);
|
|
50
50
|
}
|
|
51
|
-
case
|
|
51
|
+
case 179: {
|
|
52
52
|
const setAccessorDeclaration = declaration;
|
|
53
53
|
const name_6 = setAccessorDeclaration.name;
|
|
54
|
-
const hasPrivateModifier_2 =
|
|
54
|
+
const hasPrivateModifier_2 = ModifierUtil_HasModifier_742AC9D(setAccessorDeclaration.modifiers, 123);
|
|
55
55
|
const isPrivateIdentifier_2 = name_6.kind === 81;
|
|
56
|
-
return new GlueMember(/* SetAccessor */ 3, [new GlueSetAccessor(identifierText(name_6), reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadDocumentationFromNode6C0FD055"](name_6), reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNodeZ64B23DD2"](
|
|
56
|
+
return new GlueMember(/* SetAccessor */ 3, [new GlueSetAccessor(identifierText(name_6), reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadDocumentationFromNode6C0FD055"](name_6), reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNodeZ64B23DD2"]((setAccessorDeclaration.parameters[0]).type), ModifierUtil_HasModifier_742AC9D(setAccessorDeclaration.modifiers, 126), hasPrivateModifier_2 ? true : isPrivateIdentifier_2)]);
|
|
57
57
|
}
|
|
58
|
-
case
|
|
58
|
+
case 180: {
|
|
59
59
|
const callSignature = declaration;
|
|
60
|
-
return new GlueMember(/* CallSignature */ 4, [new GlueCallSignature(readMemberTypeParameters(reader, callSignature.typeParameters), reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.
|
|
60
|
+
return new GlueMember(/* CallSignature */ 4, [new GlueCallSignature(readMemberTypeParameters(reader, callSignature.typeParameters), reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadParameters716C1F42"](callSignature.parameters), reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNodeZ64B23DD2"](callSignature.type))]);
|
|
61
61
|
}
|
|
62
|
-
case
|
|
62
|
+
case 181: {
|
|
63
63
|
const constructSignature = declaration;
|
|
64
|
-
return new GlueMember(/* ConstructSignature */ 7, [new GlueConstructSignature(reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.
|
|
64
|
+
return new GlueMember(/* ConstructSignature */ 7, [new GlueConstructSignature(reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadParameters716C1F42"](constructSignature.parameters), reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNodeZ64B23DD2"](constructSignature.type))]);
|
|
65
65
|
}
|
|
66
|
-
case
|
|
66
|
+
case 182: {
|
|
67
67
|
const indexSignature = declaration;
|
|
68
|
-
return new GlueMember(/* IndexSignature */ 5, [new GlueIndexSignature(reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.
|
|
68
|
+
return new GlueMember(/* IndexSignature */ 5, [new GlueIndexSignature(reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadParameters716C1F42"](indexSignature.parameters), reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNodeZ64B23DD2"](indexSignature.type), (matchValue_2 = indexSignature.modifiers, (matchValue_2 == null) ? false : exists((modifier_1) => (modifier_1.kind === 148), matchValue_2)))]);
|
|
69
69
|
}
|
|
70
|
-
case
|
|
70
|
+
case 261: {
|
|
71
71
|
const variableDeclaration = declaration;
|
|
72
72
|
const name_7 = variableDeclaration.name;
|
|
73
73
|
let isConst;
|
|
@@ -75,7 +75,7 @@ export function readDeclaration(reader, declaration) {
|
|
|
75
75
|
isConst = (!Operators_IsNull(parent) && ((parent.flags & 2) !== 0));
|
|
76
76
|
return new GlueMember(/* Property */ 1, [new GlueProperty(identifierText(name_7), reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadDocumentationFromNode6C0FD055"](name_7), (matchValue_5 = variableDeclaration.type, (matchValue_5 == null) ? (new GlueType(/* Primitive */ 3, [GluePrimitive.Any])) : ((typeNode = matchValue_5, reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNode24A678AD"](typeNode)))), false, false, isConst ? GlueAccessor.ReadOnly : GlueAccessor.ReadWrite, false)]);
|
|
77
77
|
}
|
|
78
|
-
case
|
|
78
|
+
case 263: {
|
|
79
79
|
const functionDeclaration = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadFunctionDeclarationZ72EBD329"](declaration);
|
|
80
80
|
if (functionDeclaration.tag === 6) {
|
|
81
81
|
const info = functionDeclaration.fields[0];
|
|
@@ -85,7 +85,7 @@ export function readDeclaration(reader, declaration) {
|
|
|
85
85
|
throw new Exception("Expected a function declaration");
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
|
-
case
|
|
88
|
+
case 282: {
|
|
89
89
|
const exportSpecifier = declaration;
|
|
90
90
|
let target_1;
|
|
91
91
|
let option_6;
|
|
@@ -125,7 +125,7 @@ export function readDeclaration(reader, declaration) {
|
|
|
125
125
|
}
|
|
126
126
|
let matchResult_1, target_3;
|
|
127
127
|
if (target_1 != null) {
|
|
128
|
-
if ((target_2 = target_1, (matchValue_4 = target_2.kind, (matchValue_4 ===
|
|
128
|
+
if ((target_2 = target_1, (matchValue_4 = target_2.kind, (matchValue_4 === 172) ? true : ((matchValue_4 === 173) ? true : ((matchValue_4 === 174) ? true : ((matchValue_4 === 175) ? true : ((matchValue_4 === 261) ? true : (matchValue_4 === 263)))))))) {
|
|
129
129
|
matchResult_1 = 0;
|
|
130
130
|
target_3 = target_1;
|
|
131
131
|
}
|