Package jsinterop.base
Interface Any
@JsType(isNative=true,
name="*",
namespace="<global>")
public interface Any
Abstracts 'any' type in the type system (or '*' in Closure). This is the super type of all types
and provides helpers for casting into subtypes that are not otherwise castable (i.e. primitives).
See Js.asAny(Object) to cast an object to Any.
-
Method Summary
Modifier and TypeMethodDescriptiondefault @Nullable Any[]asArray()default JsArrayLike<@Nullable Object> default booleandefault byteasByte()default charasChar()default doubleasDouble()default floatasFloat()default intasInt()default longasLong()default JsPropertyMap<@Nullable Object> default shortasShort()default StringasString()default <T> Tcast()default <T> TPerforms unchecked cast to lefthand-side type.
-
Method Details
-
asPropertyMap
-
asArrayLike
-
asArray
-
asString
-
asBoolean
@JsOverlay default boolean asBoolean() -
asDouble
@JsOverlay default double asDouble() -
asFloat
@JsOverlay default float asFloat() -
asLong
@JsOverlay default long asLong() -
asInt
@JsOverlay default int asInt() -
asShort
@JsOverlay default short asShort() -
asChar
@JsOverlay default char asChar() -
asByte
@JsOverlay default byte asByte() -
cast
@JsOverlay default <T> T cast() -
uncheckedCast
@JsOverlay default <T> T uncheckedCast()Performs unchecked cast to lefthand-side type. You should always prefer regular casting over this (unless you know what you are doing!).
-