From 30dafca8cdce17b5b26c35742c1fece224c1b972 Mon Sep 17 00:00:00 2001 From: Jason Pickens Date: Thu, 7 Dec 2023 14:09:20 +1300 Subject: [PATCH] Fix export all --- .../converter/internal/ts/parser/TsParser.scala | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ts/src/main/scala/org/scalablytyped/converter/internal/ts/parser/TsParser.scala b/ts/src/main/scala/org/scalablytyped/converter/internal/ts/parser/TsParser.scala index 129611deb8..84b9edeaac 100644 --- a/ts/src/main/scala/org/scalablytyped/converter/internal/ts/parser/TsParser.scala +++ b/ts/src/main/scala/org/scalablytyped/converter/internal/ts/parser/TsParser.scala @@ -264,13 +264,15 @@ class TsParser(path: Option[(os.Path, Int)]) extends StdTokenParsers with Parser ("type".isDefined ~ base) | (success(false) ~ base) } - val exporteeStar: Parser[Boolean ~ TsExportee.Star] = - success(false) ~ ("*" ~> ("as" ~> tsIdent).? ~ from ^^ TsExportee.Star.apply) + val exporteeStar: Parser[Boolean ~ TsExportee.Star] = { + val base = "*" ~> ("as" ~> tsIdent).? ~ from ^^ TsExportee.Star.apply + ("type".isDefined ~ base) | (success(false) ~ base) + } val exporteeTree: Parser[Boolean ~ TsExportee.Tree] = success(false) ~ (tsDecl ^^ TsExportee.Tree) - exporteeTree | exportedNames | exporteeStar + exporteeTree | exporteeStar | exportedNames } (comments <~ "export") ~ exportType ~! exportee ^^ {