diff --git a/src/NodeParser/InterfaceAndClassNodeParser.ts b/src/NodeParser/InterfaceAndClassNodeParser.ts index ca8a715b9..cb8907abd 100644 --- a/src/NodeParser/InterfaceAndClassNodeParser.ts +++ b/src/NodeParser/InterfaceAndClassNodeParser.ts @@ -113,7 +113,7 @@ export class InterfaceAndClassNodeParser implements SubNodeParser { if (ts.isConstructorDeclaration(member)) { const params = member.parameters.filter((param) => ts.isParameterPropertyDeclaration(param, param.parent), - ) as ts.ParameterPropertyDeclaration[]; + ); members.push(...params); } else if (ts.isPropertySignature(member) || ts.isPropertyDeclaration(member)) { members.push(member); diff --git a/test/valid-data-other.test.ts b/test/valid-data-other.test.ts index 2b6ddd181..68a8fa209 100644 --- a/test/valid-data-other.test.ts +++ b/test/valid-data-other.test.ts @@ -46,10 +46,13 @@ describe("valid-data-other", () => { it("generic-simple", assertValidSchema("generic-simple", "*", { expose: "all" })); it("generic-arrays", assertValidSchema("generic-arrays", "MyObject")); it("generic-multiple", assertValidSchema("generic-multiple", "MyObject")); + it("generic-multiple", assertValidSchema("generic-multiple", "*", { expose: "all" })); it("generic-multiargs", assertValidSchema("generic-multiargs", "MyObject")); it("generic-anonymous", assertValidSchema("generic-anonymous", "MyObject")); + it("generic-anonymous", assertValidSchema("generic-anonymous", "*", { expose: "all" })); it("generic-recursive", assertValidSchema("generic-recursive", "MyObject")); it("generic-hell", assertValidSchema("generic-hell", "MyObject")); + it("generic-hell", assertValidSchema("generic-hell", "*", { expose: "all" })); it("generic-default-conditional", assertValidSchema("generic-default-conditional", "MyObject")); it("generic-default", assertValidSchema("generic-default", "MyObject")); it("generic-nested", assertValidSchema("generic-nested", "MyObject"));