JSAny extension type

The JS types users should use to write their external APIs.

These are meant to separate the Dart and JS type hierarchies statically.

WARNING: The runtime semantics between backends differ and may not be intuitive e.g. casting to JSString may give you inconsistent and surprising results depending on the value and the backend. It is preferred to always use the conversion functions e.g. toJS and toDart. You should always use interop to type-check e.g. typeofEquals and instanceOfString instead of relying on is and as, as the latter is backend-dependent. The overall top type in the JS types hierarchy.

on
  • JSAnyRepType
Implemented types

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited