ts-morph-structures

Home > ts-morph-structures > ClassMembersMap > getAsKind

ClassMembersMap.getAsKind() method

A typed call to this.get() for a given kind.

Signature:

getAsKind<Kind extends ClassMemberImpl["kind"]>(kind: Kind, isStatic: boolean, name: string): Extract<ClassMemberImpl, KindedStructure<Kind>> | undefined;

Parameters

Parameter Type Description
kind Kind the structure kind.
isStatic boolean true if the member is static.
name string the name of the member.

Returns:

Extract<ClassMemberImpl, KindedStructure<Kind>> | undefined