pub struct MemberInfo {
pub name: String,
pub kind: MemberKind,
pub span: Span,
pub has_decorator: bool,
pub decorator_names: Vec<String>,
pub is_instance_returning_static: bool,
pub is_self_returning: bool,
pub override_base: Option<String>,
pub is_protected: bool,
pub is_static: bool,
pub pairs_with_symbol_dispose: bool,
}Expand description
A member of an enum, class, or namespace.
Fields§
§name: StringMember name.
kind: MemberKindThe kind of member (enum, class method/property, or namespace member).
span: SpanSource span of the member declaration.
has_decorator: boolWhether this member has decorators (e.g., @Column(), @Inject()).
Decorated members are used by frameworks at runtime and should not be
flagged as unused class members, unless every decorator on the member
is opted out via FallowConfig.ignore_decorators.
decorator_names: Vec<String>Full dotted path of each decorator on this member, in source order.
@step("x") stores "step"; @ns.foo stores "ns.foo". Empty for
undecorated members, Angular signal-initializer properties (which set
has_decorator without a literal decorator AST node), and decorators
whose expression is not an identifier ladder (the entry is the empty
string in that case, treated as never-matching by the predicate).
is_instance_returning_static: boolTrue for a static method that returns a new instance of its class
(return new this(), return new C(), or a declared return type C).
Member accesses on the call result credit the class (#346, #387).
is_self_returning: boolTrue for an instance method whose call result is an instance of the
same class: the declared return type names the class, or the body ends
with return this. The analysis walks fluent chains
(Class.factory().setX().setY()) only through these methods (#387).
override_base: Option<String>Root identifier of the class extends expression, set only when the
member has the override modifier: Container in
extends Container<Env>, Schema in extends Schema.TaggedError<E>()(...).
The analysis credits the member when this root names code outside the
project, because that code calls the overridden member.
is_protected: boolTrue for a class member with the TypeScript protected modifier. Only
the unused-protected-class-members rule checks these members. Every
other consumer that checks class members skips them.
is_static: boolTrue for a static class member, which code with the class value reads.
pairs_with_symbol_dispose: boolTrue for dispose when the class declares [Symbol.dispose] or [Symbol.asyncDispose].