Skip to main content

Module type_map

Module type_map 

Source

Structs§

ClassMembers
All members of a named class split by kind and static-ness.
TypeMap
Maps variable name (with $) → class name.

Functions§

build_method_returns
Pre-build a map of class_name → method_name → return_class_name for a single doc.
collect_all_class_ranges
Return the LSP range of every class/interface/trait/enum declaration in the file (recursing into braced-namespace bodies). Used by linked-editing to drop highlights that fall inside an other class than the cursor’s.
enclosing_class_at
Return the name of the class whose body contains position, or None.
enclosing_class_range_at
Return the LSP range of the class/interface/trait/enum declaration whose body contains position, or None if the cursor is outside any. Used by linked-editing to scope same-name member rewrites to the enclosing class instead of every class in the file.
is_backed_enum
Returns true if class_name is a backed enum (enum Foo: string / enum Foo: int) in doc. Backed enums have a ->value property.
is_enum
Returns true if class_name is declared as an enum in doc.
members_of_class
Return all members (methods, properties, constants) of class_name. Also returns the direct parent class name via ClassMembers::parent.
mixin_classes_of
Return the @mixin class names declared in class_name’s docblock.
params_of_function
Return the parameter names of the function or method named func_name.
params_of_method
Return the parameter names of method_name on class class_name. Primarily used to offer named-argument completions for attribute constructors.
parent_class_name
Return the direct parent class name of class_name in doc, if any.