Answer the question
In order to leave comments, you need to log in
How to define a property as a class that extends another class?
Please tell me how in TS how to define any class that extends let's say some kind of conditional RegExp ??
Like this:
class T extends RegExp {...}
class E extends RegExp {...}
interface ChtotoTam {
f: любой класс который extends RegExp
}
interface ChtotoTam {
f: T | E
}
Answer the question
In order to leave comments, you need to log in
Well, put it there RegExp
. Any class that extends it will do.
interface ChtotoTam {
f: RegExp
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question