@glutinum/cli 1.0.0-beta.5 → 1.0.0-beta.7
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/GlueAST.js +3 -2
- package/dist/Glutinum.Converter/Packages.js +1 -1
- package/dist/Glutinum.Converter/Printer.js +27 -6
- package/dist/Glutinum.Converter/Read.js +103 -140
- package/dist/Glutinum.Converter/Reader/ModuleDeclaration.js +53 -5
- package/dist/Glutinum.Converter/Reader/Node.js +3 -3
- package/dist/Glutinum.Converter/Reader/Parameters.js +3 -2
- package/dist/Glutinum.Converter/Reader/TypeNode.js +76 -22
- package/dist/Glutinum.Converter/Reader/TypeOperatorNode.js +53 -14
- package/dist/Glutinum.Converter/Reader/Types.js +5 -0
- package/dist/Glutinum.Converter/Reader/Utils.js +62 -31
- package/dist/Glutinum.Converter/Transform.js +145 -116
- package/dist/Glutinum.Converter/Transformer/Conditionals.js +2 -64
- package/dist/Glutinum.Converter/Transformer/Context.js +23 -10
- package/dist/Glutinum.Converter/Transformer/Heritage.js +89 -2
- package/package.json +1 -1
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
|
|
2
2
|
import { FSharpRef, Record } from "../fable_modules/fable-library-js.5.17.2/Types.js";
|
|
3
|
-
import { Reporter__get_HasIterable, Reporter__get_HasReadonlyArray, Reporter__get_HasRegEpx, Reporter__get_Errors, Reporter__get_Warnings, TransformState_Create_Z68CEF8E2, TypeLiteralsMemory_$ctor, Reporter_$ctor, TransformContext__ToList, TransformContext_$ctor_Z1635F75A, TransformContext__get__Reporter, TransformContext__set_SiblingTypeNames_2FCB1351, TypeLiteralsMemory__LeaveModule, TypeLiteralsMemory__EnterModule_Z721C83C5, TransformContext__ExposeTypeAlias_1CE4A880, TransformContext__AddWarning_Z721C83C5, sanitizeTypeNameAndPushScope, ImportSource, importAllAttribute, TransformContext__get_TypeMemory, importAttribute, sanitizeMemberNameAndPushScope, TransformContext__get_ImportSource, importDefaultAttribute, TransformContext__AddError_Z721C83C5, TypeLiteralsMemory__Remember_74C8CBB, TransformContext__get_TypeLiteralsMemory, TransformContext__get_Root, TypeLiteralsMemory__TryReference_433E080, TransformContext__get_State, TransformContext__get_FullName, TransformContext__ExposeType_Z1D58A540, TransformContext__PushScope_27AED5E3, sanitizeNameAndPushScope, TransformContext__NewTypeName, TransformContext__get_CurrentScopeName, TransformContext__ExposeIterable, TransformContext__ReferenceName_Z721C83C5, TransformContext__get_OriginalScopeName, TransformContext__ExposeTypeAlias_Z721C83C5, TransformContext__ExposeReadonlyArray, ImportSource_$reflection, TransformContext_$reflection } from "./Transformer/Context.js";
|
|
3
|
+
import { Reporter__get_HasIterable, Reporter__get_HasReadonlyArray, Reporter__get_HasRegEpx, Reporter__get_Errors, Reporter__get_Warnings, TransformState_Create_Z68CEF8E2, TypeLiteralsMemory_$ctor, Reporter_$ctor, TransformContext__ToList, TransformContext_$ctor_Z1635F75A, TypeLiteralsMemory__EnterFileModule_Z721C83C5, TransformContext__get__Reporter, TransformContext__set_SiblingTypeNames_2FCB1351, TypeLiteralsMemory__LeaveModule, TypeLiteralsMemory__EnterModule_Z721C83C5, TransformContext__ExposeTypeAlias_1CE4A880, TransformContext__AddWarning_Z721C83C5, sanitizeTypeNameAndPushScope, ImportSource, importAllAttribute, TransformContext__get_TypeMemory, importAttribute, sanitizeMemberNameAndPushScope, TransformContext__get_ImportSource, importDefaultAttribute, TransformContext__AddError_Z721C83C5, TypeLiteralsMemory__Remember_74C8CBB, TransformContext__get_TypeLiteralsMemory, TransformContext__get_Root, TypeLiteralsMemory__TryReference_433E080, TransformContext__get_State, TransformContext__get_FullName, TransformContext__ExposeType_Z1D58A540, TransformContext__PushScope_27AED5E3, sanitizeNameAndPushScope, TransformContext__NewTypeName, TransformContext__get_CurrentScopeName, TransformContext__ExposeIterable, TransformContext__ReferenceName_Z721C83C5, TransformContext__get_OriginalScopeName, TransformContext__ExposeTypeAlias_Z721C83C5, TransformContext__ExposeReadonlyArray, ImportSource_$reflection, TransformContext_$reflection } from "./Transformer/Context.js";
|
|
4
4
|
import { int32_type, array_type, option_type, list_type, record_type, class_type, string_type, bool_type } from "../fable_modules/fable-library-js.5.17.2/Reflection.js";
|
|
5
5
|
import { FSharpModule, FSharpSingleErasedCaseUnion, FSharpJSApi, FSharpEnum, FSharpEnumCase, FSharpLiteral, FSharpTypeParameterInfo_Create_Z6CFD3565, FSharpUnionCaseNamed, FSharpClass, FSharpConstructor, FSharpExplicitField, FSharpStaticMemberInfo, FSharpAccessor, FSharpMemberInfoBody, FSharpAccessibility, FSharpMember, FSharpMemberInfo, FSharpParameter, FSharpThisType, FSharpPrimitive, FSharpTypeAlias, FSharpDelegate, FSharpFunctionType, FSharpTypeReference, FSharpUnion, FSharpUnionCase, FSharpTypeParameter, FSharpMapped, FSharpInterface, FSharpAttribute, FSharpType, FSharpType_$reflection, FSharpTypeParameter_$reflection, FSharpMember_$reflection } from "./FsharpAST.js";
|
|
6
|
-
import { GlueReExport, GlueClassDeclaration, GlueLiteral__ToText, GlueIndexSignature, GlueLiteral, GlueMember__TryGetAccessor, GlueMember__get_Documentation, GlueProperty, GlueAccessor, GlueMethod, GlueMethodSignature, GlueSubstitution_mentionedTypeParameters, GlueFunctionType, GlueParameter, GlueTypeUnion, GlueFunctionDeclaration, GlueVariable, GlueType__get_Name, GlueConstructor,
|
|
6
|
+
import { GlueReExport, GlueTypeReference, GlueClassDeclaration, GlueLiteral__ToText, GlueIndexSignature, GlueLiteral, GlueMember__TryGetAccessor, GlueMember__get_Documentation, GluePrimitive, GlueProperty, GlueAccessor, GlueMethod, GlueMethodSignature, GlueSubstitution_mentionedTypeParameters, GlueFunctionType, GlueParameter, GlueTypeUnion, GlueFunctionDeclaration, GlueVariable, GlueType__get_Name, GlueConstructor, GlueType, GlueTypeLiteral, GlueMember, GlueTypeParameter, GlueSubstitution_substitute, GlueSubstitution_substituteParameter, GlueInterface, GlueTypeAliasDeclaration_$reflection, GlueType_$reflection } from "./GlueAST.js";
|
|
7
7
|
import { transformComment, TransformCommentResult_$reflection } from "./Transformer/Comment.js";
|
|
8
8
|
import { add, contains as contains_2, union, empty as empty_2, ofSeq, singleton as singleton_2, ofList, FSharpSet__Contains } from "../fable_modules/fable-library-js.5.17.2/Set.js";
|
|
9
9
|
import { aggregatedExports, replaceSelfReference, isUnitAlias, typedArrayNames, transformPrimitive, requiredBeforeParamArray, isDataObject, Interface_makePartial, tryUnwrapOption, iteratorNames } from "./Transformer/Utils.js";
|
|
10
10
|
import { value as value_7, unwrap, toArray, defaultArg } from "../fable_modules/fable-library-js.5.17.2/Option.js";
|
|
11
|
-
import { zip, mapFold, item, concat as concat_1, reverse, iterate, cons, foldBack, fold, tryFind, ofSeq as ofSeq_1, forAll as forAll_1, sortBy, tryPick, truncate,
|
|
12
|
-
import { aliasArities, namedTypeParameters, membersNameUndeclaredTypeParameters, mentionsTypeParameter, ownTypeParameterDefaults, typeParameterNames as typeParameterNames_2, unconstrained, memberTypeParameterNames, typeArguments, declaredTypeParameters } from "./Transformer/TypeParameters.js";
|
|
11
|
+
import { zip, mapFold, item, concat as concat_1, reverse, iterate, cons, foldBack, fold, tryFind, ofSeq as ofSeq_1, forAll as forAll_1, sortBy, tryPick, truncate, contains, exists, partition, mapIndexed, filter, append, length, collect, tryLast, choose, tryHead, singleton, empty, ofArray, map, head as head_1, tail as tail_3, isEmpty } from "../fable_modules/fable-library-js.5.17.2/List.js";
|
|
12
|
+
import { aliasArities, namedTypeParameters, membersNameUndeclaredTypeParameters, mentionsTypeParameter, ownTypeParameterDefaults, typeParameterNames as typeParameterNames_2, unconstrained, memberTypeParameterNames, typeArguments, declaredTypeParameters as declaredTypeParameters_1 } from "./Transformer/TypeParameters.js";
|
|
13
13
|
import { List_groupBy, List_distinct } from "../fable_modules/fable-library-js.5.17.2/Seq2.js";
|
|
14
14
|
import { uncurry2, curry2, Lazy, structuralHash, Exception, numberHash, int32ToString, disposeSafe, getEnumerator, defaultOf, comparePrimitives, safeHash, equals, stringHash } from "../fable_modules/fable-library-js.5.17.2/Util.js";
|
|
15
15
|
import { replace, trim, printf, toFail, substring, interpolate, concat } from "../fable_modules/fable-library-js.5.17.2/String.js";
|
|
16
|
-
import { resolveMembers, resolveFunction, isConditionalAlias,
|
|
16
|
+
import { resolveMembers, resolveFunction, isConditionalAlias, isInterfaceDeclaration } from "./Transformer/Conditionals.js";
|
|
17
17
|
import { FSharpMap__TryFind, exists as exists_1, empty as empty_3, ofList as ofList_1, FSharpMap__ContainsKey, FSharpMap__get_Item, map as map_1 } from "../fable_modules/fable-library-js.5.17.2/Map.js";
|
|
18
18
|
import { sanitizeTypeNameWithResult, removeSurroundingQuotes, sanitizeTypeName } from "./Utils/Naming.js";
|
|
19
19
|
import { addToSet, tryGetValue } from "../fable_modules/fable-library-js.5.17.2/MapUtil.js";
|
|
@@ -26,7 +26,7 @@ import { capitalizeFirstLetter } from "./Utils/String.js";
|
|
|
26
26
|
import { expandMembers } from "./Transformer/AnyFunctionOverloads.js";
|
|
27
27
|
import { min } from "../fable_modules/fable-library-js.5.17.2/Double.js";
|
|
28
28
|
import { inheritsIterable, asMethods, tryCallableHeritage } from "./Transformer/CallableProperties.js";
|
|
29
|
-
import { withoutBaseClassProperties, isInheritableType, isSelfHeritage, isArrayHeritage, isErrorHeritage, withoutRedeclaredBases } from "./Transformer/Heritage.js";
|
|
29
|
+
import { withoutBaseClassProperties, withoutBasesOfBases, isInheritableType, isSelfHeritage, isArrayHeritage, isErrorHeritage, withoutRedeclaredBases } from "./Transformer/Heritage.js";
|
|
30
30
|
import { contains as contains_1 } from "../fable_modules/fable-library-js.5.17.2/Array.js";
|
|
31
31
|
import { isCandidate, tryResolveMembers } from "./Transformer/ParamObjectCandidate.js";
|
|
32
32
|
import { op_UnaryNegation_Int32 } from "../fable_modules/fable-library-js.5.17.2/Int32.js";
|
|
@@ -506,7 +506,7 @@ function transformTupleType(context, glueTypes) {
|
|
|
506
506
|
}
|
|
507
507
|
|
|
508
508
|
function anonymousInterface(context, name, typeParameterNames, members, inheritance) {
|
|
509
|
-
return new FSharpInterface(ofArray([FSharpAttribute.AllowNullLiteral, FSharpAttribute.Interface]), name, empty(), TransformContext__get_OriginalScopeName(context),
|
|
509
|
+
return new FSharpInterface(ofArray([FSharpAttribute.AllowNullLiteral, FSharpAttribute.Interface]), name, empty(), TransformContext__get_OriginalScopeName(context), declaredTypeParameters_1(typeParameterNames), members, inheritance);
|
|
510
510
|
}
|
|
511
511
|
|
|
512
512
|
function mappedReference(context, name, typeParameterNames) {
|
|
@@ -724,7 +724,7 @@ function UtilityType_transform(context, utilityType) {
|
|
|
724
724
|
Equals: (x_2, y_2) => (x_2 === y_2),
|
|
725
725
|
GetHashCode: (x_2) => (stringHash(x_2) | 0),
|
|
726
726
|
});
|
|
727
|
-
const freeTypeParameters =
|
|
727
|
+
const freeTypeParameters = declaredTypeParameters_1(freeTypeParameterNames_2);
|
|
728
728
|
const creates = (!isEmpty(members) && isDataObject(members)) ? paramObjectCreateMembers(context, new FSharpType(/* Mapped */ 7, [new FSharpMapped(name_4, typeArguments(freeTypeParameterNames_2))]), members) : empty();
|
|
729
729
|
TransformContext__ExposeType_Z1D58A540(context, new FSharpType(/* Interface */ 5, [anonymousInterface(context, name_4, freeTypeParameterNames_2, append(TransformMembers_toFSharpMember(context, members), creates), empty())]));
|
|
730
730
|
return new FSharpType(/* Mapped */ 7, [new FSharpMapped(TransformContext__ReferenceName_Z721C83C5(context, name_4), freeTypeParameters)]);
|
|
@@ -847,7 +847,7 @@ function transformUnionType(context, cases) {
|
|
|
847
847
|
Equals: (x_2, y_2) => (x_2 === y_2),
|
|
848
848
|
GetHashCode: (x_2) => (stringHash(x_2) | 0),
|
|
849
849
|
});
|
|
850
|
-
TransformContext__ExposeType_Z1D58A540(context, new FSharpType(/* Union */ 1, [erasedUnion(name_1,
|
|
850
|
+
TransformContext__ExposeType_Z1D58A540(context, new FSharpType(/* Union */ 1, [erasedUnion(name_1, declaredTypeParameters_1(typeParameterNames_1), caseTypes)]));
|
|
851
851
|
const reference = referenceToExposed(context, name_1, typeParameterNames_1);
|
|
852
852
|
if (isOptional) {
|
|
853
853
|
return new FSharpType(/* Option */ 3, [reference]);
|
|
@@ -870,7 +870,7 @@ function transformUnionType(context, cases) {
|
|
|
870
870
|
});
|
|
871
871
|
let option_3;
|
|
872
872
|
const option_1 = tryOptimizeUnionType(context, name, others);
|
|
873
|
-
option_3 = ((option_1 != null) ? ((typ = option_1, (typ.tag === 1) ? ((unionInfo = typ.fields[0], new FSharpType(/* Union */ 1, [new FSharpUnion(unionInfo.Attributes, unionInfo.Name, unionInfo.Cases, unionInfo.IsOptional,
|
|
873
|
+
option_3 = ((option_1 != null) ? ((typ = option_1, (typ.tag === 1) ? ((unionInfo = typ.fields[0], new FSharpType(/* Union */ 1, [new FSharpUnion(unionInfo.Attributes, unionInfo.Name, unionInfo.Cases, unionInfo.IsOptional, declaredTypeParameters_1(typeParameterNames), unionInfo.Constants)]))) : typ)) : undefined);
|
|
874
874
|
if (option_3 != null) {
|
|
875
875
|
TransformContext__ExposeType_Z1D58A540(context, option_3);
|
|
876
876
|
}
|
|
@@ -879,6 +879,35 @@ function transformUnionType(context, cases) {
|
|
|
879
879
|
}
|
|
880
880
|
}
|
|
881
881
|
|
|
882
|
+
function isLambdaSignature(parameters, ownTypeParameters, declaredTypeParameters) {
|
|
883
|
+
const hasConstraint = exists((_arg) => {
|
|
884
|
+
let matchResult;
|
|
885
|
+
if (_arg.tag === 1) {
|
|
886
|
+
if (_arg.fields[0].Constraint != null) {
|
|
887
|
+
matchResult = 0;
|
|
888
|
+
}
|
|
889
|
+
else {
|
|
890
|
+
matchResult = 1;
|
|
891
|
+
}
|
|
892
|
+
}
|
|
893
|
+
else {
|
|
894
|
+
matchResult = 1;
|
|
895
|
+
}
|
|
896
|
+
switch (matchResult) {
|
|
897
|
+
case 0:
|
|
898
|
+
return true;
|
|
899
|
+
default:
|
|
900
|
+
return false;
|
|
901
|
+
}
|
|
902
|
+
}, declaredTypeParameters);
|
|
903
|
+
if (((length(parameters) <= 1) && !exists((_arg_1) => _arg_1.IsSpread, parameters)) && isEmpty(ownTypeParameters)) {
|
|
904
|
+
return !hasConstraint;
|
|
905
|
+
}
|
|
906
|
+
else {
|
|
907
|
+
return false;
|
|
908
|
+
}
|
|
909
|
+
}
|
|
910
|
+
|
|
882
911
|
function transformFunctionType(context, functionTypeInfo) {
|
|
883
912
|
const paremeters = filter((parameter) => (parameter.Name !== "this"), functionTypeInfo.Parameters);
|
|
884
913
|
let matchResult;
|
|
@@ -1032,8 +1061,7 @@ function transformType(context_mut, glueType_mut) {
|
|
|
1032
1061
|
transformType:
|
|
1033
1062
|
while (true) {
|
|
1034
1063
|
const context = context_mut, glueType = glueType_mut;
|
|
1035
|
-
let
|
|
1036
|
-
let matchResult, constructSignature, primitiveInfo, glueType_21, thisTypeInfo, glueTypes, glueType_22, cases, typeReference_3, typeReference_4, typeReference_5, argument, typeReference_6, glueType_25, classDeclaration, name, functionTypeInfo, interfaceInfo, name_1, typeLiteralInfo, glueType_26, info, innerGlueType, namedTupleType, glueLiteral, functionDeclaration_1, functionDeclaration_2, members, references, members_1, utilityType, typeAliasDeclaration, mappedType;
|
|
1064
|
+
let matchResult, constructSignature, primitiveInfo, glueType_21, thisTypeInfo, glueTypes, glueType_22, cases, typeReference_2, typeReference_3, argument, typeReference_4, glueType_25, classDeclaration, name, functionTypeInfo, interfaceInfo, name_1, typeLiteralInfo, glueType_26, info, innerGlueType, namedTupleType, glueLiteral, functionDeclaration_1, functionDeclaration_2, members, references, members_1, utilityType, typeAliasDeclaration, mappedType;
|
|
1037
1065
|
switch (glueType.tag) {
|
|
1038
1066
|
case 29: {
|
|
1039
1067
|
matchResult = 1;
|
|
@@ -1077,81 +1105,77 @@ function transformType(context_mut, glueType_mut) {
|
|
|
1077
1105
|
case 13: {
|
|
1078
1106
|
if (isConditionalAlias(TransformContext__get_State(context).Conditionals, glueType.fields[0].FullName)) {
|
|
1079
1107
|
matchResult = 9;
|
|
1080
|
-
|
|
1081
|
-
}
|
|
1082
|
-
else if ((typeReference_1 = glueType.fields[0], isEmpty(typeReference_1.TypeArguments) && !isEmpty(genericDelegateTypeParameters(TransformContext__get_State(context).Conditionals, typeReference_1.FullName)))) {
|
|
1083
|
-
matchResult = 10;
|
|
1084
|
-
typeReference_4 = glueType.fields[0];
|
|
1108
|
+
typeReference_2 = glueType.fields[0];
|
|
1085
1109
|
}
|
|
1086
1110
|
else if (mapTypeNameToFableCoreAwareName(context, glueType.fields[0]) === "obj") {
|
|
1087
|
-
matchResult =
|
|
1088
|
-
|
|
1111
|
+
matchResult = 10;
|
|
1112
|
+
typeReference_3 = glueType.fields[0];
|
|
1089
1113
|
}
|
|
1090
1114
|
else if (glueType.fields[0].Name === "Readonly") {
|
|
1091
1115
|
if (!isEmpty(glueType.fields[0].TypeArguments)) {
|
|
1092
1116
|
if (isEmpty(tail_3(glueType.fields[0].TypeArguments))) {
|
|
1093
1117
|
if (glueType.fields[0].IsStandardLibrary) {
|
|
1094
|
-
matchResult =
|
|
1118
|
+
matchResult = 11;
|
|
1095
1119
|
argument = head_1(glueType.fields[0].TypeArguments);
|
|
1096
1120
|
}
|
|
1097
1121
|
else {
|
|
1098
|
-
matchResult =
|
|
1099
|
-
|
|
1122
|
+
matchResult = 12;
|
|
1123
|
+
typeReference_4 = glueType.fields[0];
|
|
1100
1124
|
}
|
|
1101
1125
|
}
|
|
1102
1126
|
else {
|
|
1103
|
-
matchResult =
|
|
1104
|
-
|
|
1127
|
+
matchResult = 12;
|
|
1128
|
+
typeReference_4 = glueType.fields[0];
|
|
1105
1129
|
}
|
|
1106
1130
|
}
|
|
1107
1131
|
else {
|
|
1108
|
-
matchResult =
|
|
1109
|
-
|
|
1132
|
+
matchResult = 12;
|
|
1133
|
+
typeReference_4 = glueType.fields[0];
|
|
1110
1134
|
}
|
|
1111
1135
|
}
|
|
1112
1136
|
else {
|
|
1113
|
-
matchResult =
|
|
1114
|
-
|
|
1137
|
+
matchResult = 12;
|
|
1138
|
+
typeReference_4 = glueType.fields[0];
|
|
1115
1139
|
}
|
|
1116
1140
|
break;
|
|
1117
1141
|
}
|
|
1118
1142
|
case 14: {
|
|
1119
|
-
matchResult =
|
|
1143
|
+
matchResult = 13;
|
|
1120
1144
|
glueType_25 = glueType.fields[0];
|
|
1121
1145
|
break;
|
|
1122
1146
|
}
|
|
1123
1147
|
case 12: {
|
|
1124
|
-
matchResult =
|
|
1148
|
+
matchResult = 14;
|
|
1125
1149
|
classDeclaration = glueType.fields[0];
|
|
1126
1150
|
break;
|
|
1127
1151
|
}
|
|
1128
1152
|
case 16: {
|
|
1129
|
-
matchResult =
|
|
1153
|
+
matchResult = 15;
|
|
1130
1154
|
name = glueType.fields[0];
|
|
1131
1155
|
break;
|
|
1132
1156
|
}
|
|
1133
1157
|
case 15: {
|
|
1134
|
-
matchResult =
|
|
1158
|
+
matchResult = 16;
|
|
1135
1159
|
functionTypeInfo = glueType.fields[0];
|
|
1136
1160
|
break;
|
|
1137
1161
|
}
|
|
1138
1162
|
case 1: {
|
|
1139
|
-
matchResult =
|
|
1163
|
+
matchResult = 17;
|
|
1140
1164
|
interfaceInfo = glueType.fields[0];
|
|
1141
1165
|
break;
|
|
1142
1166
|
}
|
|
1143
1167
|
case 22: {
|
|
1144
1168
|
if (isEmpty(glueType.fields[0].Members)) {
|
|
1145
|
-
matchResult =
|
|
1169
|
+
matchResult = 18;
|
|
1146
1170
|
}
|
|
1147
1171
|
else {
|
|
1148
1172
|
const activePatternResult = $007CRememberedTypeLiteral$007C_$007C(context, glueType);
|
|
1149
1173
|
if (activePatternResult != null) {
|
|
1150
|
-
matchResult =
|
|
1174
|
+
matchResult = 19;
|
|
1151
1175
|
name_1 = activePatternResult;
|
|
1152
1176
|
}
|
|
1153
1177
|
else {
|
|
1154
|
-
matchResult =
|
|
1178
|
+
matchResult = 20;
|
|
1155
1179
|
typeLiteralInfo = glueType.fields[0];
|
|
1156
1180
|
}
|
|
1157
1181
|
}
|
|
@@ -1160,11 +1184,11 @@ function transformType(context_mut, glueType_mut) {
|
|
|
1160
1184
|
case 25: {
|
|
1161
1185
|
const activePatternResult_1 = $007CRememberedTypeLiteral$007C_$007C(context, glueType);
|
|
1162
1186
|
if (activePatternResult_1 != null) {
|
|
1163
|
-
matchResult =
|
|
1187
|
+
matchResult = 19;
|
|
1164
1188
|
name_1 = activePatternResult_1;
|
|
1165
1189
|
}
|
|
1166
1190
|
else {
|
|
1167
|
-
matchResult =
|
|
1191
|
+
matchResult = 21;
|
|
1168
1192
|
glueType_26 = glueType.fields[0];
|
|
1169
1193
|
}
|
|
1170
1194
|
break;
|
|
@@ -1172,11 +1196,11 @@ function transformType(context_mut, glueType_mut) {
|
|
|
1172
1196
|
case 2: {
|
|
1173
1197
|
const activePatternResult_2 = $007CRememberedTypeLiteral$007C_$007C(context, glueType);
|
|
1174
1198
|
if (activePatternResult_2 != null) {
|
|
1175
|
-
matchResult =
|
|
1199
|
+
matchResult = 19;
|
|
1176
1200
|
name_1 = activePatternResult_2;
|
|
1177
1201
|
}
|
|
1178
1202
|
else {
|
|
1179
|
-
matchResult =
|
|
1203
|
+
matchResult = 22;
|
|
1180
1204
|
info = glueType.fields[0];
|
|
1181
1205
|
}
|
|
1182
1206
|
break;
|
|
@@ -1184,11 +1208,11 @@ function transformType(context_mut, glueType_mut) {
|
|
|
1184
1208
|
case 9: {
|
|
1185
1209
|
const activePatternResult_3 = $007CRememberedTypeLiteral$007C_$007C(context, glueType);
|
|
1186
1210
|
if (activePatternResult_3 != null) {
|
|
1187
|
-
matchResult =
|
|
1211
|
+
matchResult = 19;
|
|
1188
1212
|
name_1 = activePatternResult_3;
|
|
1189
1213
|
}
|
|
1190
1214
|
else {
|
|
1191
|
-
matchResult =
|
|
1215
|
+
matchResult = 23;
|
|
1192
1216
|
innerGlueType = glueType.fields[0];
|
|
1193
1217
|
}
|
|
1194
1218
|
break;
|
|
@@ -1196,11 +1220,11 @@ function transformType(context_mut, glueType_mut) {
|
|
|
1196
1220
|
case 19: {
|
|
1197
1221
|
const activePatternResult_4 = $007CRememberedTypeLiteral$007C_$007C(context, glueType);
|
|
1198
1222
|
if (activePatternResult_4 != null) {
|
|
1199
|
-
matchResult =
|
|
1223
|
+
matchResult = 19;
|
|
1200
1224
|
name_1 = activePatternResult_4;
|
|
1201
1225
|
}
|
|
1202
1226
|
else {
|
|
1203
|
-
matchResult =
|
|
1227
|
+
matchResult = 24;
|
|
1204
1228
|
namedTupleType = glueType.fields[0];
|
|
1205
1229
|
}
|
|
1206
1230
|
break;
|
|
@@ -1208,22 +1232,22 @@ function transformType(context_mut, glueType_mut) {
|
|
|
1208
1232
|
case 0: {
|
|
1209
1233
|
const activePatternResult_5 = $007CRememberedTypeLiteral$007C_$007C(context, glueType);
|
|
1210
1234
|
if (activePatternResult_5 != null) {
|
|
1211
|
-
matchResult =
|
|
1235
|
+
matchResult = 19;
|
|
1212
1236
|
name_1 = activePatternResult_5;
|
|
1213
1237
|
}
|
|
1214
1238
|
else {
|
|
1215
|
-
matchResult =
|
|
1239
|
+
matchResult = 25;
|
|
1216
1240
|
}
|
|
1217
1241
|
break;
|
|
1218
1242
|
}
|
|
1219
1243
|
case 8: {
|
|
1220
1244
|
const activePatternResult_6 = $007CRememberedTypeLiteral$007C_$007C(context, glueType);
|
|
1221
1245
|
if (activePatternResult_6 != null) {
|
|
1222
|
-
matchResult =
|
|
1246
|
+
matchResult = 19;
|
|
1223
1247
|
name_1 = activePatternResult_6;
|
|
1224
1248
|
}
|
|
1225
1249
|
else {
|
|
1226
|
-
matchResult =
|
|
1250
|
+
matchResult = 26;
|
|
1227
1251
|
glueLiteral = glueType.fields[0];
|
|
1228
1252
|
}
|
|
1229
1253
|
break;
|
|
@@ -1231,15 +1255,15 @@ function transformType(context_mut, glueType_mut) {
|
|
|
1231
1255
|
case 6: {
|
|
1232
1256
|
const activePatternResult_7 = $007CRememberedTypeLiteral$007C_$007C(context, glueType);
|
|
1233
1257
|
if (activePatternResult_7 != null) {
|
|
1234
|
-
matchResult =
|
|
1258
|
+
matchResult = 19;
|
|
1235
1259
|
name_1 = activePatternResult_7;
|
|
1236
1260
|
}
|
|
1237
1261
|
else if (!isEmpty(glueType.fields[0].TypeParameters)) {
|
|
1238
|
-
matchResult =
|
|
1262
|
+
matchResult = 27;
|
|
1239
1263
|
functionDeclaration_1 = glueType.fields[0];
|
|
1240
1264
|
}
|
|
1241
1265
|
else {
|
|
1242
|
-
matchResult =
|
|
1266
|
+
matchResult = 28;
|
|
1243
1267
|
functionDeclaration_2 = glueType.fields[0];
|
|
1244
1268
|
}
|
|
1245
1269
|
break;
|
|
@@ -1247,11 +1271,11 @@ function transformType(context_mut, glueType_mut) {
|
|
|
1247
1271
|
case 21: {
|
|
1248
1272
|
const activePatternResult_8 = $007CRememberedTypeLiteral$007C_$007C(context, glueType);
|
|
1249
1273
|
if (activePatternResult_8 != null) {
|
|
1250
|
-
matchResult =
|
|
1274
|
+
matchResult = 19;
|
|
1251
1275
|
name_1 = activePatternResult_8;
|
|
1252
1276
|
}
|
|
1253
1277
|
else {
|
|
1254
|
-
matchResult =
|
|
1278
|
+
matchResult = 29;
|
|
1255
1279
|
members = glueType.fields[1];
|
|
1256
1280
|
references = glueType.fields[0];
|
|
1257
1281
|
}
|
|
@@ -1260,11 +1284,11 @@ function transformType(context_mut, glueType_mut) {
|
|
|
1260
1284
|
case 20: {
|
|
1261
1285
|
const activePatternResult_9 = $007CRememberedTypeLiteral$007C_$007C(context, glueType);
|
|
1262
1286
|
if (activePatternResult_9 != null) {
|
|
1263
|
-
matchResult =
|
|
1287
|
+
matchResult = 19;
|
|
1264
1288
|
name_1 = activePatternResult_9;
|
|
1265
1289
|
}
|
|
1266
1290
|
else {
|
|
1267
|
-
matchResult =
|
|
1291
|
+
matchResult = 30;
|
|
1268
1292
|
members_1 = glueType.fields[0];
|
|
1269
1293
|
}
|
|
1270
1294
|
break;
|
|
@@ -1272,11 +1296,11 @@ function transformType(context_mut, glueType_mut) {
|
|
|
1272
1296
|
case 27: {
|
|
1273
1297
|
const activePatternResult_10 = $007CRememberedTypeLiteral$007C_$007C(context, glueType);
|
|
1274
1298
|
if (activePatternResult_10 != null) {
|
|
1275
|
-
matchResult =
|
|
1299
|
+
matchResult = 19;
|
|
1276
1300
|
name_1 = activePatternResult_10;
|
|
1277
1301
|
}
|
|
1278
1302
|
else {
|
|
1279
|
-
matchResult =
|
|
1303
|
+
matchResult = 31;
|
|
1280
1304
|
utilityType = glueType.fields[0];
|
|
1281
1305
|
}
|
|
1282
1306
|
break;
|
|
@@ -1284,11 +1308,11 @@ function transformType(context_mut, glueType_mut) {
|
|
|
1284
1308
|
case 5: {
|
|
1285
1309
|
const activePatternResult_11 = $007CRememberedTypeLiteral$007C_$007C(context, glueType);
|
|
1286
1310
|
if (activePatternResult_11 != null) {
|
|
1287
|
-
matchResult =
|
|
1311
|
+
matchResult = 19;
|
|
1288
1312
|
name_1 = activePatternResult_11;
|
|
1289
1313
|
}
|
|
1290
1314
|
else {
|
|
1291
|
-
matchResult =
|
|
1315
|
+
matchResult = 32;
|
|
1292
1316
|
typeAliasDeclaration = glueType.fields[0];
|
|
1293
1317
|
}
|
|
1294
1318
|
break;
|
|
@@ -1296,11 +1320,11 @@ function transformType(context_mut, glueType_mut) {
|
|
|
1296
1320
|
case 28: {
|
|
1297
1321
|
const activePatternResult_12 = $007CRememberedTypeLiteral$007C_$007C(context, glueType);
|
|
1298
1322
|
if (activePatternResult_12 != null) {
|
|
1299
|
-
matchResult =
|
|
1323
|
+
matchResult = 19;
|
|
1300
1324
|
name_1 = activePatternResult_12;
|
|
1301
1325
|
}
|
|
1302
1326
|
else {
|
|
1303
|
-
matchResult =
|
|
1327
|
+
matchResult = 33;
|
|
1304
1328
|
mappedType = glueType.fields[0];
|
|
1305
1329
|
}
|
|
1306
1330
|
break;
|
|
@@ -1308,66 +1332,66 @@ function transformType(context_mut, glueType_mut) {
|
|
|
1308
1332
|
case 10: {
|
|
1309
1333
|
const activePatternResult_13 = $007CRememberedTypeLiteral$007C_$007C(context, glueType);
|
|
1310
1334
|
if (activePatternResult_13 != null) {
|
|
1311
|
-
matchResult =
|
|
1335
|
+
matchResult = 19;
|
|
1312
1336
|
name_1 = activePatternResult_13;
|
|
1313
1337
|
}
|
|
1314
1338
|
else {
|
|
1315
|
-
matchResult =
|
|
1339
|
+
matchResult = 34;
|
|
1316
1340
|
}
|
|
1317
1341
|
break;
|
|
1318
1342
|
}
|
|
1319
1343
|
case 11: {
|
|
1320
1344
|
const activePatternResult_14 = $007CRememberedTypeLiteral$007C_$007C(context, glueType);
|
|
1321
1345
|
if (activePatternResult_14 != null) {
|
|
1322
|
-
matchResult =
|
|
1346
|
+
matchResult = 19;
|
|
1323
1347
|
name_1 = activePatternResult_14;
|
|
1324
1348
|
}
|
|
1325
1349
|
else {
|
|
1326
|
-
matchResult =
|
|
1350
|
+
matchResult = 35;
|
|
1327
1351
|
}
|
|
1328
1352
|
break;
|
|
1329
1353
|
}
|
|
1330
1354
|
case 33: {
|
|
1331
1355
|
const activePatternResult_15 = $007CRememberedTypeLiteral$007C_$007C(context, glueType);
|
|
1332
1356
|
if (activePatternResult_15 != null) {
|
|
1333
|
-
matchResult =
|
|
1357
|
+
matchResult = 19;
|
|
1334
1358
|
name_1 = activePatternResult_15;
|
|
1335
1359
|
}
|
|
1336
1360
|
else {
|
|
1337
|
-
matchResult =
|
|
1361
|
+
matchResult = 36;
|
|
1338
1362
|
}
|
|
1339
1363
|
break;
|
|
1340
1364
|
}
|
|
1341
1365
|
case 31: {
|
|
1342
1366
|
const activePatternResult_16 = $007CRememberedTypeLiteral$007C_$007C(context, glueType);
|
|
1343
1367
|
if (activePatternResult_16 != null) {
|
|
1344
|
-
matchResult =
|
|
1368
|
+
matchResult = 19;
|
|
1345
1369
|
name_1 = activePatternResult_16;
|
|
1346
1370
|
}
|
|
1347
1371
|
else {
|
|
1348
|
-
matchResult =
|
|
1372
|
+
matchResult = 37;
|
|
1349
1373
|
}
|
|
1350
1374
|
break;
|
|
1351
1375
|
}
|
|
1352
1376
|
case 32: {
|
|
1353
1377
|
const activePatternResult_17 = $007CRememberedTypeLiteral$007C_$007C(context, glueType);
|
|
1354
1378
|
if (activePatternResult_17 != null) {
|
|
1355
|
-
matchResult =
|
|
1379
|
+
matchResult = 19;
|
|
1356
1380
|
name_1 = activePatternResult_17;
|
|
1357
1381
|
}
|
|
1358
1382
|
else {
|
|
1359
|
-
matchResult =
|
|
1383
|
+
matchResult = 37;
|
|
1360
1384
|
}
|
|
1361
1385
|
break;
|
|
1362
1386
|
}
|
|
1363
1387
|
case 4: {
|
|
1364
1388
|
const activePatternResult_18 = $007CRememberedTypeLiteral$007C_$007C(context, glueType);
|
|
1365
1389
|
if (activePatternResult_18 != null) {
|
|
1366
|
-
matchResult =
|
|
1390
|
+
matchResult = 19;
|
|
1367
1391
|
name_1 = activePatternResult_18;
|
|
1368
1392
|
}
|
|
1369
1393
|
else {
|
|
1370
|
-
matchResult =
|
|
1394
|
+
matchResult = 37;
|
|
1371
1395
|
}
|
|
1372
1396
|
break;
|
|
1373
1397
|
}
|
|
@@ -1389,7 +1413,7 @@ function transformType(context_mut, glueType_mut) {
|
|
|
1389
1413
|
case 4:
|
|
1390
1414
|
return new FSharpType(/* Option */ 3, [transformType(context, glueType_21)]);
|
|
1391
1415
|
case 5:
|
|
1392
|
-
return new FSharpType(/* ThisType */ 15, [new FSharpThisType(sanitizeTypeName(thisTypeInfo.Name),
|
|
1416
|
+
return new FSharpType(/* ThisType */ 15, [new FSharpThisType(sanitizeTypeName(thisTypeInfo.Name), declaredTypeParameters_1(map((_arg) => _arg.Name, thisTypeInfo.TypeParameters)))]);
|
|
1393
1417
|
case 6:
|
|
1394
1418
|
return transformTupleType(context, glueTypes);
|
|
1395
1419
|
case 7:
|
|
@@ -1398,29 +1422,24 @@ function transformType(context_mut, glueType_mut) {
|
|
|
1398
1422
|
return transformUnionType(context, cases);
|
|
1399
1423
|
case 9:
|
|
1400
1424
|
return FSharpType.Object$;
|
|
1401
|
-
case 10:
|
|
1402
|
-
context_mut = context;
|
|
1403
|
-
glueType_mut = (new GlueType(/* TypeReference */ 13, [new GlueTypeReference(typeReference_4.Name, typeReference_4.FullName, typeReference_4.ModulePath, map((_arg_1) => (new GlueType(/* Primitive */ 3, [GluePrimitive.Any])), genericDelegateTypeParameters(TransformContext__get_State(context).Conditionals, typeReference_4.FullName)), typeReference_4.IsStandardLibrary)]));
|
|
1404
|
-
continue transformType;
|
|
1405
|
-
}
|
|
1406
|
-
case 11:
|
|
1425
|
+
case 10:
|
|
1407
1426
|
return FSharpType.Object$;
|
|
1408
|
-
case
|
|
1427
|
+
case 11: {
|
|
1409
1428
|
context_mut = context;
|
|
1410
1429
|
glueType_mut = argument;
|
|
1411
1430
|
continue transformType;
|
|
1412
1431
|
}
|
|
1432
|
+
case 12:
|
|
1433
|
+
return new FSharpType(/* TypeReference */ 11, [new FSharpTypeReference(mapTypeNameToFableCoreAwareName(context, typeReference_4), typeReference_4.FullName, typeReference_4.ModulePath, (typeReference_4.IsStandardLibrary && FSharpSet__Contains(typedArrayNames, typeReference_4.Name)) ? empty() : ((typeReference_4.IsStandardLibrary && FSharpSet__Contains(iteratorNames, typeReference_4.Name)) ? map((glueType_23) => transformType(context, glueType_23), truncate(1, typeReference_4.TypeArguments)) : map((glueType_24) => transformType(context, glueType_24), typeReference_4.TypeArguments)), FSharpType.Discard)]);
|
|
1413
1434
|
case 13:
|
|
1414
|
-
return new FSharpType(/* TypeReference */ 11, [new FSharpTypeReference(mapTypeNameToFableCoreAwareName(context, typeReference_6), typeReference_6.FullName, typeReference_6.ModulePath, (typeReference_6.IsStandardLibrary && FSharpSet__Contains(typedArrayNames, typeReference_6.Name)) ? empty() : ((typeReference_6.IsStandardLibrary && FSharpSet__Contains(iteratorNames, typeReference_6.Name)) ? map((glueType_23) => transformType(context, glueType_23), truncate(1, typeReference_6.TypeArguments)) : map((glueType_24) => transformType(context, glueType_24), typeReference_6.TypeArguments)), FSharpType.Discard)]);
|
|
1415
|
-
case 14:
|
|
1416
1435
|
return new FSharpType(/* ResizeArray */ 14, [transformType(TransformContext__PushScope_27AED5E3(context, "Item"), glueType_25)]);
|
|
1417
|
-
case
|
|
1436
|
+
case 14:
|
|
1418
1437
|
return new FSharpType(/* TypeReference */ 11, [new FSharpTypeReference(classDeclaration.Name, classDeclaration.Name, empty(), empty(), FSharpType.Discard)]);
|
|
1419
|
-
case
|
|
1438
|
+
case 15:
|
|
1420
1439
|
return new FSharpType(/* TypeParameter */ 13, [name]);
|
|
1421
|
-
case
|
|
1440
|
+
case 16:
|
|
1422
1441
|
return transformFunctionType(context, functionTypeInfo);
|
|
1423
|
-
case
|
|
1442
|
+
case 17: {
|
|
1424
1443
|
const matchValue = tryTransformCallableInterface(context, interfaceInfo);
|
|
1425
1444
|
if (matchValue == null) {
|
|
1426
1445
|
return new FSharpType(/* Interface */ 5, [transformInterface(context, interfaceInfo)]);
|
|
@@ -1429,23 +1448,23 @@ function transformType(context_mut, glueType_mut) {
|
|
|
1429
1448
|
return matchValue;
|
|
1430
1449
|
}
|
|
1431
1450
|
}
|
|
1432
|
-
case
|
|
1451
|
+
case 18:
|
|
1433
1452
|
return FSharpType.Object$;
|
|
1434
|
-
case
|
|
1453
|
+
case 19:
|
|
1435
1454
|
return new FSharpType(/* TypeReference */ 11, [new FSharpTypeReference(name_1, TransformContext__get_FullName(context), empty(), empty(), FSharpType.Discard)]);
|
|
1436
|
-
case
|
|
1455
|
+
case 20:
|
|
1437
1456
|
return transformTypeLiteral(context, typeLiteralInfo);
|
|
1438
|
-
case
|
|
1457
|
+
case 21: {
|
|
1439
1458
|
context_mut = context;
|
|
1440
1459
|
glueType_mut = glueType_26;
|
|
1441
1460
|
continue transformType;
|
|
1442
1461
|
}
|
|
1443
|
-
case
|
|
1462
|
+
case 22: {
|
|
1444
1463
|
context_mut = context;
|
|
1445
1464
|
glueType_mut = info.Type;
|
|
1446
1465
|
continue transformType;
|
|
1447
1466
|
}
|
|
1448
|
-
case
|
|
1467
|
+
case 23: {
|
|
1449
1468
|
const matchValue_1 = TypeAliasDeclaration_tryTransformKeyOf(TransformContext__get_CurrentScopeName(context), innerGlueType);
|
|
1450
1469
|
if (matchValue_1 == null) {
|
|
1451
1470
|
return FSharpType.Object$;
|
|
@@ -1455,14 +1474,14 @@ function transformType(context_mut, glueType_mut) {
|
|
|
1455
1474
|
return new FSharpType(/* TypeReference */ 11, [new FSharpTypeReference(TransformContext__get_FullName(context), TransformContext__get_FullName(context), empty(), empty(), FSharpType.Discard)]);
|
|
1456
1475
|
}
|
|
1457
1476
|
}
|
|
1458
|
-
case
|
|
1477
|
+
case 24: {
|
|
1459
1478
|
context_mut = context;
|
|
1460
1479
|
glueType_mut = namedTupleType.Type;
|
|
1461
1480
|
continue transformType;
|
|
1462
1481
|
}
|
|
1463
|
-
case
|
|
1482
|
+
case 25:
|
|
1464
1483
|
return FSharpType.Object$;
|
|
1465
|
-
case
|
|
1484
|
+
case 26:
|
|
1466
1485
|
switch (glueLiteral.tag) {
|
|
1467
1486
|
case 1:
|
|
1468
1487
|
return new FSharpType(/* Primitive */ 8, [FSharpPrimitive.Int]);
|
|
@@ -1475,26 +1494,26 @@ function transformType(context_mut, glueType_mut) {
|
|
|
1475
1494
|
default:
|
|
1476
1495
|
return new FSharpType(/* Primitive */ 8, [FSharpPrimitive.String$]);
|
|
1477
1496
|
}
|
|
1478
|
-
case
|
|
1497
|
+
case 27:
|
|
1479
1498
|
return FSharpType.Object$;
|
|
1480
|
-
case
|
|
1499
|
+
case 28:
|
|
1481
1500
|
return new FSharpType(/* Function */ 16, [new FSharpFunctionType(requiredBeforeParamArray(map((parameter) => transformParameter(context, parameter), functionDeclaration_2.Parameters)), transformType(context, functionDeclaration_2.Type))]);
|
|
1482
|
-
case
|
|
1501
|
+
case 29:
|
|
1483
1502
|
return transformIntersectionOfReferences(context, references, members);
|
|
1484
|
-
case
|
|
1503
|
+
case 30:
|
|
1485
1504
|
return transformIntersectionType(context, members_1);
|
|
1486
|
-
case
|
|
1505
|
+
case 31:
|
|
1487
1506
|
return UtilityType_transform(context, utilityType);
|
|
1488
|
-
case
|
|
1507
|
+
case 32:
|
|
1489
1508
|
return new FSharpType(/* Mapped */ 7, [new FSharpMapped(typeAliasDeclaration.Name, empty())]);
|
|
1490
|
-
case
|
|
1509
|
+
case 33:
|
|
1491
1510
|
return transformMappedType(context, mappedType);
|
|
1511
|
+
case 34:
|
|
1512
|
+
return FSharpType.Object$;
|
|
1492
1513
|
case 35:
|
|
1493
1514
|
return FSharpType.Object$;
|
|
1494
1515
|
case 36:
|
|
1495
1516
|
return FSharpType.Object$;
|
|
1496
|
-
case 37:
|
|
1497
|
-
return FSharpType.Object$;
|
|
1498
1517
|
default: {
|
|
1499
1518
|
TransformContext__AddError_Z721C83C5(context, `Could not transform type: ${interpolate("%A%P()", [glueType])}`);
|
|
1500
1519
|
return FSharpType.Discard;
|
|
@@ -3230,7 +3249,7 @@ function transformParamObjectClass(context, name, documentation, members) {
|
|
|
3230
3249
|
else {
|
|
3231
3250
|
patternInput_1 = [paramObjectConstructor(typeLiteralParameters), empty()];
|
|
3232
3251
|
}
|
|
3233
|
-
return new FSharpClass(toList(delay(() => append_1(xmlDocInfo.ObsoleteAttributes, delay(() => append_1(singleton_1(new FSharpAttribute(/* Global */ 21, [undefined])), delay(() => singleton_1(FSharpAttribute.AllowNullLiteral))))))), xmlDocInfo.XmlDoc, name,
|
|
3252
|
+
return new FSharpClass(toList(delay(() => append_1(xmlDocInfo.ObsoleteAttributes, delay(() => append_1(singleton_1(new FSharpAttribute(/* Global */ 21, [undefined])), delay(() => singleton_1(FSharpAttribute.AllowNullLiteral))))))), xmlDocInfo.XmlDoc, name, declaredTypeParameters_1(typeParameterNames), patternInput_1[0], patternInput_1[1], explicitFields);
|
|
3234
3253
|
}
|
|
3235
3254
|
|
|
3236
3255
|
function transformCallbackReturnType(context, returnType) {
|
|
@@ -3329,7 +3348,12 @@ function tryTransformCallableInterface(context, info) {
|
|
|
3329
3348
|
iterate((typ) => {
|
|
3330
3349
|
TransformContext__ExposeType_Z1D58A540(context_1, typ);
|
|
3331
3350
|
}, exposeSpecializedAlias(name, empty(), empty(), reverse(typeParameters.TypeParameters)));
|
|
3332
|
-
|
|
3351
|
+
if (isLambdaSignature(callSignature_1.Parameters, transformTypeParameters(context_1, callSignature_1.TypeParameters).TypeParameters, typeParameters.TypeParameters)) {
|
|
3352
|
+
return new FSharpType(/* TypeAlias */ 9, [new FSharpTypeAlias(toList(delay(() => xmlDocInfo.ObsoleteAttributes)), name, xmlDocInfo.XmlDoc, new FSharpType(/* Function */ 16, [new FSharpFunctionType(map((parameter) => transformParameter(context_1, parameter), callSignature_1.Parameters), transformCallbackReturnType(TransformContext__PushScope_27AED5E3(context_1, "ReturnType"), callSignature_1.Type))]), typeParameters.TypeParameters)]);
|
|
3353
|
+
}
|
|
3354
|
+
else {
|
|
3355
|
+
return new FSharpType(/* Delegate */ 20, [new FSharpDelegate(xmlDocInfo.XmlDoc, name, typeParameters.TypeParameters, requiredBeforeParamArray(map((parameter_1) => transformParameter(context_1, parameter_1), callSignature_1.Parameters)), transformCallbackReturnType(TransformContext__PushScope_27AED5E3(context_1, "ReturnType"), callSignature_1.Type))]);
|
|
3356
|
+
}
|
|
3333
3357
|
}
|
|
3334
3358
|
case 1: {
|
|
3335
3359
|
const patternInput_1 = sanitizeTypeNameAndPushScope(info.Name, context);
|
|
@@ -3565,8 +3589,8 @@ function transformInterface(context, info) {
|
|
|
3565
3589
|
return !contains_2(_arg_2.fields[0].Name, ownNames);
|
|
3566
3590
|
}
|
|
3567
3591
|
}, append(membersComingFromPartial, append(membersComingFromOmit, membersComingFromCallable))))), toList(delay(() => {
|
|
3568
|
-
let context_2;
|
|
3569
|
-
return append_1(List_distinct(filter(isInheritableType, map((context_2 = TransformContext__PushScope_27AED5E3(context_1, "Extends"), (glueType_1) => transformType(context_2, glueType_1)),
|
|
3592
|
+
let list_19, context_2;
|
|
3593
|
+
return append_1(List_distinct(filter(isInheritableType, (list_19 = withoutBasesOfBases(TransformContext__get_TypeMemory(context_1), inheritance), map((context_2 = TransformContext__PushScope_27AED5E3(context_1, "Extends"), (glueType_1) => transformType(context_2, glueType_1)), list_19))), {
|
|
3570
3594
|
Equals: equals,
|
|
3571
3595
|
GetHashCode: (x_2) => (safeHash(x_2) | 0),
|
|
3572
3596
|
}), delay(() => {
|
|
@@ -5004,11 +5028,16 @@ function aliasOfUtilityType(scope, utilityType) {
|
|
|
5004
5028
|
|
|
5005
5029
|
function aliasOfFunctionType(scope, functionType) {
|
|
5006
5030
|
const context = scope.Context;
|
|
5007
|
-
const
|
|
5008
|
-
|
|
5009
|
-
|
|
5010
|
-
const
|
|
5011
|
-
|
|
5031
|
+
const ownDefaults = ownTypeParameterDefaults(functionType);
|
|
5032
|
+
const parameters = map((parameter) => GlueSubstitution_substituteParameter(ownDefaults, parameter), functionType.Parameters);
|
|
5033
|
+
const returnType = GlueSubstitution_substitute(ownDefaults, functionType.Type);
|
|
5034
|
+
const declaredTypeParameters = scope.TypeParameters.Value.TypeParameters;
|
|
5035
|
+
if (isLambdaSignature(parameters, empty(), declaredTypeParameters)) {
|
|
5036
|
+
return aliasOf(scope, new FSharpType(/* Function */ 16, [new FSharpFunctionType(map((parameter_1) => transformParameter(context, parameter_1), parameters), transformCallbackReturnType(TransformContext__PushScope_27AED5E3(context, "ReturnType"), returnType))]));
|
|
5037
|
+
}
|
|
5038
|
+
else {
|
|
5039
|
+
return new FSharpType(/* Delegate */ 20, [new FSharpDelegate(scope.XmlDoc.XmlDoc, scope.Name, declaredTypeParameters, requiredBeforeParamArray(map((parameter_2) => transformParameter(context, parameter_2), parameters)), transformCallbackReturnType(TransformContext__PushScope_27AED5E3(context, "ReturnType"), returnType))]);
|
|
5040
|
+
}
|
|
5012
5041
|
}
|
|
5013
5042
|
|
|
5014
5043
|
function aliasOfTypeLiteral(scope, typeLiteralInfo) {
|
|
@@ -5663,7 +5692,7 @@ function transformToFsharp(context, glueTypes) {
|
|
|
5663
5692
|
return transformModuleDeclaration(TransformContext__get_TypeMemory(context), TransformContext__get_State(context), TransformContext__get__Reporter(context), TransformContext__get_TypeLiteralsMemory(context), TransformContext__get_ImportSource(context), moduleInfo);
|
|
5664
5693
|
case 5: {
|
|
5665
5694
|
const name_1 = sanitizeTypeName(fileModule.Name);
|
|
5666
|
-
|
|
5695
|
+
TypeLiteralsMemory__EnterFileModule_Z721C83C5(TransformContext__get_TypeLiteralsMemory(context), name_1);
|
|
5667
5696
|
const types = transform(TransformContext__get_TypeMemory(context), TransformContext__get_State(context), TransformContext__get__Reporter(context), TransformContext__get_TypeLiteralsMemory(context), fileModule.IsGlobal ? ImportSource.Global : (!fileModule.HasRuntime ? ImportSource.NoRuntime : (new ImportSource(/* Module */ 0, [fileModule.ImportSpecifier, fileModule.SymbolSpecifiers]))), true, fileModule.Types);
|
|
5668
5697
|
TypeLiteralsMemory__LeaveModule(TransformContext__get_TypeLiteralsMemory(context));
|
|
5669
5698
|
return singleton(new FSharpType(/* Module */ 4, [new FSharpModule(name_1, false, fileModule.ImportSpecifier, append(types, aggregatedExports(types)))]));
|
|
@@ -5906,7 +5935,7 @@ function transform(typeMemory, state, reporter, typeLiteralsMemory, importSource
|
|
|
5906
5935
|
return true;
|
|
5907
5936
|
case 11: {
|
|
5908
5937
|
const info_11 = glueType_7.fields[0];
|
|
5909
|
-
if (!info_11.IsGlobal) {
|
|
5938
|
+
if (!info_11.IsGlobal && info_11.IsExported) {
|
|
5910
5939
|
return applyModuleDeclaration(info_11);
|
|
5911
5940
|
}
|
|
5912
5941
|
else {
|