Skip to content

isComponentClass

Since v0.3.0

Type guard to check if a value is an Angular component class.

Detects Angular components by checking for internal Angular markers:

  • ɵcmp (component definition)
  • ɵfac (factory function)

Also checks if it’s an ES6 class (vs function) by inspecting the string representation.

isComponentClass(value: unknown): value
NameTypeDescription
valueunknown
AI assistants: For complete API documentation, implementation guides, and code examples for this library, see https://toolboxjs.com/llms-full.txt