@glutinum/cli 1.0.0-beta.4 → 1.0.0-beta.6
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.
|
@@ -849,22 +849,43 @@ function printEnum(printer, enumInfo) {
|
|
|
849
849
|
}
|
|
850
850
|
|
|
851
851
|
function printTypeAlias(printer, aliasInfo) {
|
|
852
|
-
|
|
852
|
+
let aliasedType;
|
|
853
|
+
const text = printType(aliasInfo.Type);
|
|
854
|
+
let matchResult;
|
|
855
|
+
if (aliasInfo.Type.tag === 16) {
|
|
856
|
+
if (text.startsWith("(") && text.endsWith(")")) {
|
|
857
|
+
matchResult = 0;
|
|
858
|
+
}
|
|
859
|
+
else {
|
|
860
|
+
matchResult = 1;
|
|
861
|
+
}
|
|
862
|
+
}
|
|
863
|
+
else {
|
|
864
|
+
matchResult = 1;
|
|
865
|
+
}
|
|
866
|
+
switch (matchResult) {
|
|
867
|
+
case 0: {
|
|
868
|
+
aliasedType = substring(text, 1, text.length - 2);
|
|
869
|
+
break;
|
|
870
|
+
}
|
|
871
|
+
default:
|
|
872
|
+
aliasedType = text;
|
|
873
|
+
}
|
|
853
874
|
const usageText = join(" ", append(singleton(aliasedType), choose((_arg) => {
|
|
854
|
-
let
|
|
875
|
+
let matchResult_1, constraint_;
|
|
855
876
|
if (_arg.tag === 1) {
|
|
856
877
|
if (_arg.fields[0].Constraint != null) {
|
|
857
|
-
|
|
878
|
+
matchResult_1 = 0;
|
|
858
879
|
constraint_ = _arg.fields[0].Constraint;
|
|
859
880
|
}
|
|
860
881
|
else {
|
|
861
|
-
|
|
882
|
+
matchResult_1 = 1;
|
|
862
883
|
}
|
|
863
884
|
}
|
|
864
885
|
else {
|
|
865
|
-
|
|
886
|
+
matchResult_1 = 1;
|
|
866
887
|
}
|
|
867
|
-
switch (
|
|
888
|
+
switch (matchResult_1) {
|
|
868
889
|
case 0:
|
|
869
890
|
return printType(constraint_);
|
|
870
891
|
default:
|
|
@@ -8,8 +8,8 @@ import { transformComment, TransformCommentResult_$reflection } from "./Transfor
|
|
|
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";
|
|
@@ -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;
|
|
@@ -1389,7 +1418,7 @@ function transformType(context_mut, glueType_mut) {
|
|
|
1389
1418
|
case 4:
|
|
1390
1419
|
return new FSharpType(/* Option */ 3, [transformType(context, glueType_21)]);
|
|
1391
1420
|
case 5:
|
|
1392
|
-
return new FSharpType(/* ThisType */ 15, [new FSharpThisType(sanitizeTypeName(thisTypeInfo.Name),
|
|
1421
|
+
return new FSharpType(/* ThisType */ 15, [new FSharpThisType(sanitizeTypeName(thisTypeInfo.Name), declaredTypeParameters_1(map((_arg) => _arg.Name, thisTypeInfo.TypeParameters)))]);
|
|
1393
1422
|
case 6:
|
|
1394
1423
|
return transformTupleType(context, glueTypes);
|
|
1395
1424
|
case 7:
|
|
@@ -3230,7 +3259,7 @@ function transformParamObjectClass(context, name, documentation, members) {
|
|
|
3230
3259
|
else {
|
|
3231
3260
|
patternInput_1 = [paramObjectConstructor(typeLiteralParameters), empty()];
|
|
3232
3261
|
}
|
|
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,
|
|
3262
|
+
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
3263
|
}
|
|
3235
3264
|
|
|
3236
3265
|
function transformCallbackReturnType(context, returnType) {
|
|
@@ -3329,7 +3358,12 @@ function tryTransformCallableInterface(context, info) {
|
|
|
3329
3358
|
iterate((typ) => {
|
|
3330
3359
|
TransformContext__ExposeType_Z1D58A540(context_1, typ);
|
|
3331
3360
|
}, exposeSpecializedAlias(name, empty(), empty(), reverse(typeParameters.TypeParameters)));
|
|
3332
|
-
|
|
3361
|
+
if (isLambdaSignature(callSignature_1.Parameters, transformTypeParameters(context_1, callSignature_1.TypeParameters).TypeParameters, typeParameters.TypeParameters)) {
|
|
3362
|
+
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)]);
|
|
3363
|
+
}
|
|
3364
|
+
else {
|
|
3365
|
+
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))]);
|
|
3366
|
+
}
|
|
3333
3367
|
}
|
|
3334
3368
|
case 1: {
|
|
3335
3369
|
const patternInput_1 = sanitizeTypeNameAndPushScope(info.Name, context);
|
|
@@ -5008,7 +5042,13 @@ function aliasOfFunctionType(scope, functionType) {
|
|
|
5008
5042
|
Compare: (x, y) => (comparePrimitives(x, y) | 0),
|
|
5009
5043
|
});
|
|
5010
5044
|
const ownTypeParameters = transformTypeParameters(context, filter((typeParameter) => !FSharpSet__Contains(declaredNames, typeParameter.Name), functionType.TypeParameters));
|
|
5011
|
-
|
|
5045
|
+
const declaredTypeParameters = scope.TypeParameters.Value.TypeParameters;
|
|
5046
|
+
if (isLambdaSignature(functionType.Parameters, ownTypeParameters.TypeParameters, declaredTypeParameters)) {
|
|
5047
|
+
return aliasOf(scope, new FSharpType(/* Function */ 16, [new FSharpFunctionType(map((parameter) => transformParameter(context, parameter), functionType.Parameters), transformCallbackReturnType(TransformContext__PushScope_27AED5E3(context, "ReturnType"), functionType.Type))]));
|
|
5048
|
+
}
|
|
5049
|
+
else {
|
|
5050
|
+
return new FSharpType(/* Delegate */ 20, [new FSharpDelegate(scope.XmlDoc.XmlDoc, scope.Name, append(declaredTypeParameters, ownTypeParameters.TypeParameters), requiredBeforeParamArray(map((arg) => TypeParameter_mapFsharpParameter(ownTypeParameters.SealedTypes, transformParameter(context, arg)), functionType.Parameters)), TypeParameter_mapFSharpType(ownTypeParameters.SealedTypes, transformCallbackReturnType(TransformContext__PushScope_27AED5E3(context, "ReturnType"), functionType.Type)))]);
|
|
5051
|
+
}
|
|
5012
5052
|
}
|
|
5013
5053
|
|
|
5014
5054
|
function aliasOfTypeLiteral(scope, typeLiteralInfo) {
|
|
@@ -5926,28 +5966,189 @@ function transform(typeMemory, state, reporter, typeLiteralsMemory, importSource
|
|
|
5926
5966
|
}, rest);
|
|
5927
5967
|
const exports_1 = (importSource.tag === 1) ? append(patternInput[0], append(classes, reExportedClasses)) : ((importSource.tag === 0) ? append(patternInput[0], append(classes, reExportedClasses)) : empty());
|
|
5928
5968
|
const rootTransformContext = TransformContext_$ctor_Z1635F75A(reporter, "", typeMemory, state, typeLiteralsMemory, importSource);
|
|
5929
|
-
|
|
5969
|
+
let typeTestAttributes;
|
|
5970
|
+
const classDeclarations = choose((_arg_3) => {
|
|
5971
|
+
let matchResult_6, info_12;
|
|
5972
|
+
switch (_arg_3.tag) {
|
|
5973
|
+
case 12: {
|
|
5974
|
+
matchResult_6 = 0;
|
|
5975
|
+
info_12 = _arg_3.fields[0];
|
|
5976
|
+
break;
|
|
5977
|
+
}
|
|
5978
|
+
case 25: {
|
|
5979
|
+
if (_arg_3.fields[0].tag === 12) {
|
|
5980
|
+
matchResult_6 = 0;
|
|
5981
|
+
info_12 = _arg_3.fields[0].fields[0];
|
|
5982
|
+
}
|
|
5983
|
+
else {
|
|
5984
|
+
matchResult_6 = 1;
|
|
5985
|
+
}
|
|
5986
|
+
break;
|
|
5987
|
+
}
|
|
5988
|
+
default:
|
|
5989
|
+
matchResult_6 = 1;
|
|
5990
|
+
}
|
|
5991
|
+
switch (matchResult_6) {
|
|
5992
|
+
case 0:
|
|
5993
|
+
return info_12;
|
|
5994
|
+
default:
|
|
5995
|
+
return undefined;
|
|
5996
|
+
}
|
|
5997
|
+
}, glueAst_2);
|
|
5998
|
+
const defaultExported = ofSeq(choose((_arg_4) => {
|
|
5999
|
+
let matchResult_7, info_14, name_8;
|
|
6000
|
+
if (_arg_4.tag === 25) {
|
|
6001
|
+
switch (_arg_4.fields[0].tag) {
|
|
6002
|
+
case 12: {
|
|
6003
|
+
matchResult_7 = 0;
|
|
6004
|
+
info_14 = _arg_4.fields[0].fields[0];
|
|
6005
|
+
break;
|
|
6006
|
+
}
|
|
6007
|
+
case 2: {
|
|
6008
|
+
if (exists((info_13) => (info_13.Name === _arg_4.fields[0].fields[0].Name), classDeclarations)) {
|
|
6009
|
+
matchResult_7 = 1;
|
|
6010
|
+
name_8 = _arg_4.fields[0].fields[0].Name;
|
|
6011
|
+
}
|
|
6012
|
+
else {
|
|
6013
|
+
matchResult_7 = 2;
|
|
6014
|
+
}
|
|
6015
|
+
break;
|
|
6016
|
+
}
|
|
6017
|
+
default:
|
|
6018
|
+
matchResult_7 = 2;
|
|
6019
|
+
}
|
|
6020
|
+
}
|
|
6021
|
+
else {
|
|
6022
|
+
matchResult_7 = 2;
|
|
6023
|
+
}
|
|
6024
|
+
switch (matchResult_7) {
|
|
6025
|
+
case 0:
|
|
6026
|
+
return info_14.Name;
|
|
6027
|
+
case 1:
|
|
6028
|
+
return name_8;
|
|
6029
|
+
default:
|
|
6030
|
+
return undefined;
|
|
6031
|
+
}
|
|
6032
|
+
}, glueAst_2), {
|
|
6033
|
+
Compare: (x_2, y_2) => (comparePrimitives(x_2, y_2) | 0),
|
|
6034
|
+
});
|
|
6035
|
+
const classes_1 = ofSeq(map((_arg_5) => _arg_5.Name, filter((info_15) => {
|
|
6036
|
+
if (info_15.IsExported) {
|
|
6037
|
+
return true;
|
|
6038
|
+
}
|
|
6039
|
+
else {
|
|
6040
|
+
return equals(importSource, ImportSource.Global);
|
|
6041
|
+
}
|
|
6042
|
+
}, classDeclarations)), {
|
|
6043
|
+
Compare: (x_3, y_3) => (comparePrimitives(x_3, y_3) | 0),
|
|
6044
|
+
});
|
|
6045
|
+
const constructorVariables = ofSeq(choose((_arg_6) => {
|
|
6046
|
+
let matchResult_8, name_10, members_1, name_11;
|
|
6047
|
+
if (_arg_6.tag === 2) {
|
|
6048
|
+
switch (_arg_6.fields[0].Type.tag) {
|
|
6049
|
+
case 29: {
|
|
6050
|
+
matchResult_8 = 0;
|
|
6051
|
+
name_10 = _arg_6.fields[0].Name;
|
|
6052
|
+
break;
|
|
6053
|
+
}
|
|
6054
|
+
case 22: {
|
|
6055
|
+
if (exists((_arg_7) => {
|
|
6056
|
+
if (_arg_7.tag === 7) {
|
|
6057
|
+
return true;
|
|
6058
|
+
}
|
|
6059
|
+
else {
|
|
6060
|
+
return false;
|
|
6061
|
+
}
|
|
6062
|
+
}, _arg_6.fields[0].Type.fields[0].Members)) {
|
|
6063
|
+
matchResult_8 = 1;
|
|
6064
|
+
members_1 = _arg_6.fields[0].Type.fields[0].Members;
|
|
6065
|
+
name_11 = _arg_6.fields[0].Name;
|
|
6066
|
+
}
|
|
6067
|
+
else {
|
|
6068
|
+
matchResult_8 = 2;
|
|
6069
|
+
}
|
|
6070
|
+
break;
|
|
6071
|
+
}
|
|
6072
|
+
default:
|
|
6073
|
+
matchResult_8 = 2;
|
|
6074
|
+
}
|
|
6075
|
+
}
|
|
6076
|
+
else {
|
|
6077
|
+
matchResult_8 = 2;
|
|
6078
|
+
}
|
|
6079
|
+
switch (matchResult_8) {
|
|
6080
|
+
case 0:
|
|
6081
|
+
return name_10;
|
|
6082
|
+
case 1:
|
|
6083
|
+
return name_11;
|
|
6084
|
+
default:
|
|
6085
|
+
return undefined;
|
|
6086
|
+
}
|
|
6087
|
+
}, glueAst_2), {
|
|
6088
|
+
Compare: (x_4, y_4) => (comparePrimitives(x_4, y_4) | 0),
|
|
6089
|
+
});
|
|
6090
|
+
typeTestAttributes = ((name_12) => (!isTopLevel ? empty() : (FSharpSet__Contains(defaultExported, name_12) ? importDefaultAttribute(name_12, importSource) : ((FSharpSet__Contains(classes_1, name_12) ? true : FSharpSet__Contains(constructorVariables, name_12)) ? importAttribute(name_12, importSource) : empty()))));
|
|
6091
|
+
const rest_1 = map((_arg_9) => {
|
|
6092
|
+
let matchResult_9, info_17, fsharpType;
|
|
6093
|
+
if (_arg_9.tag === 5) {
|
|
6094
|
+
if (!exists((_arg_8) => {
|
|
6095
|
+
switch (_arg_8.tag) {
|
|
6096
|
+
case 3:
|
|
6097
|
+
case 5:
|
|
6098
|
+
case 4:
|
|
6099
|
+
case 21:
|
|
6100
|
+
return true;
|
|
6101
|
+
default:
|
|
6102
|
+
return false;
|
|
6103
|
+
}
|
|
6104
|
+
}, _arg_9.fields[0].Attributes)) {
|
|
6105
|
+
matchResult_9 = 0;
|
|
6106
|
+
info_17 = _arg_9.fields[0];
|
|
6107
|
+
}
|
|
6108
|
+
else {
|
|
6109
|
+
matchResult_9 = 1;
|
|
6110
|
+
fsharpType = _arg_9;
|
|
6111
|
+
}
|
|
6112
|
+
}
|
|
6113
|
+
else {
|
|
6114
|
+
matchResult_9 = 1;
|
|
6115
|
+
fsharpType = _arg_9;
|
|
6116
|
+
}
|
|
6117
|
+
switch (matchResult_9) {
|
|
6118
|
+
case 0: {
|
|
6119
|
+
const matchValue_1 = typeTestAttributes(info_17.OriginalName);
|
|
6120
|
+
if (isEmpty(matchValue_1)) {
|
|
6121
|
+
return new FSharpType(/* Interface */ 5, [info_17]);
|
|
6122
|
+
}
|
|
6123
|
+
else {
|
|
6124
|
+
return new FSharpType(/* Interface */ 5, [new FSharpInterface(append(info_17.Attributes, matchValue_1), info_17.Name, info_17.XmlDoc, info_17.OriginalName, info_17.TypeParameters, info_17.Members, info_17.Inheritance)]);
|
|
6125
|
+
}
|
|
6126
|
+
}
|
|
6127
|
+
default:
|
|
6128
|
+
return fsharpType;
|
|
6129
|
+
}
|
|
6130
|
+
}, transformToFsharp(rootTransformContext, rest));
|
|
5930
6131
|
let exportsType_1;
|
|
5931
6132
|
if (isEmpty(exports_1)) {
|
|
5932
6133
|
exportsType_1 = undefined;
|
|
5933
6134
|
}
|
|
5934
6135
|
else {
|
|
5935
|
-
const
|
|
5936
|
-
let
|
|
5937
|
-
if (
|
|
5938
|
-
if (isEmpty(
|
|
5939
|
-
|
|
6136
|
+
const matchValue_2 = transformExports(rootTransformContext, isTopLevel, exports_1);
|
|
6137
|
+
let matchResult_10, exportsType;
|
|
6138
|
+
if (matchValue_2.tag === 5) {
|
|
6139
|
+
if (isEmpty(matchValue_2.fields[0].Members)) {
|
|
6140
|
+
matchResult_10 = 0;
|
|
5940
6141
|
}
|
|
5941
6142
|
else {
|
|
5942
|
-
|
|
5943
|
-
exportsType =
|
|
6143
|
+
matchResult_10 = 1;
|
|
6144
|
+
exportsType = matchValue_2;
|
|
5944
6145
|
}
|
|
5945
6146
|
}
|
|
5946
6147
|
else {
|
|
5947
|
-
|
|
5948
|
-
exportsType =
|
|
6148
|
+
matchResult_10 = 1;
|
|
6149
|
+
exportsType = matchValue_2;
|
|
5949
6150
|
}
|
|
5950
|
-
switch (
|
|
6151
|
+
switch (matchResult_10) {
|
|
5951
6152
|
case 0: {
|
|
5952
6153
|
exportsType_1 = undefined;
|
|
5953
6154
|
break;
|