tryCast<T2 extends T> method

T2? tryCast<T2 extends T>()

Implementation

T2? tryCast<T2 extends T>() => this is T2 ? this as T2 : null;