@glutinum/cli 1.0.0-beta.1 → 1.0.0-beta.10
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 +16 -0
- package/dist/Glutinum.Converter/Abbreviations.js +9 -32
- package/dist/Glutinum.Converter/DelegateExtensions.js +378 -0
- package/dist/Glutinum.Converter/FreeTypeParameters.js +211 -0
- package/dist/Glutinum.Converter/FsharpAST.js +116 -65
- package/dist/Glutinum.Converter/Generate.js +38 -25
- package/dist/Glutinum.Converter/GlueAST.js +82 -43
- package/dist/Glutinum.Converter/Hosting.js +143 -169
- package/dist/Glutinum.Converter/Merge.js +369 -337
- package/dist/Glutinum.Converter/Packages.js +384 -94
- package/dist/Glutinum.Converter/Printer.js +432 -393
- package/dist/Glutinum.Converter/Read.js +361 -99
- package/dist/Glutinum.Converter/Reader/ClassDeclaration.js +4 -4
- package/dist/Glutinum.Converter/Reader/ConditionalTypeNode.js +90 -0
- package/dist/Glutinum.Converter/Reader/Declaration.js +6 -12
- package/dist/Glutinum.Converter/Reader/Deferred.js +706 -0
- package/dist/Glutinum.Converter/Reader/Documentation.js +23 -35
- package/dist/Glutinum.Converter/Reader/ExportAssignment.js +103 -36
- package/dist/Glutinum.Converter/Reader/ExportDeclaration.js +21 -36
- package/dist/Glutinum.Converter/Reader/ExpressionWithTypeArguments.js +59 -0
- package/dist/Glutinum.Converter/Reader/FunctionDeclaration.js +26 -13
- package/dist/Glutinum.Converter/Reader/IndexedAccessType.js +15 -21
- package/dist/Glutinum.Converter/Reader/InterfaceDeclaration.js +45 -2
- package/dist/Glutinum.Converter/Reader/IntersectionTypeNode.js +178 -0
- package/dist/Glutinum.Converter/Reader/MemberTypes.js +126 -0
- package/dist/Glutinum.Converter/Reader/ModuleDeclaration.js +53 -5
- package/dist/Glutinum.Converter/Reader/Node.js +8 -11
- package/dist/Glutinum.Converter/Reader/Parameters.js +36 -27
- package/dist/Glutinum.Converter/Reader/TypeNode.js +389 -1583
- package/dist/Glutinum.Converter/Reader/TypeOperatorNode.js +76 -49
- package/dist/Glutinum.Converter/Reader/TypeQueryNode.js +14 -37
- package/dist/Glutinum.Converter/Reader/TypeScriptReader.js +23 -5
- package/dist/Glutinum.Converter/Reader/Types.js +295 -15
- package/dist/Glutinum.Converter/Reader/UnionTypeNode.js +14 -28
- package/dist/Glutinum.Converter/Reader/UtilityType.js +811 -0
- package/dist/Glutinum.Converter/Reader/Utils.js +487 -101
- package/dist/Glutinum.Converter/Reader/VariableStatement.js +2 -3
- package/dist/Glutinum.Converter/Transform.js +2915 -8176
- package/dist/Glutinum.Converter/Transformer/AnyFunctionOverloads.js +116 -0
- package/dist/Glutinum.Converter/Transformer/CallableProperties.js +454 -0
- package/dist/Glutinum.Converter/Transformer/Comment.js +136 -0
- package/dist/Glutinum.Converter/Transformer/Conditionals.js +1087 -0
- package/dist/Glutinum.Converter/Transformer/Context.js +678 -0
- package/dist/Glutinum.Converter/Transformer/Enum.js +80 -0
- package/dist/Glutinum.Converter/Transformer/Exports.js +704 -0
- package/dist/Glutinum.Converter/Transformer/Heritage.js +493 -0
- package/dist/Glutinum.Converter/Transformer/KeyOfMaps.js +488 -0
- package/dist/Glutinum.Converter/Transformer/ParamObjectCandidate.js +460 -0
- package/dist/Glutinum.Converter/Transformer/TypeParameter.js +219 -0
- package/dist/Glutinum.Converter/Transformer/TypeParameters.js +448 -0
- package/dist/Glutinum.Converter/Transformer/UnionOverloads.js +356 -0
- package/dist/Glutinum.Converter/Transformer/Utils.js +341 -0
- package/dist/Glutinum.Converter/TypeScript.Extensions.js +0 -10
- package/dist/Glutinum.Converter/Utils/String.js +14 -3
- package/dist/Program.js +102 -239
- package/package.json +3 -2
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
|
|
2
|
-
import { tryItem, tryPick, mapIndexed, filter, forAll, cons, map, collect, empty } from "../../fable_modules/fable-library-js.5.17.2/List.js";
|
|
2
|
+
import { isEmpty, tryItem, tryPick, mapIndexed, filter, forAll, cons, map, collect, empty } from "../../fable_modules/fable-library-js.5.17.2/List.js";
|
|
3
3
|
import { readHeritageClauses, getFullNameOrEmpty, otherFileInterfaceDeclarations, mainDeclaration } from "./Utils.js";
|
|
4
4
|
import { toList } from "../../fable_modules/fable-library-js.5.17.2/Seq.js";
|
|
5
5
|
import { defaultArg } from "../../fable_modules/fable-library-js.5.17.2/Option.js";
|
|
6
|
-
import { GlueInterface, GlueTypeParameter } from "../GlueAST.js";
|
|
6
|
+
import { GlueReExport, GlueType, GlueInterface, GlueTypeParameter } from "../GlueAST.js";
|
|
7
7
|
import { List_distinct } from "../../fable_modules/fable-library-js.5.17.2/Seq2.js";
|
|
8
8
|
import { safeHash, equals } from "../../fable_modules/fable-library-js.5.17.2/Util.js";
|
|
9
|
+
import { PackageContext__TryFindExternalModulePath_Z721C83C5 } from "./Types.js";
|
|
9
10
|
|
|
10
11
|
export function readInterfaceDeclaration(reader, declaration) {
|
|
11
12
|
let option_1;
|
|
@@ -85,3 +86,45 @@ export function readInterfaceDeclaration(reader, declaration) {
|
|
|
85
86
|
}));
|
|
86
87
|
}
|
|
87
88
|
|
|
89
|
+
/**
|
|
90
|
+
* <c>interface Blob extends _Blob {}</c> of <c>@types/node</c> redeclares a type of the DOM lib,
|
|
91
|
+
* with no member of its own: the declaration of the external binding is the one carrying the API
|
|
92
|
+
*/
|
|
93
|
+
export function tryReadExternalRedeclaration(reader, declaration, glueInterface) {
|
|
94
|
+
let option_1;
|
|
95
|
+
if (!isEmpty(glueInterface.Members)) {
|
|
96
|
+
return undefined;
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
const matchValue = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_PackageContext"]();
|
|
100
|
+
const matchValue_1 = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_checker"]().getSymbolAtLocation(declaration.name);
|
|
101
|
+
let matchResult, packageContext, symbol;
|
|
102
|
+
if (matchValue != null) {
|
|
103
|
+
if (matchValue_1 != null) {
|
|
104
|
+
matchResult = 0;
|
|
105
|
+
packageContext = matchValue;
|
|
106
|
+
symbol = matchValue_1;
|
|
107
|
+
}
|
|
108
|
+
else {
|
|
109
|
+
matchResult = 1;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
matchResult = 1;
|
|
114
|
+
}
|
|
115
|
+
switch (matchResult) {
|
|
116
|
+
case 0: {
|
|
117
|
+
const option_4 = tryPick((other) => PackageContext__TryFindExternalModulePath_Z721C83C5(packageContext, other.getSourceFile().fileName), defaultArg((option_1 = symbol.declarations, (option_1 != null) ? toList(option_1) : undefined), empty()));
|
|
118
|
+
if (option_4 != null) {
|
|
119
|
+
return new GlueType(/* ReExport */ 32, [new GlueReExport(glueInterface.Name, new GlueType(/* Interface */ 1, [glueInterface]), option_4)]);
|
|
120
|
+
}
|
|
121
|
+
else {
|
|
122
|
+
return undefined;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
default:
|
|
126
|
+
return undefined;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
|
|
2
|
+
import { Exception, stringHash, structuralHash, equals, disposeSafe } from "../../fable_modules/fable-library-js.5.17.2/Util.js";
|
|
3
|
+
import { head, tail, append, forAll as forAll_1, filter, empty, exists as exists_1, collect, isEmpty, map, concat, choose } from "../../fable_modules/fable-library-js.5.17.2/List.js";
|
|
4
|
+
import { readInstantiatedMember, readPropertyWithoutDeclaration, IntersectionTypePropertyResult } from "./MemberTypes.js";
|
|
5
|
+
import { item } from "../../fable_modules/fable-library-js.5.17.2/Array.js";
|
|
6
|
+
import { filter as filter_1, exists, toList, forAll } from "../../fable_modules/fable-library-js.5.17.2/Seq.js";
|
|
7
|
+
import { List_distinctBy, List_distinct } from "../../fable_modules/fable-library-js.5.17.2/Seq2.js";
|
|
8
|
+
import { withInProgress, typeNodeBuilderFlags } from "./Utils.js";
|
|
9
|
+
import { GluePrimitive, GlueType } from "../GlueAST.js";
|
|
10
|
+
|
|
11
|
+
function readIntersectionConstituents(reader, typeNode) {
|
|
12
|
+
let matchValue;
|
|
13
|
+
const checker = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_checker"]();
|
|
14
|
+
const intersectionTypeNode = typeNode;
|
|
15
|
+
const unionOrIntersectionType = checker.getTypeAtLocation(intersectionTypeNode);
|
|
16
|
+
void (reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_InProgress"]().Intersections.push(unionOrIntersectionType));
|
|
17
|
+
const _guard = {
|
|
18
|
+
Dispose() {
|
|
19
|
+
reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_InProgress"]().Intersections.splice(reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_InProgress"]().Intersections.length - 1, 1);
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
try {
|
|
23
|
+
const properties_1 = choose((property_1) => {
|
|
24
|
+
const matchValue_1 = property_1.declarations;
|
|
25
|
+
if (matchValue_1 == null) {
|
|
26
|
+
return new IntersectionTypePropertyResult(/* WithoutDeclaration */ 1, [property_1]);
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
const declarations = matchValue_1;
|
|
30
|
+
if (declarations.length === 1) {
|
|
31
|
+
return new IntersectionTypePropertyResult(/* Single */ 0, [property_1, item(0, declarations)]);
|
|
32
|
+
}
|
|
33
|
+
else if (forAll((declaration) => {
|
|
34
|
+
if (declaration.kind === 172) {
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
return declaration.kind === 173;
|
|
39
|
+
}
|
|
40
|
+
}, declarations)) {
|
|
41
|
+
return new IntersectionTypePropertyResult(/* WithoutDeclaration */ 1, [property_1]);
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
return IntersectionTypePropertyResult.ForceAny;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}, unionOrIntersectionType.isUnion() ? List_distinct(concat(map((arg) => toList(checker.getPropertiesOfType(arg)), toList(unionOrIntersectionType.types))), {
|
|
48
|
+
Equals: equals,
|
|
49
|
+
GetHashCode: (x) => (structuralHash(x) | 0),
|
|
50
|
+
}) : ((matchValue = toList(unionOrIntersectionType.getProperties()), isEmpty(matchValue) ? ((intersectionTypeNode.pos >= 0) ? List_distinctBy((property) => property.name, collect((constituent) => {
|
|
51
|
+
let type_1;
|
|
52
|
+
return toList((type_1 = checker.getTypeAtLocation(constituent), checker.getPropertiesOfType(type_1)));
|
|
53
|
+
}, toList(intersectionTypeNode.types)), {
|
|
54
|
+
Equals: (x_1, y_1) => (x_1 === y_1),
|
|
55
|
+
GetHashCode: (x_1) => (stringHash(x_1) | 0),
|
|
56
|
+
}) : matchValue) : matchValue)));
|
|
57
|
+
const intersectsATypeQuery = exists((constituent_1) => (constituent_1.kind === 187), intersectionTypeNode.types);
|
|
58
|
+
const everyConstituentIsAReference = forAll((constituent_2) => (constituent_2.kind === 184), intersectionTypeNode.types);
|
|
59
|
+
const hasUnsupportedProperties = intersectsATypeQuery ? true : exists_1((property_2) => {
|
|
60
|
+
switch (property_2.tag) {
|
|
61
|
+
case 1:
|
|
62
|
+
return false;
|
|
63
|
+
case 0:
|
|
64
|
+
if (everyConstituentIsAReference) {
|
|
65
|
+
return property_2.fields[1].kind === 175;
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
return false;
|
|
69
|
+
}
|
|
70
|
+
default:
|
|
71
|
+
return true;
|
|
72
|
+
}
|
|
73
|
+
}, properties_1);
|
|
74
|
+
const callSignatures = unionOrIntersectionType.isUnion() ? empty() : choose((signature) => {
|
|
75
|
+
const synthesized = checker.signatureToSignatureDeclaration(signature, 180, typeNode, typeNodeBuilderFlags);
|
|
76
|
+
if (synthesized == null) {
|
|
77
|
+
return undefined;
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
const declaration_2 = synthesized;
|
|
81
|
+
declaration_2.parent = typeNode;
|
|
82
|
+
const previousContext = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_SyntheticContext"]();
|
|
83
|
+
reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.set_SyntheticContext"](declaration_2);
|
|
84
|
+
try {
|
|
85
|
+
return reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadDeclaration61B89E55"](declaration_2);
|
|
86
|
+
}
|
|
87
|
+
finally {
|
|
88
|
+
reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.set_SyntheticContext"](previousContext);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}, toList(checker.getSignaturesOfType(unionOrIntersectionType, 0)));
|
|
92
|
+
if (hasUnsupportedProperties) {
|
|
93
|
+
const references = map((constituent_3) => {
|
|
94
|
+
if (constituent_3.kind === 184) {
|
|
95
|
+
return reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNode24A678AD"](constituent_3);
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
return GlueType.Discard;
|
|
99
|
+
}
|
|
100
|
+
}, toList(intersectionTypeNode.types));
|
|
101
|
+
const literalMembers = collect((constituent_4) => {
|
|
102
|
+
if (constituent_4.kind === 188) {
|
|
103
|
+
const matchValue_2 = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNode24A678AD"](constituent_4);
|
|
104
|
+
if (matchValue_2.tag === 22) {
|
|
105
|
+
return matchValue_2.fields[0].Members;
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
return empty();
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
else {
|
|
112
|
+
return empty();
|
|
113
|
+
}
|
|
114
|
+
}, toList(intersectionTypeNode.types));
|
|
115
|
+
const inheritable = filter((reference) => !equals(reference, GlueType.Discard), references);
|
|
116
|
+
return (!isEmpty(inheritable) && forAll_1((_arg) => {
|
|
117
|
+
if (_arg.tag === 13) {
|
|
118
|
+
return true;
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
return false;
|
|
122
|
+
}
|
|
123
|
+
}, inheritable)) ? (new GlueType(/* IntersectionOfReferences */ 21, [inheritable, literalMembers])) : (new GlueType(/* Primitive */ 3, [GluePrimitive.Any]));
|
|
124
|
+
}
|
|
125
|
+
else {
|
|
126
|
+
return new GlueType(/* IntersectionType */ 20, [append(withInProgress(reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_InProgress"]().Landing, typeNode, () => choose((_arg_1) => {
|
|
127
|
+
switch (_arg_1.tag) {
|
|
128
|
+
case 1:
|
|
129
|
+
return readPropertyWithoutDeclaration(reader, typeNode, _arg_1.fields[0]);
|
|
130
|
+
case 2:
|
|
131
|
+
throw new Exception("Should not happen here");
|
|
132
|
+
default:
|
|
133
|
+
return readInstantiatedMember(reader, typeNode, _arg_1.fields[0], _arg_1.fields[1]);
|
|
134
|
+
}
|
|
135
|
+
}, properties_1)), append(callSignatures, collect((constituent_5) => {
|
|
136
|
+
if (constituent_5.kind === 188) {
|
|
137
|
+
return map((declaration_4) => reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadDeclaration61B89E55"](declaration_4), filter((element) => (element.kind === 182), toList(constituent_5.members)));
|
|
138
|
+
}
|
|
139
|
+
else {
|
|
140
|
+
return empty();
|
|
141
|
+
}
|
|
142
|
+
}, toList(intersectionTypeNode.types))))]);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
finally {
|
|
146
|
+
disposeSafe(_guard);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* `DateArg<Date> & {}` is `DateArg<Date>`, the empty type literal only bars `null`
|
|
152
|
+
*/
|
|
153
|
+
export function readIntersectionType(reader, typeNode) {
|
|
154
|
+
const constituents = toList(filter_1((arg) => {
|
|
155
|
+
let constituent, this$;
|
|
156
|
+
return !((constituent = arg, (constituent.kind === 188) && (((this$ = constituent.members, ~~this$.length)) === 0)));
|
|
157
|
+
}, typeNode.types));
|
|
158
|
+
let matchResult, single;
|
|
159
|
+
if (!isEmpty(constituents)) {
|
|
160
|
+
if (isEmpty(tail(constituents))) {
|
|
161
|
+
matchResult = 0;
|
|
162
|
+
single = head(constituents);
|
|
163
|
+
}
|
|
164
|
+
else {
|
|
165
|
+
matchResult = 1;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
else {
|
|
169
|
+
matchResult = 1;
|
|
170
|
+
}
|
|
171
|
+
switch (matchResult) {
|
|
172
|
+
case 0:
|
|
173
|
+
return reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNode24A678AD"](single);
|
|
174
|
+
default:
|
|
175
|
+
return readIntersectionConstituents(reader, typeNode);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
|
|
2
|
+
import { Union } from "../../fable_modules/fable-library-js.5.17.2/Types.js";
|
|
3
|
+
import { union_type, class_type } from "../../fable_modules/fable-library-js.5.17.2/Reflection.js";
|
|
4
|
+
import { enclosingDeclarationOf, $007CHasSymbolFlags$007C_$007C, typeNodeBuilderFlags } from "./Utils.js";
|
|
5
|
+
import { Report_readerError_Z19516DCE } from "./Report.js";
|
|
6
|
+
import { concat } from "../../fable_modules/fable-library-js.5.17.2/String.js";
|
|
7
|
+
import { empty } from "../../fable_modules/fable-library-js.5.17.2/List.js";
|
|
8
|
+
import { GlueMethod, GlueMethodSignature, GlueMember, GlueProperty, GlueAccessor } from "../GlueAST.js";
|
|
9
|
+
import { Operators_IsNull } from "../../fable_modules/fable-library-js.5.17.2/FSharp.Core.js";
|
|
10
|
+
|
|
11
|
+
export class IntersectionTypePropertyResult extends Union {
|
|
12
|
+
constructor(tag, fields) {
|
|
13
|
+
super();
|
|
14
|
+
this.tag = tag;
|
|
15
|
+
this.fields = fields;
|
|
16
|
+
}
|
|
17
|
+
cases() {
|
|
18
|
+
return ["Single", "WithoutDeclaration", "ForceAny"];
|
|
19
|
+
}
|
|
20
|
+
static ForceAny = new IntersectionTypePropertyResult(2, []);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function IntersectionTypePropertyResult_$reflection() {
|
|
24
|
+
return union_type("Glutinum.Converter.Reader.MemberTypes.IntersectionTypePropertyResult", [], IntersectionTypePropertyResult, () => [[["Item1", class_type("TypeScript.Ts.Symbol")], ["Item2", class_type("TypeScript.Ts.Declaration")]], [["Item", class_type("TypeScript.Ts.Symbol")]], []]);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export function readPropertyWithoutDeclaration(reader, contextNode, property) {
|
|
28
|
+
let matchValue_1;
|
|
29
|
+
const typ = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_checker"]().getTypeOfSymbol(property);
|
|
30
|
+
const matchValue = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_checker"]().typeToTypeNode(typ, undefined, typeNodeBuilderFlags);
|
|
31
|
+
if (matchValue == null) {
|
|
32
|
+
const item = Report_readerError_Z19516DCE("type node", concat("Could not resolve the type of the property \'", property.name, "\'"), contextNode, "/_//src/Glutinum.Converter/Reader/MemberTypes.fs", 52);
|
|
33
|
+
const objectArg = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_Warnings"]();
|
|
34
|
+
void (objectArg.push(item));
|
|
35
|
+
return undefined;
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
const typeNode = matchValue;
|
|
39
|
+
const previousContext = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_SyntheticContext"]();
|
|
40
|
+
reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.set_SyntheticContext"](contextNode);
|
|
41
|
+
let propertyType;
|
|
42
|
+
try {
|
|
43
|
+
propertyType = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNode24A678AD"](typeNode);
|
|
44
|
+
}
|
|
45
|
+
finally {
|
|
46
|
+
reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.set_SyntheticContext"](previousContext);
|
|
47
|
+
}
|
|
48
|
+
return new GlueMember(/* Property */ 1, [new GlueProperty(property.name, empty(), propertyType, false, (matchValue_1 = property.flags, $007CHasSymbolFlags$007C_$007C(16777216, matchValue_1) != null), GlueAccessor.ReadWrite, false)]);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function readInstantiatedMember(reader, contextNode, property, declaration) {
|
|
53
|
+
const checker = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_checker"]();
|
|
54
|
+
const instantiatedType = checker.getTypeOfSymbol(property);
|
|
55
|
+
const isInstantiated = !Operators_IsNull(declaration.symbol) && !(instantiatedType === checker.getTypeOfSymbol(declaration.symbol));
|
|
56
|
+
const declaredMember = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadDeclaration61B89E55"](declaration);
|
|
57
|
+
if (!isInstantiated) {
|
|
58
|
+
return declaredMember;
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
const matchValue = checker.typeToTypeNode(instantiatedType, enclosingDeclarationOf(contextNode), typeNodeBuilderFlags);
|
|
62
|
+
if (matchValue != null) {
|
|
63
|
+
const typeNode = matchValue;
|
|
64
|
+
const previousContext = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_SyntheticContext"]();
|
|
65
|
+
reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.set_SyntheticContext"](contextNode);
|
|
66
|
+
let instantiatedMember;
|
|
67
|
+
try {
|
|
68
|
+
instantiatedMember = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNode24A678AD"](typeNode);
|
|
69
|
+
}
|
|
70
|
+
finally {
|
|
71
|
+
reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.set_SyntheticContext"](previousContext);
|
|
72
|
+
}
|
|
73
|
+
let matchResult, info, typ, functionType, info_1, functionType_1, info_2, declaredMember_1;
|
|
74
|
+
switch (declaredMember.tag) {
|
|
75
|
+
case 1: {
|
|
76
|
+
matchResult = 0;
|
|
77
|
+
info = declaredMember.fields[0];
|
|
78
|
+
typ = instantiatedMember;
|
|
79
|
+
break;
|
|
80
|
+
}
|
|
81
|
+
case 6: {
|
|
82
|
+
if (instantiatedMember.tag === 15) {
|
|
83
|
+
matchResult = 1;
|
|
84
|
+
functionType = instantiatedMember.fields[0];
|
|
85
|
+
info_1 = declaredMember.fields[0];
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
matchResult = 3;
|
|
89
|
+
declaredMember_1 = declaredMember;
|
|
90
|
+
}
|
|
91
|
+
break;
|
|
92
|
+
}
|
|
93
|
+
case 0: {
|
|
94
|
+
if (instantiatedMember.tag === 15) {
|
|
95
|
+
matchResult = 2;
|
|
96
|
+
functionType_1 = instantiatedMember.fields[0];
|
|
97
|
+
info_2 = declaredMember.fields[0];
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
matchResult = 3;
|
|
101
|
+
declaredMember_1 = declaredMember;
|
|
102
|
+
}
|
|
103
|
+
break;
|
|
104
|
+
}
|
|
105
|
+
default: {
|
|
106
|
+
matchResult = 3;
|
|
107
|
+
declaredMember_1 = declaredMember;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
switch (matchResult) {
|
|
111
|
+
case 0:
|
|
112
|
+
return new GlueMember(/* Property */ 1, [new GlueProperty(info.Name, info.Documentation, typ, info.IsStatic, info.IsOptional, info.Accessor, info.IsPrivate)]);
|
|
113
|
+
case 1:
|
|
114
|
+
return new GlueMember(/* MethodSignature */ 6, [new GlueMethodSignature(info_1.Name, info_1.Documentation, info_1.TypeParameters, functionType.Parameters, functionType.Type, info_1.IsOptional)]);
|
|
115
|
+
case 2:
|
|
116
|
+
return new GlueMember(/* Method */ 0, [new GlueMethod(info_2.Name, info_2.Documentation, info_2.TypeParameters, functionType_1.Parameters, functionType_1.Type, info_2.IsOptional, info_2.IsStatic)]);
|
|
117
|
+
default:
|
|
118
|
+
return declaredMember_1;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
else {
|
|
122
|
+
return declaredMember;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
@@ -1,13 +1,31 @@
|
|
|
1
1
|
|
|
2
2
|
import { choose, concat, toList, exists } from "../../fable_modules/fable-library-js.5.17.2/Seq.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { isExportedDeclaration, isGlobalAugmentation, isTopLevelModuleDeclaration, isMergedInterfaceDeclaration, identifierText } from "./Utils.js";
|
|
4
|
+
import { ofSeq, filter, empty, map, collect, singleton } from "../../fable_modules/fable-library-js.5.17.2/List.js";
|
|
5
|
+
import { singleton as singleton_1 } from "../../fable_modules/fable-library-js.5.17.2/Set.js";
|
|
6
|
+
import { comparePrimitives } from "../../fable_modules/fable-library-js.5.17.2/Util.js";
|
|
5
7
|
import { GlueModuleDeclaration } from "../GlueAST.js";
|
|
6
8
|
|
|
7
9
|
export function readModuleDeclaration(reader, declaration) {
|
|
8
10
|
const name = declaration.name;
|
|
9
11
|
const children = declaration.getChildren();
|
|
10
|
-
const
|
|
12
|
+
const isBodyOfDottedName = (declaration.parent.kind === 268) && (declaration.parent.body === declaration);
|
|
13
|
+
const isNamespace = isBodyOfDottedName ? true : exists((node) => (node.kind === 145), children);
|
|
14
|
+
const isAmbientModule = declaration.name.kind === 11;
|
|
15
|
+
const isExportAssigned = exists((statement) => {
|
|
16
|
+
if (statement.kind === 278) {
|
|
17
|
+
const expression = statement.expression;
|
|
18
|
+
if (expression.kind === 80) {
|
|
19
|
+
return identifierText(expression) === name.getText();
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
return false;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
}, declaration.getSourceFile().statements);
|
|
11
29
|
const types = toList(concat(choose((child) => {
|
|
12
30
|
const matchValue = child.kind;
|
|
13
31
|
switch (matchValue) {
|
|
@@ -15,12 +33,42 @@ export function readModuleDeclaration(reader, declaration) {
|
|
|
15
33
|
return singleton(reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadNode6C0FD055"](child));
|
|
16
34
|
case 269: {
|
|
17
35
|
const moduleBlock = child;
|
|
18
|
-
return
|
|
36
|
+
return collect((statement_2) => {
|
|
37
|
+
let exportClause;
|
|
38
|
+
if (statement_2.kind === 279) {
|
|
39
|
+
const exportDeclaration = statement_2;
|
|
40
|
+
const matchValue_2 = exportDeclaration.exportClause;
|
|
41
|
+
let matchResult, exportClause_1;
|
|
42
|
+
if (matchValue_2 != null) {
|
|
43
|
+
if ((exportClause = matchValue_2, (exportDeclaration.moduleSpecifier == null) && (exportClause.kind === 280))) {
|
|
44
|
+
matchResult = 0;
|
|
45
|
+
exportClause_1 = matchValue_2;
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
matchResult = 1;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
matchResult = 1;
|
|
53
|
+
}
|
|
54
|
+
switch (matchResult) {
|
|
55
|
+
case 0:
|
|
56
|
+
return map((node_1) => reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadNode6C0FD055"](node_1), toList(exportClause_1.elements));
|
|
57
|
+
default:
|
|
58
|
+
return empty();
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
return singleton(reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadNode6C0FD055"](statement_2));
|
|
63
|
+
}
|
|
64
|
+
}, filter((statement_1) => !isMergedInterfaceDeclaration(reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_checker"](), reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_PackageContext"](), statement_1), ofSeq(moduleBlock.statements)));
|
|
19
65
|
}
|
|
20
66
|
default:
|
|
21
67
|
return undefined;
|
|
22
68
|
}
|
|
23
69
|
}, children)));
|
|
24
|
-
return new GlueModuleDeclaration(reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadDocumentationFromNode6C0FD055"](declaration), name.getText(), isTopLevelModuleDeclaration(reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_PackageContext"](), declaration), isNamespace, (reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_PackageContext"]() != null) && isGlobalAugmentation(declaration),
|
|
70
|
+
return new GlueModuleDeclaration(reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadDocumentationFromNode6C0FD055"](declaration), name.getText(), isTopLevelModuleDeclaration(reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_PackageContext"](), declaration), isNamespace, (reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_PackageContext"]() != null) && isGlobalAugmentation(declaration), ((isAmbientModule ? true : isBodyOfDottedName) ? true : isExportAssigned) ? true : isExportedDeclaration(declaration, singleton_1(name.getText(), {
|
|
71
|
+
Compare: (x, y) => (comparePrimitives(x, y) | 0),
|
|
72
|
+
})), false, types);
|
|
25
73
|
}
|
|
26
74
|
|
|
@@ -1,24 +1,21 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
3
|
-
import { toList } from "../../fable_modules/fable-library-js.5.17.2/Seq.js";
|
|
4
|
-
import { moduleExportNameText, resolveAlias, typeLiteralId } from "./Utils.js";
|
|
5
|
-
import { GlueReExport, GlueType, GlueTypeLiteral } from "../GlueAST.js";
|
|
2
|
+
import { GlueReExport, GlueType } from "../GlueAST.js";
|
|
6
3
|
import { defaultArg } from "../../fable_modules/fable-library-js.5.17.2/Option.js";
|
|
4
|
+
import { moduleExportNameText, resolveAlias } from "./Utils.js";
|
|
7
5
|
import { item } from "../../fable_modules/fable-library-js.5.17.2/Array.js";
|
|
6
|
+
import { empty } from "../../fable_modules/fable-library-js.5.17.2/List.js";
|
|
8
7
|
import { Report_readerError_Z19516DCE } from "./Report.js";
|
|
9
8
|
import { concat } from "../../fable_modules/fable-library-js.5.17.2/String.js";
|
|
10
9
|
import { TypeScript_Ts_SyntaxKind__SyntaxKind_get_Name } from "../TypeScript.Extensions.js";
|
|
11
10
|
|
|
12
11
|
export function readNode(reader, node) {
|
|
13
|
-
let option_3, option, binder, checker, option_1, target, matchValue_1, declarations, declarations_1, declaration_1, matchValue_2;
|
|
12
|
+
let option_3, option, binder, checker, option_1, target, matchValue_1, declarations, declarations_1, declaration, declaration_1, matchValue_2;
|
|
14
13
|
const matchValue = node.kind;
|
|
15
14
|
switch (matchValue) {
|
|
16
15
|
case 136:
|
|
17
16
|
return reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNode24A678AD"](node);
|
|
18
|
-
case 188:
|
|
19
|
-
|
|
20
|
-
return new GlueType(/* TypeLiteral */ 22, [new GlueTypeLiteral(map((declaration) => reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadDeclaration61B89E55"](declaration), toList(typeLiteralNode.members)), typeLiteralId(typeLiteralNode))]);
|
|
21
|
-
}
|
|
17
|
+
case 188:
|
|
18
|
+
return reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNode24A678AD"](node);
|
|
22
19
|
case 243:
|
|
23
20
|
case 271:
|
|
24
21
|
case 272:
|
|
@@ -47,10 +44,10 @@ export function readNode(reader, node) {
|
|
|
47
44
|
return reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadExportAssignmentZ3497D0FE"](node);
|
|
48
45
|
case 282: {
|
|
49
46
|
const exportSpecifier = node;
|
|
50
|
-
return defaultArg((option_3 = ((option = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_checker"]().getExportSpecifierLocalTargetSymbol(exportSpecifier), (binder = ((checker = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_checker"](), (symbol) => resolveAlias(checker, symbol))), (option_1 = option, (option_1 != null) ? binder(option_1) : undefined)))), (option_3 != null) ? ((target = option_3, (matchValue_1 = target.declarations, (matchValue_1 != null) ? (((declarations = matchValue_1, declarations.length > 0)) ? ((declarations_1 = matchValue_1, (declaration_1 = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadNode6C0FD055"](
|
|
47
|
+
return defaultArg((option_3 = ((option = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_checker"]().getExportSpecifierLocalTargetSymbol(exportSpecifier), (binder = ((checker = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_checker"](), (symbol) => resolveAlias(checker, symbol))), (option_1 = option, (option_1 != null) ? binder(option_1) : undefined)))), (option_3 != null) ? ((target = option_3, (matchValue_1 = target.declarations, (matchValue_1 != null) ? (((declarations = matchValue_1, declarations.length > 0)) ? ((declarations_1 = matchValue_1, (declaration = item(0, declarations_1), (declaration_1 = ((declaration.kind === 261) ? reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadNode6C0FD055"](declaration.parent.parent) : reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadNode6C0FD055"](declaration)), (matchValue_2 = exportSpecifier.propertyName, (matchValue_2 == null) ? declaration_1 : (new GlueType(/* ReExport */ 32, [new GlueReExport(moduleExportNameText(exportSpecifier.name), declaration_1, empty())]))))))) : undefined) : undefined))) : undefined), GlueType.Discard);
|
|
51
48
|
}
|
|
52
49
|
default: {
|
|
53
|
-
const warning = Report_readerError_Z19516DCE("node", concat("Unsupported node kind ", TypeScript_Ts_SyntaxKind__SyntaxKind_get_Name(matchValue)), node, "/_//src/Glutinum.Converter/Reader/Node.fs",
|
|
50
|
+
const warning = Report_readerError_Z19516DCE("node", concat("Unsupported node kind ", TypeScript_Ts_SyntaxKind__SyntaxKind_get_Name(matchValue)), node, "/_//src/Glutinum.Converter/Reader/Node.fs", 83);
|
|
54
51
|
void (reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_Warnings"]().push(warning));
|
|
55
52
|
return GlueType.Discard;
|
|
56
53
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import { filter, singleton, mapIndexed, concat } from "../../fable_modules/fable-library-js.5.17.2/List.js";
|
|
3
|
-
import { isTupleType, identifierText } from "./Utils.js";
|
|
3
|
+
import { typeNodeBuilderFlags, isTupleType, identifierText } from "./Utils.js";
|
|
4
4
|
import { Report_readerError_Z19516DCE } from "./Report.js";
|
|
5
5
|
import { concat as concat_1 } from "../../fable_modules/fable-library-js.5.17.2/String.js";
|
|
6
6
|
import { TypeScript_Ts_SyntaxKind__SyntaxKind_get_Name } from "../TypeScript.Extensions.js";
|
|
@@ -8,39 +8,40 @@ import { toList } from "../../fable_modules/fable-library-js.5.17.2/Seq.js";
|
|
|
8
8
|
import { GlueParameter } from "../GlueAST.js";
|
|
9
9
|
|
|
10
10
|
export function readParameters(reader, parameters) {
|
|
11
|
-
return concat(mapIndexed((index,
|
|
12
|
-
let tupleNode,
|
|
13
|
-
const nameNode_1 =
|
|
11
|
+
return concat(mapIndexed((index, parameter_2) => {
|
|
12
|
+
let tupleNode, typeNode_1, typeNode_2;
|
|
13
|
+
const nameNode_1 = parameter_2.name;
|
|
14
14
|
let name;
|
|
15
|
-
const
|
|
16
|
-
switch (
|
|
15
|
+
const matchValue_1 = nameNode_1.kind;
|
|
16
|
+
switch (matchValue_1) {
|
|
17
17
|
case 80: {
|
|
18
18
|
name = identifierText(nameNode_1);
|
|
19
19
|
break;
|
|
20
20
|
}
|
|
21
|
-
case 207:
|
|
21
|
+
case 207:
|
|
22
|
+
case 208: {
|
|
22
23
|
name = (`arg${index}`);
|
|
23
24
|
break;
|
|
24
25
|
}
|
|
25
26
|
default: {
|
|
26
|
-
const item = Report_readerError_Z19516DCE("name", concat_1("Unsupported kind ", TypeScript_Ts_SyntaxKind__SyntaxKind_get_Name(nameNode_1.kind)), nameNode_1, "/_//src/Glutinum.Converter/Reader/Parameters.fs",
|
|
27
|
+
const item = Report_readerError_Z19516DCE("name", concat_1("Unsupported kind ", TypeScript_Ts_SyntaxKind__SyntaxKind_get_Name(nameNode_1.kind)), nameNode_1, "/_//src/Glutinum.Converter/Reader/Parameters.fs", 36);
|
|
27
28
|
const objectArg = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_Warnings"]();
|
|
28
29
|
void (objectArg.push(item));
|
|
29
30
|
name = (`arg${index}`);
|
|
30
31
|
}
|
|
31
32
|
}
|
|
32
|
-
const isSpread =
|
|
33
|
+
const isSpread = parameter_2.dotDotDotToken != null;
|
|
33
34
|
let tupleElements;
|
|
34
|
-
const
|
|
35
|
-
let matchResult,
|
|
36
|
-
if (
|
|
37
|
-
if ((
|
|
35
|
+
const matchValue_2 = parameter_2.type;
|
|
36
|
+
let matchResult, typeNode_3, typeNode_4;
|
|
37
|
+
if (matchValue_2 != null) {
|
|
38
|
+
if ((typeNode_1 = matchValue_2, isSpread && (typeNode_1.kind === 190))) {
|
|
38
39
|
matchResult = 0;
|
|
39
|
-
|
|
40
|
+
typeNode_3 = matchValue_2;
|
|
40
41
|
}
|
|
41
|
-
else if ((
|
|
42
|
+
else if ((typeNode_2 = matchValue_2, (isSpread && (typeNode_2.kind === 184)) && (typeNode_2.pos >= 0))) {
|
|
42
43
|
matchResult = 1;
|
|
43
|
-
|
|
44
|
+
typeNode_4 = matchValue_2;
|
|
44
45
|
}
|
|
45
46
|
else {
|
|
46
47
|
matchResult = 2;
|
|
@@ -51,19 +52,18 @@ export function readParameters(reader, parameters) {
|
|
|
51
52
|
}
|
|
52
53
|
switch (matchResult) {
|
|
53
54
|
case 0: {
|
|
54
|
-
tupleElements = toList(
|
|
55
|
+
tupleElements = toList(typeNode_3.elements);
|
|
55
56
|
break;
|
|
56
57
|
}
|
|
57
58
|
case 1: {
|
|
58
|
-
const typ = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_checker"]().getTypeFromTypeNode(
|
|
59
|
+
const typ = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_checker"]().getTypeFromTypeNode(typeNode_4);
|
|
59
60
|
if (isTupleType(typ)) {
|
|
60
|
-
const
|
|
61
|
-
const matchValue_2 = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_checker"]().typeToTypeNode(typ, undefined, flags);
|
|
61
|
+
const matchValue_3 = reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.get_checker"]().typeToTypeNode(typ, undefined, typeNodeBuilderFlags);
|
|
62
62
|
let matchResult_1, tupleNode_1;
|
|
63
|
-
if (
|
|
64
|
-
if ((tupleNode =
|
|
63
|
+
if (matchValue_3 != null) {
|
|
64
|
+
if ((tupleNode = matchValue_3, tupleNode.kind === 190)) {
|
|
65
65
|
matchResult_1 = 0;
|
|
66
|
-
tupleNode_1 =
|
|
66
|
+
tupleNode_1 = matchValue_3;
|
|
67
67
|
}
|
|
68
68
|
else {
|
|
69
69
|
matchResult_1 = 1;
|
|
@@ -90,13 +90,13 @@ export function readParameters(reader, parameters) {
|
|
|
90
90
|
tupleElements = undefined;
|
|
91
91
|
}
|
|
92
92
|
if (tupleElements == null) {
|
|
93
|
-
return singleton(new GlueParameter(name,
|
|
93
|
+
return singleton(new GlueParameter(name, parameter_2.questionToken != null, isSpread, reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNodeZ64B23DD2"](parameter_2.type)));
|
|
94
94
|
}
|
|
95
95
|
else {
|
|
96
96
|
return mapIndexed((elementIndex, element) => {
|
|
97
97
|
const element_1 = element;
|
|
98
|
-
const
|
|
99
|
-
switch (
|
|
98
|
+
const matchValue_4 = element_1.kind;
|
|
99
|
+
switch (matchValue_4) {
|
|
100
100
|
case 191:
|
|
101
101
|
return new GlueParameter(`${name}${elementIndex}`, true, false, reader["Glutinum.Converter.Reader.Types.ITypeScriptReader.ReadTypeNode24A678AD"](element_1.type));
|
|
102
102
|
case 192:
|
|
@@ -110,9 +110,18 @@ export function readParameters(reader, parameters) {
|
|
|
110
110
|
}
|
|
111
111
|
}, tupleElements);
|
|
112
112
|
}
|
|
113
|
+
}, filter((parameter_1) => {
|
|
114
|
+
const matchValue = parameter_1.type;
|
|
115
|
+
if (matchValue == null) {
|
|
116
|
+
return true;
|
|
117
|
+
}
|
|
118
|
+
else {
|
|
119
|
+
const typeNode = matchValue;
|
|
120
|
+
return !((parameter_1.questionToken != null) && (typeNode.kind === 157));
|
|
121
|
+
}
|
|
113
122
|
}, filter((parameter) => {
|
|
114
123
|
const nameNode = parameter.name;
|
|
115
124
|
return !((nameNode.kind === 80) && (identifierText(nameNode) === "this"));
|
|
116
|
-
}, toList(parameters))));
|
|
125
|
+
}, toList(parameters)))));
|
|
117
126
|
}
|
|
118
127
|
|