JSSymUtils

dotty.tools.dotc.transform.sjs.JSSymUtils
object JSSymUtils

Additional extensions for Symbols that are only relevant for Scala.js.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
JSSymUtils.type

Members list

Type members

Classlikes

Attributes

Companion
object
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Companion
enum
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
enum JSName

The result type for sym.jsName.

The result type for sym.jsName.

It is either a literal string, or a computed name represented by a reference to a static Symbol (a dotc.core.Symbols.Symbol, not a js.Symbol).

Attributes

Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final class JSParamInfo(val info: Type, val repeated: Boolean, val capture: Boolean)

Info about a Scala method param when called as JS method.

Info about a Scala method param when called as JS method.

Value parameters

capture

Whether the parameter is a capture.

info

Parameter type (type of a single element if repeated).

repeated

Whether the parameter is repeated.

Attributes

Supertypes
class Object
trait Matchable
class Any

Extensions

Extensions

extension (sym: Symbol)

Should this symbol be translated into a JS bracket access?

Should this symbol be translated into a JS bracket access?

Attributes

Should this symbol be translated into a JS bracket call?

Should this symbol be translated into a JS bracket call?

Attributes

Tests whether the given member is exposed, i.e., whether it was originally a public or protected member of a non-native JS class.

Tests whether the given member is exposed, i.e., whether it was originally a public or protected member of a non-native JS class.

Attributes

def isJSGetter(using Context): Boolean

Should this symbol be translated into a JS getter?

Should this symbol be translated into a JS getter?

Attributes

Is this symbol a JS getter or setter?

Is this symbol a JS getter or setter?

Attributes

def isJSSetter(using Context): Boolean

Should this symbol be translated into a JS setter?

Should this symbol be translated into a JS setter?

Attributes

def isJSType(using Context): Boolean

Is this symbol a JavaScript type?

Is this symbol a JavaScript type?

Attributes

Is this symbol a nested JS class, i.e., an inner or local JS class?

Is this symbol a nested JS class, i.e., an inner or local JS class?

Attributes

Is this symbol a non-native JS class?

Is this symbol a non-native JS class?

Attributes

def jsName(using Context): JSName

Gets the unqualified JS name of the symbol.

Gets the unqualified JS name of the symbol.

If it is not explicitly specified with an @JSName annotation, the JS name is inferred from the Scala name.

Attributes