[K/JS] test: add @file:JsExport tests for each @JsExport test + auto-generate TypeScript export tests.

This commit is contained in:
Artem Kobzar
2022-08-26 09:51:59 +00:00
committed by Space
parent d65775ca1a
commit dbda8dcad1
139 changed files with 4242 additions and 31 deletions
@@ -719,6 +719,12 @@ private fun shouldDeclarationBeExportedImplicitlyOrExplicitly(declaration: IrDec
}
private fun shouldDeclarationBeExported(declaration: IrDeclarationWithName, context: JsIrBackendContext): Boolean {
// Formally, user have no ability to annotate EnumEntry as exported, without Enum Class
// But, when we add @file:JsExport, the annotation appears on the all of enum entries
// what make a wrong behaviour on non-exported members inside Enum Entry (check exportEnumClass and exportFileWithEnumClass tests)
if (declaration is IrClass && declaration.kind == ClassKind.ENUM_ENTRY)
return false
if (context.additionalExportedDeclarationNames.contains(declaration.fqNameWhenAvailable))
return true