@@ -3454,7 +3454,7 @@ module Util =
34543454 else
34553455 returnType
34563456
3457- ClassMember.classMethod ( kind, args, body, isStatic = isStatic, ?returnType = returnType) //, ?typeParameters=typeParamDecl)
3457+ ClassMember.classMethod ( kind, args, body, isStatic = isStatic, ?returnType = returnType, ?doc = memb.XmlDoc ) //, ?typeParameters=typeParamDecl)
34583458 |> Array.singleton
34593459
34603460 let transformAttachedMethod
@@ -3475,7 +3475,8 @@ module Util =
34753475 body,
34763476 isStatic = isStatic,
34773477 ?returnType = returnType,
3478- ?typeParameters = typeParamDecl
3478+ ?typeParameters = typeParamDecl,
3479+ ?doc = memb.XmlDoc
34793480 )
34803481
34813482 let args , body , returnType , typeParamDecl =
@@ -3742,7 +3743,7 @@ module Util =
37423743 ( com : IBabelCompiler )
37433744 ctx
37443745 ( ent : Fable.Entity )
3745- ( entName : string )
3746+ ( decl : Fable.ClassDecl )
37463747 classMembers
37473748 =
37483749 let fieldIds = getEntityFieldsAsIdents ent |> List.toArray
@@ -3780,13 +3781,13 @@ module Util =
37803781 Parameter.parameter ( fi.Name, ?typeAnnotation = makeFieldAnnotationIfTypeScript com ctx fi.Type)
37813782 )
37823783
3783- declareType com ctx ent entName args body baseExpr classMembers
3784+ declareType com ctx ent decl.Name args body baseExpr classMembers
37843785
37853786 let transformParamObjectClassPatternToInterface
37863787 ( com : IBabelCompiler )
37873788 ctx
3788- ( classDecl : Fable.ClassDecl )
37893789 ( ent : Fable.Entity )
3790+ ( decl : Fable.ClassDecl )
37903791 =
37913792
37923793 let constructors =
@@ -3803,7 +3804,7 @@ module Util =
38033804 |> List.mapi ( fun index arg ->
38043805 let name = defaultArg arg.Name $" arg{index}"
38053806
3806- /// Try to find getter/setter in f # syntax for POJOs. If found propagate its xml doc to interface.
3807+ /// Try to find getter/setter in F # syntax for POJOs. If found propagate its xml doc to interface.
38073808 let tryXmlDoc =
38083809 ent.MembersFunctionsAndValues
38093810 |> Seq.tryFind ( fun s -> s.DisplayName = name)
@@ -3846,11 +3847,11 @@ module Util =
38463847 []
38473848 | members :: [] ->
38483849 Declaration.interfaceDeclaration (
3849- Identifier.identifier classDecl .Name,
3850+ Identifier.identifier decl .Name,
38503851 members,
38513852 [||],
38523853 typeParameters,
3853- ?doc = classDecl .XmlDoc
3854+ ?doc = decl .XmlDoc
38543855 )
38553856 |> asModuleDeclaration ent.IsPublic
38563857 |> List.singleton
@@ -3860,7 +3861,7 @@ module Util =
38603861 |> Array.ofList
38613862 |> UnionTypeAnnotation
38623863
3863- TypeAliasDeclaration( classDecl .Name, typeParameters, typ)
3864+ TypeAliasDeclaration( decl .Name, typeParameters, typ)
38643865 |> asModuleDeclaration ent.IsPublic
38653866 |> List.singleton
38663867
@@ -4075,7 +4076,13 @@ module Util =
40754076 let typeParameters =
40764077 FSharp2Fable.Util.getEntityGenArgs ent |> makeTypeParamDecl com ctx
40774078
4078- Declaration.interfaceDeclaration ( Identifier.identifier decl.Name, members, extends, typeParameters)
4079+ Declaration.interfaceDeclaration (
4080+ Identifier.identifier decl.Name,
4081+ members,
4082+ extends,
4083+ typeParameters,
4084+ ?doc = decl.XmlDoc
4085+ )
40794086 |> asModuleDeclaration ent.IsPublic
40804087
40814088 let transformStringEnumDeclaration ( decl : Fable.ClassDecl ) ( ent : Fable.Entity ) ( attArgs : obj list ) =
@@ -4211,7 +4218,7 @@ module Util =
42114218 Compiler.Language = TypeScript
42124219 && FSharp2Fable.Helpers.isParamObjectClassPattern ent
42134220 then
4214- transformParamObjectClassPatternToInterface com ctx decl ent
4221+ transformParamObjectClassPatternToInterface com ctx ent decl
42154222 else
42164223
42174224 let classMembers =
@@ -4240,7 +4247,7 @@ module Util =
42404247 if ent.IsFSharpUnion then
42414248 transformUnion com ctx ent decl.Name classMembers
42424249 else
4243- transformClassWithCompilerGeneratedConstructor com ctx ent decl.Name classMembers
4250+ transformClassWithCompilerGeneratedConstructor com ctx ent decl classMembers
42444251
42454252 let transformImports ( imports : Import seq ) : ModuleDeclaration list =
42464253 let statefulImports = ResizeArray()
0 commit comments