-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added test case to show issue with export default
Some pacakges such as pixi.js re-export 3rd party libraries under their own namespace, e.g. @pixi/util does the following: export { default as EventEmitter } from 'eventemitter3' in order to provide the EventEmitter module from eventemitter3 under the @pixi/util namespace. The converter appears to ignore exports of this form and no module is created. This breaks libraries that rely on this behavior such as Pixi.
- Loading branch information
Showing
19 changed files
with
146 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
tests/export-default/check-3/e/export-default-testcase/build.sbt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
organization := "org.scalablytyped" | ||
name := "export-default-testcase" | ||
version := "0.0-unknown-076c25" | ||
scalaVersion := "3.3.1" | ||
enablePlugins(ScalaJSPlugin) | ||
libraryDependencies ++= Seq( | ||
"com.olvind" %%% "scalablytyped-runtime" % "2.4.2") | ||
publishArtifact in packageDoc := false | ||
scalacOptions ++= List("-encoding", "utf-8", "-feature", "-language:implicitConversions", "-language:higherKinds", "-language:existentials", "-no-indent", "-source:future") | ||
licenses += ("MIT", url("http://opensource.org/licenses/MIT")) |
1 change: 1 addition & 0 deletions
1
tests/export-default/check-3/e/export-default-testcase/project/build.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
sbt.version=1.9.6 |
1 change: 1 addition & 0 deletions
1
tests/export-default/check-3/e/export-default-testcase/project/plugins.sbt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
addSbtPlugin("org.scala-js" %% "sbt-scalajs" % "1.11.0") |
15 changes: 15 additions & 0 deletions
15
tests/export-default/check-3/e/export-default-testcase/readme.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
|
||
# Scala.js typings for export-default-testcase | ||
|
||
|
||
|
||
|
||
## Note | ||
This library has been generated from typescript code from first party type definitions. | ||
|
||
Provided with :purple_heart: from [ScalablyTyped](https://github.com/oyvindberg/ScalablyTyped) | ||
|
||
## Usage | ||
See [the main readme](../../readme.md) for instructions. | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...-testcase/src/main/scala/typings/exportDefaultTestcase/exportDefaultTestcaseRequire.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package typings.exportDefaultTestcase | ||
|
||
import org.scalablytyped.runtime.StObject | ||
import scala.scalajs.js | ||
import scala.scalajs.js.annotation.{JSGlobalScope, JSGlobal, JSImport, JSName, JSBracketAccess} | ||
|
||
/* This can be used to `require` the library as a side effect. | ||
If it is a global library this will make scalajs-bundler include it */ | ||
@JSImport("export-default-testcase", JSImport.Namespace) | ||
@js.native | ||
object exportDefaultTestcaseRequire extends StObject |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default as Foo } from 'foo'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
organization := "org.scalablytyped" | ||
name := "eventemitter3" | ||
version := "0.0-unknown-f8988b" | ||
scalaVersion := "3.3.1" | ||
enablePlugins(ScalaJSPlugin) | ||
libraryDependencies ++= Seq( | ||
"com.olvind" %%% "scalablytyped-runtime" % "2.4.2") | ||
publishArtifact in packageDoc := false | ||
scalacOptions ++= List("-encoding", "utf-8", "-feature", "-language:implicitConversions", "-language:higherKinds", "-language:existentials", "-no-indent", "-source:future") | ||
licenses += ("MIT", url("http://opensource.org/licenses/MIT")) |
1 change: 1 addition & 0 deletions
1
tests/pixi-utils-7.4.0/check-3/e/eventemitter3/project/build.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
sbt.version=1.9.6 |
1 change: 1 addition & 0 deletions
1
tests/pixi-utils-7.4.0/check-3/e/eventemitter3/project/plugins.sbt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
addSbtPlugin("org.scala-js" %% "sbt-scalajs" % "1.11.0") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
|
||
# Scala.js typings for eventemitter3 | ||
|
||
|
||
|
||
|
||
## Note | ||
This library has been generated from typescript code from first party type definitions. | ||
|
||
Provided with :purple_heart: from [ScalablyTyped](https://github.com/oyvindberg/ScalablyTyped) | ||
|
||
## Usage | ||
See [the main readme](../../readme.md) for instructions. | ||
|
||
|
11 changes: 11 additions & 0 deletions
11
...0/check-3/e/eventemitter3/src/main/scala/typings/eventemitter3/eventemitter3Require.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package typings.eventemitter3 | ||
|
||
import org.scalablytyped.runtime.StObject | ||
import scala.scalajs.js | ||
import scala.scalajs.js.annotation.{JSGlobalScope, JSGlobal, JSImport, JSName, JSBracketAccess} | ||
|
||
/* This can be used to `require` the library as a side effect. | ||
If it is a global library this will make scalajs-bundler include it */ | ||
@JSImport("eventemitter3", JSImport.Namespace) | ||
@js.native | ||
object eventemitter3Require extends StObject |
16 changes: 16 additions & 0 deletions
16
...s/pixi-utils-7.4.0/check-3/e/eventemitter3/src/main/scala/typings/eventemitter3/mod.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package typings.eventemitter3 | ||
|
||
import org.scalablytyped.runtime.StObject | ||
import scala.scalajs.js | ||
import scala.scalajs.js.annotation.{JSGlobalScope, JSGlobal, JSImport, JSName, JSBracketAccess} | ||
|
||
object mod { | ||
|
||
@JSImport("eventemitter3", JSImport.Namespace) | ||
@js.native | ||
open class ^[EventTypes, Context /* <: Any */] () | ||
extends StObject | ||
with EventEmitter[EventTypes, Context] | ||
|
||
trait EventEmitter[EventTypes, Context /* <: Any */] extends StObject | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
organization := "org.scalablytyped" | ||
name := "pixi__utils" | ||
version := "0.0-unknown-02740c" | ||
scalaVersion := "3.3.1" | ||
enablePlugins(ScalaJSPlugin) | ||
libraryDependencies ++= Seq( | ||
"com.olvind" %%% "scalablytyped-runtime" % "2.4.2", | ||
"org.scalablytyped" %%% "eventemitter3" % "0.0-unknown-f8988b") | ||
publishArtifact in packageDoc := false | ||
scalacOptions ++= List("-encoding", "utf-8", "-feature", "-language:implicitConversions", "-language:higherKinds", "-language:existentials", "-no-indent", "-source:future") | ||
licenses += ("MIT", url("http://opensource.org/licenses/MIT")) |
1 change: 1 addition & 0 deletions
1
tests/pixi-utils-7.4.0/check-3/p/pixi__utils/project/build.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
sbt.version=1.9.6 |
1 change: 1 addition & 0 deletions
1
tests/pixi-utils-7.4.0/check-3/p/pixi__utils/project/plugins.sbt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
addSbtPlugin("org.scala-js" %% "sbt-scalajs" % "1.11.0") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
|
||
# Scala.js typings for pixi__utils | ||
|
||
|
||
|
||
|
||
## Note | ||
This library has been generated from typescript code from first party type definitions. | ||
|
||
Provided with :purple_heart: from [ScalablyTyped](https://github.com/oyvindberg/ScalablyTyped) | ||
|
||
## Usage | ||
See [the main readme](../../readme.md) for instructions. | ||
|
||
|
13 changes: 13 additions & 0 deletions
13
tests/pixi-utils-7.4.0/check-3/p/pixi__utils/src/main/scala/typings/pixiUtils/libMod.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package typings.pixiUtils | ||
|
||
import typings.eventemitter3.mod.^ | ||
import org.scalablytyped.runtime.StObject | ||
import scala.scalajs.js | ||
import scala.scalajs.js.annotation.{JSGlobalScope, JSGlobal, JSImport, JSName, JSBracketAccess} | ||
|
||
object libMod { | ||
|
||
@JSImport("@pixi/utils/lib", "EventEmitter") | ||
@js.native | ||
open class EventEmitter[EventTypes, Context /* <: Any */] () extends ^[EventTypes, Context] | ||
} |
11 changes: 11 additions & 0 deletions
11
...utils-7.4.0/check-3/p/pixi__utils/src/main/scala/typings/pixiUtils/pixiUtilsRequire.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package typings.pixiUtils | ||
|
||
import org.scalablytyped.runtime.StObject | ||
import scala.scalajs.js | ||
import scala.scalajs.js.annotation.{JSGlobalScope, JSGlobal, JSImport, JSName, JSBracketAccess} | ||
|
||
/* This can be used to `require` the library as a side effect. | ||
If it is a global library this will make scalajs-bundler include it */ | ||
@JSImport("@pixi/utils", JSImport.Namespace) | ||
@js.native | ||
object pixiUtilsRequire extends StObject |