getConstructorName
Available since v0.9
Returns target class' constructor name, if available.
It accepts the following arguments:
target: ConstructorOrAbstractConstructor
- The target classdefaultValue: string|null = null
- (optional) A default string value to return if target has no constructor name.
import { getConstructorName } from '@aedart/support/reflections';
class Box {}
getConstructorName(Box); // Box
getConstructorName(class {}); // null
getConstructorName(class {}, 'MyBox'); // MyBox