Namespace import (import the module itself).
Namespace import (import the module itself).
The second parameter should be the singleton JSImport.Namespace
.
Intuitively, this corresponds to
import * as AnnotatedObject from <module>
(jSImport: StringAdd).self
(jSImport: StringFormat).self
(jSImport: ArrowAssoc[JSImport]).x
(Since version 2.10.0) Use leftOfArrow
instead
(jSImport: Ensuring[JSImport]).x
(Since version 2.10.0) Use resultOfEnsuring
instead
Marks the annotated class or object as imported from another JS module.
Intuitively, this corresponds to the following ECMAScript import directive:
import { <name> as AnnotatedClassOrObject } from <module>
To import the default export of a module, use
JSImport.Default
asname
.@JSImport
is not compatible with thejsDependencies
mechanism offered by the Scala.js sbt plugin. You are responsible for resolving and/or bundling the JavaScript modules that you are importing using other mechanisms.