Namespace import (import the module itself), with a fallback on a global variable.
Namespace import (import the module itself), with a fallback on a global variable.
When linking with module support, this is equivalent to
@JSImport(module, name).
When linking without module support, this is equivalent to
@JSGlobal(globalFallback).
Named import of a member of the module, with a fallback on a global variable.
Named import of a member of the module, with a fallback on a global variable.
When linking with module support, this is equivalent to
@JSImport(module, name).
When linking without module support, this is equivalent to
@JSGlobal(globalFallback).
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>
Named import of a member of the module.
Named import of a member of the 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 as
name.
Marks the annotated class or object as imported from another JS module.
Intuitively, this corresponds to ECMAScript import directives. See the documentation of the various constructors.
@JSImportis not compatible with thejsDependenciesmechanism 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.