@glutinum/cli 0.5.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/Glutinum.Converter/FsharpAST.js +18 -4
- package/dist/Glutinum.Converter/FsharpAST.js.map +1 -1
- package/dist/Glutinum.Converter/GlueAST.js +53 -25
- package/dist/Glutinum.Converter/GlueAST.js.map +1 -1
- package/dist/Glutinum.Converter/Printer.js +9 -1
- package/dist/Glutinum.Converter/Printer.js.map +1 -1
- package/dist/Glutinum.Converter/Reader/ClassDeclaration.js +2 -2
- package/dist/Glutinum.Converter/Reader/ClassDeclaration.js.map +1 -1
- package/dist/Glutinum.Converter/Reader/Declaration.js +3 -3
- package/dist/Glutinum.Converter/Reader/Declaration.js.map +1 -1
- package/dist/Glutinum.Converter/Reader/Documentation.js +65 -22
- package/dist/Glutinum.Converter/Reader/Documentation.js.map +1 -1
- package/dist/Glutinum.Converter/Reader/ExportAssignment.js +1 -1
- package/dist/Glutinum.Converter/Reader/ExportAssignment.js.map +1 -1
- package/dist/Glutinum.Converter/Reader/NamedTupleMember.js +7 -0
- package/dist/Glutinum.Converter/Reader/NamedTupleMember.js.map +1 -0
- package/dist/Glutinum.Converter/Reader/Node.js +1 -1
- package/dist/Glutinum.Converter/Reader/TypeAliasDeclaration.js +1 -1
- package/dist/Glutinum.Converter/Reader/TypeAliasDeclaration.js.map +1 -1
- package/dist/Glutinum.Converter/Reader/TypeNode.js +24 -12
- package/dist/Glutinum.Converter/Reader/TypeNode.js.map +1 -1
- package/dist/Glutinum.Converter/Reader/TypeOperatorNode.js +6 -2
- package/dist/Glutinum.Converter/Reader/TypeOperatorNode.js.map +1 -1
- package/dist/Glutinum.Converter/Reader/TypeScriptReader.js +7 -2
- package/dist/Glutinum.Converter/Reader/TypeScriptReader.js.map +1 -1
- package/dist/Glutinum.Converter/Reader/VariableStatement.js +8 -3
- package/dist/Glutinum.Converter/Reader/VariableStatement.js.map +1 -1
- package/dist/Glutinum.Converter/Transform.js +429 -249
- package/dist/Glutinum.Converter/Transform.js.map +1 -1
- package/dist/Glutinum.Converter/Utils/Naming.js +28 -16
- package/dist/Glutinum.Converter/Utils/Naming.js.map +1 -1
- package/package.json +1 -1
|
@@ -27,7 +27,7 @@ export function readExportAssignment(reader, exportNode) {
|
|
|
27
27
|
else {
|
|
28
28
|
typ = (($007CHasTypeFlags$007C_$007C(4, matchValue_1) != null) ? (new GlueType(3, [new GluePrimitive(0, [])])) : (($007CHasTypeFlags$007C_$007C(8, matchValue_1) != null) ? (new GlueType(3, [new GluePrimitive(5, [])])) : (($007CHasTypeFlags$007C_$007C(16, matchValue_1) != null) ? (new GlueType(3, [new GluePrimitive(3, [])])) : (($007CHasTypeFlags$007C_$007C(1, matchValue_1) != null) ? (new GlueType(3, [new GluePrimitive(6, [])])) : (($007CHasTypeFlags$007C_$007C(16384, matchValue_1) != null) ? (new GlueType(3, [new GluePrimitive(4, [])])) : (new GlueType(3, [new GluePrimitive(6, [])])))))));
|
|
29
29
|
}
|
|
30
|
-
return new GlueType(
|
|
30
|
+
return new GlueType(25, [new GlueType(2, [new GlueVariable(reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadDocumentationFromNode6C0FD055"](exportNode), identiferNode.getText(), typ)])]);
|
|
31
31
|
}
|
|
32
32
|
else {
|
|
33
33
|
return new GlueType(0, []);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/Glutinum.Converter/Reader/ExportAssignment.fs"],"names":["symbolOpt","exportNode","symbol","identiferNode","typ","tsTyp","reader","matchValue","declarations"],"mappings":";;;;AAeQA,sBAA8B,AAAAC;AAE5B,QAAA,AAAAD;
|
|
1
|
+
{"version":3,"sources":["../../../src/Glutinum.Converter/Reader/ExportAssignment.fs"],"names":["symbolOpt","exportNode","symbol","identiferNode","typ","tsTyp","reader","matchValue","declarations"],"mappings":";;;;AAeQA,sBAA8B,AAAAC;AAE5B,QAAA,AAAAD;AAiDI,eAAA;;;AAhDHE,uBACHF;AAAA,YAAG,AAAAE,gBAAc;AACP,gBAAA,AAAAD,\u002BBAAA;AAIEE,sCAAiC,AAAAF;AAEjCG;AACIC,8BACA,AAAAC,4FAAkC,AAAAL;AAEhCM,qCAAA,AAAAF;AACJ,oBADI,AACJ,6BAAa,QADTE;AAGIA,yCAAA,AAAAF;AAAA,wBAAA,AAAAE;AAOI,AAddH,\u002BBAcc,iBAAmB;;;AANtBI,6CACHD;AAAA,AATRH,\u002BBASQ,CAAG,AAAAI,wBAAqB,KACpB,AAAAF,6EAAgB,AAAAE,aAAa,OAE7B,iBAAmB;;;;AAG7B,AAfFJ,2BAeE,CAXI,AAWJ,6BAAa,GAXTG,0BAYF,iBAAmB,\u002BBACrB,CAbI,AAaJ,6BAAa,GAbTA,0BAcF,iBAAmB,\u002BBACrB,CAfI,AAeJ,6BAAa,IAfTA,0BAgBF,iBAAmB,\u002BBACrB,CAjBI,AAiBJ,6BAAa,GAjBTA,0BAkBF,iBAAmB,\u002BBACrB,CAnBI,AAmBJ,6BAAa,OAnBTA,0BAoBF,iBAAmB,\u002BBAChB,iBAAmB;;AAS3B,uBAAA,kBADA,iBANF,iBACmB,AAAAD,8FAAiCL,aAC1C,AAAAE,yBACAC;;;AAMR,uBAAA;;;;AAEP,mBAAA","file":null,"sourcesContent":null,"sourceRoot":null}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { GlueType, NamedTupleType } from "../GlueAST.js";
|
|
2
|
+
|
|
3
|
+
export function readNamedTupleMember(reader, declaration) {
|
|
4
|
+
return new GlueType(20, [new NamedTupleType(declaration.name.getText(), reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNode24A678AD"](declaration.type))]);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
//# sourceMappingURL=NamedTupleMember.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/Glutinum.Converter/Reader/NamedTupleMember.fs"],"names":["declaration","reader"],"mappings":";;;WAiBO,kBALF,mBACU,AAAAA,4BACA,AAAAC,iFAAoB,AAAAD","file":null,"sourcesContent":null,"sourceRoot":null}
|
|
@@ -9,7 +9,7 @@ export function readNode(reader, node) {
|
|
|
9
9
|
switch (matchValue) {
|
|
10
10
|
case 187: {
|
|
11
11
|
const typeLiteralNode = node;
|
|
12
|
-
return new GlueType(
|
|
12
|
+
return new GlueType(22, [new GlueTypeLiteral(map((declaration) => reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadDeclaration61B89E55"](declaration), toList(typeLiteralNode.members)))]);
|
|
13
13
|
}
|
|
14
14
|
case 243:
|
|
15
15
|
return reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadVariableStatementZ66C4BA0A"](node);
|
|
@@ -22,7 +22,7 @@ export function readTypeAliasDeclaration(reader, declaration) {
|
|
|
22
22
|
default:
|
|
23
23
|
typ = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNode24A678AD"](declaration.type);
|
|
24
24
|
}
|
|
25
|
-
return new GlueType(5, [new GlueTypeAliasDeclaration(declaration.name.getText(), typ, reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeParameters4088FB9E"](declaration.typeParameters))]);
|
|
25
|
+
return new GlueType(5, [new GlueTypeAliasDeclaration(reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadDocumentationFromNode6C0FD055"](declaration), declaration.name.getText(), typ, reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeParameters4088FB9E"](declaration.typeParameters))]);
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
//# sourceMappingURL=TypeAliasDeclaration.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/Glutinum.Converter/Reader/TypeAliasDeclaration.fs"],"names":["typ","matchValue","declaration","unionTypeNode","reader","typeOperatorNode"],"mappings":";;;AAYQA;AACMC,uBAAA,AAAAC;YAAAD;aAAA;AAEEE,kCAAgB,AAAAD;AAEpB,AALJF,kBAKI,AAAAI,uFAAyBD;;;aAJvB;AAOEE,qCAAmB,AAAAH;AACvB,AATJF,kBASI,AAAAI,0FAA4BC;;;aAR1B;AAWEH,kCAAc,AAAAA;AAClB,AAbJF,kBAaI,AAAAI,2FAA6BF;;;;AAE1B,AAfPF,kBAeO,AAAAI,iFAAoB,AAAAF;;
|
|
1
|
+
{"version":3,"sources":["../../../src/Glutinum.Converter/Reader/TypeAliasDeclaration.fs"],"names":["typ","matchValue","declaration","unionTypeNode","reader","typeOperatorNode"],"mappings":";;;AAYQA;AACMC,uBAAA,AAAAC;YAAAD;aAAA;AAEEE,kCAAgB,AAAAD;AAEpB,AALJF,kBAKI,AAAAI,uFAAyBD;;;aAJvB;AAOEE,qCAAmB,AAAAH;AACvB,AATJF,kBASI,AAAAI,0FAA4BC;;;aAR1B;AAWEH,kCAAc,AAAAA;AAClB,AAbJF,kBAaI,AAAAI,2FAA6BF;;;;AAE1B,AAfPF,kBAeO,AAAAI,iFAAoB,AAAAF;;AAQ5B,WAAA,iBANH,6BACoB,AAAAE,8FAAiCF,cAC1C,AAAAA,4BACAF,KACU,AAAAI,uFAA0B,AAAAF","file":null,"sourcesContent":null,"sourceRoot":null}
|
|
@@ -2,9 +2,11 @@ import { Union } from "../../fable_modules/fable-library-js.4.14.0/Types.js";
|
|
|
2
2
|
import { union_type, class_type } from "../../fable_modules/fable-library-js.4.14.0/Reflection.js";
|
|
3
3
|
import { GlueTypeLiteral, GlueClassDeclaration, GlueFunctionType, GlueTypeReference, GlueInterface, GlueTypeUnion, GlueLiteral, GlueType, GluePrimitive } from "../GlueAST.js";
|
|
4
4
|
import { tryReadLiteral, $007CHasSymbolFlags$007C_$007C, $007CHasTypeFlags$007C_$007C, generateReaderError } from "./Utils.js";
|
|
5
|
-
import { exists, empty, map, choose } from "../../fable_modules/fable-library-js.4.14.0/List.js";
|
|
5
|
+
import { exists, concat, empty, map, choose } from "../../fable_modules/fable-library-js.4.14.0/List.js";
|
|
6
6
|
import { head, toList } from "../../fable_modules/fable-library-js.4.14.0/Seq.js";
|
|
7
7
|
import { value as value_2 } from "../../fable_modules/fable-library-js.4.14.0/Option.js";
|
|
8
|
+
import { List_distinct } from "../../fable_modules/fable-library-js.4.14.0/Seq2.js";
|
|
9
|
+
import { structuralHash, equals } from "../../fable_modules/fable-library-js.4.14.0/Util.js";
|
|
8
10
|
import { interpolate, toText } from "../../fable_modules/fable-library-js.4.14.0/String.js";
|
|
9
11
|
|
|
10
12
|
class IntersectionTypePropertyResult extends Union {
|
|
@@ -40,10 +42,12 @@ export function readTypeNode(reader, typeNode) {
|
|
|
40
42
|
return new GlueType(3, [new GluePrimitive(9, [])]);
|
|
41
43
|
case 154:
|
|
42
44
|
return new GlueType(3, [new GluePrimitive(0, [])]);
|
|
45
|
+
case 155:
|
|
46
|
+
return new GlueType(3, [new GluePrimitive(10, [])]);
|
|
43
47
|
case 157:
|
|
44
48
|
return new GlueType(3, [new GluePrimitive(8, [])]);
|
|
45
49
|
case 159:
|
|
46
|
-
return new GlueType(
|
|
50
|
+
return new GlueType(24, []);
|
|
47
51
|
case 182:
|
|
48
52
|
return new GlueType(3, [new GluePrimitive(3, [])]);
|
|
49
53
|
case 183: {
|
|
@@ -122,7 +126,7 @@ export function readTypeNode(reader, typeNode) {
|
|
|
122
126
|
}
|
|
123
127
|
case 184: {
|
|
124
128
|
const functionTypeNode = typeNode;
|
|
125
|
-
return new GlueType(16, [new GlueFunctionType(reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNode24A678AD"](functionTypeNode.type), reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadParametersZ17143B5B"](functionTypeNode.parameters))]);
|
|
129
|
+
return new GlueType(16, [new GlueFunctionType(reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadDocumentationFromNode6C0FD055"](typeNode), reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNode24A678AD"](functionTypeNode.type), reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadParametersZ17143B5B"](functionTypeNode.parameters))]);
|
|
126
130
|
}
|
|
127
131
|
case 186: {
|
|
128
132
|
const typeNodeQuery = typeNode;
|
|
@@ -136,11 +140,14 @@ export function readTypeNode(reader, typeNode) {
|
|
|
136
140
|
else {
|
|
137
141
|
const declarations = matchValue_7;
|
|
138
142
|
const declaration_1 = declarations[0];
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
143
|
+
const matchValue_8 = declaration_1.kind | 0;
|
|
144
|
+
switch (matchValue_8) {
|
|
145
|
+
case 263:
|
|
146
|
+
return new GlueType(12, [new GlueClassDeclaration(typ_3.symbol.name, empty(), empty(), empty())]);
|
|
147
|
+
case 267:
|
|
148
|
+
return new GlueType(0, []);
|
|
149
|
+
default:
|
|
150
|
+
return reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadNode6C0FD055"](declaration_1);
|
|
144
151
|
}
|
|
145
152
|
}
|
|
146
153
|
}
|
|
@@ -165,7 +172,7 @@ export function readTypeNode(reader, typeNode) {
|
|
|
165
172
|
}
|
|
166
173
|
case 187: {
|
|
167
174
|
const typeLiteralNode = typeNode;
|
|
168
|
-
return new GlueType(
|
|
175
|
+
return new GlueType(22, [new GlueTypeLiteral(map((declaration_4) => reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadDeclaration61B89E55"](declaration_4), toList(typeLiteralNode.members)))]);
|
|
169
176
|
}
|
|
170
177
|
case 188: {
|
|
171
178
|
const arrayTypeNode = typeNode;
|
|
@@ -177,7 +184,7 @@ export function readTypeNode(reader, typeNode) {
|
|
|
177
184
|
}
|
|
178
185
|
case 190: {
|
|
179
186
|
const optionalTypeNode = typeNode;
|
|
180
|
-
return new GlueType(
|
|
187
|
+
return new GlueType(23, [reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNode24A678AD"](optionalTypeNode.type)]);
|
|
181
188
|
}
|
|
182
189
|
case 192:
|
|
183
190
|
return reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadUnionTypeNodeZ5A082EC2"](typeNode);
|
|
@@ -198,7 +205,10 @@ export function readTypeNode(reader, typeNode) {
|
|
|
198
205
|
return new IntersectionTypePropertyResult(1, []);
|
|
199
206
|
}
|
|
200
207
|
}
|
|
201
|
-
}, toList(
|
|
208
|
+
}, unionOrIntersectionType.isUnion() ? List_distinct(concat(map((arg_1) => toList(checker.getPropertiesOfType(arg_1)), toList(unionOrIntersectionType.types))), {
|
|
209
|
+
Equals: equals,
|
|
210
|
+
GetHashCode: structuralHash,
|
|
211
|
+
}) : toList(unionOrIntersectionType.getProperties()));
|
|
202
212
|
if (exists((property_1) => {
|
|
203
213
|
if (property_1.tag === 0) {
|
|
204
214
|
if (property_1.fields[0].kind === 174) {
|
|
@@ -215,7 +225,7 @@ export function readTypeNode(reader, typeNode) {
|
|
|
215
225
|
return new GlueType(3, [new GluePrimitive(6, [])]);
|
|
216
226
|
}
|
|
217
227
|
else {
|
|
218
|
-
return new GlueType(
|
|
228
|
+
return new GlueType(21, [choose((_arg) => {
|
|
219
229
|
if (_arg.tag === 1) {
|
|
220
230
|
throw new Error("Sould not happen here");
|
|
221
231
|
}
|
|
@@ -248,6 +258,8 @@ export function readTypeNode(reader, typeNode) {
|
|
|
248
258
|
return new GlueType(8, [matchValue_9]);
|
|
249
259
|
}
|
|
250
260
|
}
|
|
261
|
+
case 202:
|
|
262
|
+
return reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadNamedTupleMemberZ6E17C942"](typeNode);
|
|
251
263
|
default: {
|
|
252
264
|
const item = generateReaderError("type node", toText(interpolate("Unsupported kind %A%P()", [typeNode.kind])), typeNode);
|
|
253
265
|
const objectArg = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_Warnings"]();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/Glutinum.Converter/Reader/TypeNode.fs"],"names":["checker","reader","matchValue","typeNode","typeReferenceNode","symbolOpt","fullName","symbol","typ","literalType","aliasTypeArguments","patternInput","originalType","interfaceDeclaration","members","declaration","typeArguments","functionTypeNode","typeNodeQuery","declarations","typeLiteralNode","arrayTypeNode","tupleTypeNode","element","optionalTypeNode","intersectionTypeNode","unionOrIntersectionType","properties","property","_arg1","parenthesizedTypeNode","thisTypeNode","typeOperatorNode","literalTypeNode","item","objectArg"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../src/Glutinum.Converter/Reader/TypeNode.fs"],"names":["checker","reader","matchValue","typeNode","typeReferenceNode","symbolOpt","fullName","symbol","typ","literalType","aliasTypeArguments","patternInput","originalType","interfaceDeclaration","members","declaration","typeArguments","functionTypeNode","typeNodeQuery","declarations","typeLiteralNode","arrayTypeNode","tupleTypeNode","element","optionalTypeNode","intersectionTypeNode","unionOrIntersectionType","properties","property","_arg1","parenthesizedTypeNode","thisTypeNode","typeOperatorNode","literalTypeNode","item","objectArg"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBQA,oBAAU,AAAAC;AAERC,uBAAA,AAAAC;YAAAD;aAAA;AAMyB,mBAAA,iBAAmB;aAN5C;AAGyB,mBAAA,iBAAmB;aAH5C;AAKwB,mBAAA,iBAAmB;aAL3C;AAI4B,mBAAA,iBAAmB;aAJ/C;AAC2B,mBAAA,iBAAmB;aAD9C;AA\u002BT2B,mBAAA,iBAAmB;aA/T9C;AAE2B,mBAAA,iBAAmB;aAF9C;AAoU2B,mBAAA,iBAAmB;aApU9C;AAQF,mBAAA,iBAAmB;aARjB;AA6T4B,mBAAA;aA7T5B;AA4I2B,mBAAA,iBAAmB;aA5I9C;AAaEE,sCAAoBD;AAEpBE,8BAAY,AAAAL,4BAA8B,AAAAI;AAE1CE;AACM,gBAAA,AAAAD;AAOCE,\u002BBAAUF;AAAA,AARjBC,2BAQiB,AAAAN,8BAA8BO;;;AADxC,gCAJH,oBACI,aACA,kBACAH;;oBAMTE;qBAAW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BACAC;;;AAVLgB,2CACHjB;AAAA,wBAAG,AAAAiB,0BAAqB;AACf,\u002BBAAA,uCAAO,AAAAA,eAAc;;;AAErB,\u002BBAAA;;;eAlBb,AAAG,AAAAO,oCAMI,cAFA,OADA,eAAyC,OAA/B,AAAA1B,qCADV,OADH,AAAA0B;;;iBAQ4C,OAA5C,AAAAA;AAiCZ,gBATO;AACO,oBAAA,AAAAE;AAGI,wBAAA,AAAAA,8BAAA;\u002BBAC\u002BB;;;\u002BBAC9B;;;;2BAJG;;eAHlBD;AAWA,uBAAA,iBAAmB;;;AAQhB,uBAAA,kBALA;AACC,wBAAA,AAAAE;AAEc,wCAAS;;;AADM,\u002BBAAA,AAAA5B,oFAAL,AAAA4B;;mBAH5BF;;;aA5RF;AA\u002BSEG,0CAAwB3B;AAE5B,mBAAA,AAAAF,iFAAoB,AAAA6B;;aAjTlB;AAgNEC,iCAAe5B;AAMfK,0BAAM,AAAAR,0BAA0B\u002BB;AAEpC,mBAAA,kBAAkB,AAAAvB;;aAxNhB;AAyTEwB,qCAAmB7B;AAEvB,mBAAA,AAAAF,0FAA4B\u002BB;;aA3T1B;AAgMEC,oCAAkB9B;AAKhBD,iCAAA,eAF0B,AAAA\u002BB;AAE1B,gBAAA,AAAA/B;AAGF,gCACI,oBACI,4BACA,\u002BBACAC;;;AANM,uBAAA,iBAAAD;;;aAtMhB;AAkUF,mBAAA,AAAAD,0FAA4BE;;AASzB\u002BB,yBAJH,oBACI,aACA,OAAA,YAAA,4BAAsB,AAAA/B,kBACtBA;AACDgC,8BAAA,AAAAlC;AAAA,kBAAAkC,eAAAD;AAEH,mBAAA,iBAAmB","file":null,"sourcesContent":null,"sourceRoot":null}
|
|
@@ -18,8 +18,12 @@ export function readTypeOperatorNode(reader, node) {
|
|
|
18
18
|
}
|
|
19
19
|
else {
|
|
20
20
|
const declarations = matchValue_1;
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
if (declarations.length !== 1) {
|
|
22
|
+
throw new Error(generateReaderError("type operator (keyof)", "Expected exactly one declaration", node));
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
return new GlueType(9, [reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadNode6C0FD055"](declarations[0])]);
|
|
26
|
+
}
|
|
23
27
|
}
|
|
24
28
|
}
|
|
25
29
|
else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/Glutinum.Converter/Reader/TypeOperatorNode.fs"],"names":["matchValue","node","typeReferenceNode","symbolOpt","reader","symbol","declarations","
|
|
1
|
+
{"version":3,"sources":["../../../src/Glutinum.Converter/Reader/TypeOperatorNode.fs"],"names":["matchValue","node","typeReferenceNode","symbolOpt","reader","symbol","declarations","item","objectArg"],"mappings":";;;;;;AAYUA,uBAAA,AAAAC;YAAAD;aAAA;AAEF,gBAAG,\u002BBAAuB,AAAAC;AAClBC,0CAAoB,AAAAD;AAGpBE,kCACA,AAAAC,8FAAqC,AAAAF;AAEnC,oBAAA,AAAAC;AAQCE,mCACGF;AAAAH,yCAAA,AAAAK;AAAA,wBAAA,AAAAL;AAkBC,wCAJH,oBACI,yBACA,wBACAC;;;AAhBDK,6CAEHN;AAAA,4BAAG,AAAAM,wBAAsB;AAKlB,4CAJH,oBACI,yBACA,oCACAL;;;AAI\u002BB,mCAAA,iBAAnC,AAAAG,6EAAgB,AAAAE,aAAa;;;;;AAdlC,oCAJH,oBACI,yBACA,kBACAL;;;;AA6BL,gCAJH,oBACI,yBACA,OAAA,YAAA,qEAA\u002BD,AAAAA,mBAC/DA;;aA1CN;AA6C6B,mBAAA,AAAAG,iFAAoB,AAAAH;;AAOhDM,yBAJH,oBACI,iBACA,OAAA,YAAA,gCAA0B,AAAAN,kBAC1BA;AACDO,8BAAA,AAAAJ;AAAA,kBAAAI,eAAAD;AAEH,mBAAA,iBAAmB","file":null,"sourcesContent":null,"sourceRoot":null}
|
|
@@ -16,16 +16,17 @@ import { readIndexedAccessType } from "./IndexedAccessType.js";
|
|
|
16
16
|
import { readTypeParameters } from "./TypeParameters.js";
|
|
17
17
|
import { readExportAssignment } from "./ExportAssignment.js";
|
|
18
18
|
import { readDocumentationForNode, readDocumentationForSignature } from "./Documentation.js";
|
|
19
|
+
import { readNamedTupleMember } from "./NamedTupleMember.js";
|
|
19
20
|
import { class_type } from "../../fable_modules/fable-library-js.4.14.0/Reflection.js";
|
|
20
21
|
|
|
21
22
|
export class TypeScriptReader {
|
|
22
23
|
constructor(checker) {
|
|
23
|
-
this["checker@
|
|
24
|
+
this["checker@25"] = checker;
|
|
24
25
|
this.warnings = [];
|
|
25
26
|
}
|
|
26
27
|
"Glutinum.Converter.Reader.Types.ITypeScriptReader.get_checker"() {
|
|
27
28
|
const _ = this;
|
|
28
|
-
return _["checker@
|
|
29
|
+
return _["checker@25"];
|
|
29
30
|
}
|
|
30
31
|
"Glutinum.Converter.Reader.Types.ITypeScriptReader.get_Warnings"() {
|
|
31
32
|
const _ = this;
|
|
@@ -107,6 +108,10 @@ export class TypeScriptReader {
|
|
|
107
108
|
const this$ = this;
|
|
108
109
|
return readDocumentationForNode(this$, node);
|
|
109
110
|
}
|
|
111
|
+
"Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadNamedTupleMemberZ6E17C942"(namedTupleMember) {
|
|
112
|
+
const this$ = this;
|
|
113
|
+
return readNamedTupleMember(this$, namedTupleMember);
|
|
114
|
+
}
|
|
110
115
|
}
|
|
111
116
|
|
|
112
117
|
export function TypeScriptReader_$reflection() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/Glutinum.Converter/Reader/TypeScriptReader.fs"],"names":["checker","_","this","classDeclaration","enumDeclaration","functionDeclaration","interfaceDeclaration","moduleDeclaration","node","typeAliasDeclaration","typNode","variableStatement","declaration","parameters","unionType","typeParametersOpt","exportAssignment"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../src/Glutinum.Converter/Reader/TypeScriptReader.fs"],"names":["checker","_","this","classDeclaration","enumDeclaration","functionDeclaration","interfaceDeclaration","moduleDeclaration","node","typeAliasDeclaration","typNode","variableStatement","declaration","parameters","unionType","typeParametersOpt","exportAssignment","namedTupleMember"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAwBsB,6BAAAA;AAClB;;;AAIaC,kBAAAA;AAA4B,eAAA,AAAAA;;;AAE9BA,kBAAAA;AAAa,eAAA,AAAAA;;;AAEbC,sBAAAA;AAIH,eAAA,qBAAqBA,OAAKC;;;AAEvBD,sBAAAA;AAIyC,eAAA,iBAA5C,oBAAoBA,OAAKE;;;AAEtBF,sBAAAA;AAKA,eAAA,iBADH,wBAAwBA,OAAKG;;;AAG1BH,sBAAAA;AAKA,eAAA,iBADH,yBAAyBA,OAAKI;;;AAG3BJ,sBAAAA;AAKA,eAAA,kBADH,sBAAsBA,OAAKK;;;AAGxBL,sBAAAA;AAA0C,eAAA,SAASA,OAAKM;;;AAExDN,sBAAAA;AAIH,eAAA,yBAAyBA,OAAKO;;;AAE3BP,sBAAAA;AACH,eAAA,AAACA,iFAA6CQ;;;AAE3CR,sBAAAA;AACG,eAAA,CAAA,AAAAQ,oBAEI,iBAAmB,8BADX,aAAaR,OAAbQ;;;AAGfR,sBAAAA;AAIH,eAAA,sBAAsBA,OAAKS;;;AAExBT,sBAAAA;AACH,eAAA,gBAAgBA,OAAKU;;;AAElBV,sBAAAA;AAIH,eAAA,eAAeA,OAAKW;;;AAEjBX,sBAAAA;AACH,eAAA,kBAAkBA,OAAKY;;;AAEpBZ,sBAAAA;AACH,eAAA,qBAAqBA,OAAKM;;;AAEvBN,sBAAAA;AAIH,eAAA,sBAAsBA,OAAKU;;;AAExBV,sBAAAA;AAIH,eAAA,mBAAmBA,OAAKa;;;AAErBb,sBAAAA;AAIH,eAAA,qBAAqBA,OAAKc;;;AAEvBd,sBAAAA;AAIH,eAAA,8BAA8BA,OAAKU;;;AAEhCV,sBAAAA;AAIH,eAAA,yBAAyBA,OAAKM;;;AAE3BN,sBAAAA;AAIH,eAAA,qBAAqBA,OAAKe","file":null,"sourcesContent":null,"sourceRoot":null}
|
|
@@ -5,14 +5,19 @@ import { generateReaderError } from "./Utils.js";
|
|
|
5
5
|
import { GlueType, GlueVariable } from "../GlueAST.js";
|
|
6
6
|
|
|
7
7
|
export function readVariableStatement(reader, statement) {
|
|
8
|
-
let id;
|
|
9
8
|
if (defaultArg(map((modifiers) => exists((modifier) => (modifier.kind === 95), modifiers), statement.modifiers), false)) {
|
|
10
9
|
const matchValue = toList(statement.declarationList.declarations);
|
|
11
10
|
if (!isEmpty(matchValue)) {
|
|
12
11
|
const declaration = head(matchValue);
|
|
13
|
-
|
|
12
|
+
let name;
|
|
13
|
+
if (declaration.name.kind === 80) {
|
|
14
|
+
const id = declaration.name;
|
|
15
|
+
name = id.getText();
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
14
18
|
throw new Error(generateReaderError("variable statement", "Unable to read variable name", declaration));
|
|
15
|
-
}
|
|
19
|
+
}
|
|
20
|
+
return new GlueType(2, [new GlueVariable(reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadDocumentationFromNode6C0FD055"](declaration), name, reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNodeZ64B23DD2"](declaration.type))]);
|
|
16
21
|
}
|
|
17
22
|
else {
|
|
18
23
|
return new GlueType(0, []);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/Glutinum.Converter/Reader/VariableStatement.fs"],"names":["
|
|
1
|
+
{"version":3,"sources":["../../../src/Glutinum.Converter/Reader/VariableStatement.fs"],"names":["modifier","modifiers","statement","matchValue","declaration","name","id","reader"],"mappings":";;;;;;;AAuBI,QAFO,WANA,mBAEI,sBACC,AAAAA,kBAAgB,KAFpBC,YAFJ,AAAAC,sBAOuB;AAGjBC,2BAA0C,OAA1C,AAAAD;AAAA,YAAA,CAAA,QAAAC;AAGJC,gCACM,KAAAD;AAAAE;AACM,gBAAA,AAAAD,0BAAA;AAEEE,2BAAsB,AAAAF;AAC1B,AAJJC,uBAII,AAAAC;;;AAMG,gCAJH,oBACI,sBACA,gCACAF;;AAST,mBAAA,iBANF,iBACmB,AAAAG,8FAAiCH,cAC1CC,MACA,AAAAE,kFAAoB,AAAAH;;;AAlB3B,mBAAA;;;;AAwBR,eAAA","file":null,"sourcesContent":null,"sourceRoot":null}
|