[K/JS] Add @ts-ignore for the case when there is a class with a private primary constructor (or excluded from export) which has an exported subclass ^Fixed KT-52563

This commit is contained in:
Artem Kobzar
2023-01-04 15:21:40 +00:00
committed by Space Team
parent 2a724787f0
commit 97be632c9a
8 changed files with 152 additions and 1 deletions
+1
View File
@@ -226,6 +226,7 @@ val generateTypeScriptJsExportOnFileTests = sequential(
!it.path.endsWith("implicit-export") &&
!it.path.endsWith("inheritance") &&
!it.path.endsWith("strict-implicit-export") &&
!it.path.endsWith("private-primary-constructor") &&
!it.path.endsWith(exportFileDirPostfix)
}
.map { generateJsExportOnFileTestFor(it.name) }
@@ -637,6 +637,22 @@ public class IrJsTypeScriptExportTestGenerated extends AbstractIrJsTypeScriptExp
}
}
@Nested
@TestMetadata("js/js.translator/testData/typescript-export/private-primary-constructor")
@TestDataPath("$PROJECT_ROOT")
public class Private_primary_constructor {
@Test
public void testAllFilesPresentInPrivate_primary_constructor() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("js/js.translator/testData/typescript-export/private-primary-constructor"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.JS_IR, true);
}
@Test
@TestMetadata("private-primary-constructor.kt")
public void testPrivate_primary_constructor() throws Exception {
runTest("js/js.translator/testData/typescript-export/private-primary-constructor/private-primary-constructor.kt");
}
}
@Nested
@TestMetadata("js/js.translator/testData/typescript-export/properties")
@TestDataPath("$PROJECT_ROOT")