Due to restrictions on decorators, @struct can not narrow the type of the class. You must use the function to wrap the base class in the extends clause to force the correct type.
@struct
extends
Like $from, but also adds overloads for TypedArray constructors.
$from
Due to restrictions on decorators,
@structcan not narrow the type of the class. You must use the function to wrap the base class in theextendsclause to force the correct type.