Skip to content

hasComponent

Canonical path: o6.hasComponent

hasComponent

hasComponent(instance: None) -> Any
hasComponent(instance: _T) -> _T
hasComponent(instance)

Attach a declaration to its containing type through HasComponent.

Returns the declaration unchanged, so the static type of the class attribute is preserved. Works for Variables, Objects, Methods, and their subtypes. Pass None to declare the relationship without a target instance.

See Type child relationships.