This function returns true if the provided value is a constructor declared with the ES6 class keyword.
import*as
import _
_from'radashi'
class
classMyClass
MyClass {}
function
functionOldSchoolClass():void
OldSchoolClass() {
this.
any
foo='bar'
}
import _
_.
isClass<typeof MyClass>(value: typeof MyClass): value is typeof MyClass
export isClass
Checks if the given value is a class. This function verifies
if the value was defined using the class syntax. Old school
classes (defined with constructor functions) will return false.
"Native classes" like Error will also return false.
isClass<ErrorConstructor>(value: ErrorConstructor): value is ErrorConstructor
export isClass
Checks if the given value is a class. This function verifies
if the value was defined using the class syntax. Old school
classes (defined with constructor functions) will return false.
"Native classes" like Error will also return false.
isClass<() =>void>(value: () =>void): value is never
export isClass
Checks if the given value is a class. This function verifies
if the value was defined using the class syntax. Old school
classes (defined with constructor functions) will return false.
"Native classes" like Error will also return false.
Checks if the given value is a class. This function verifies
if the value was defined using the class syntax. Old school
classes (defined with constructor functions) will return false.
"Native classes" like Error will also return false.
isClass<{}>(value: {}): value is _.Class<unknown[], unknown>
export isClass
Checks if the given value is a class. This function verifies
if the value was defined using the class syntax. Old school
classes (defined with constructor functions) will return false.
"Native classes" like Error will also return false.
isClass<undefined>(value: undefined): value is never
export isClass
Checks if the given value is a class. This function verifies
if the value was defined using the class syntax. Old school
classes (defined with constructor functions) will return false.
"Native classes" like Error will also return false.