ts-morph-structures

Home > ts-morph-structures > TypeMembersMap > getAsKind

TypeMembersMap.getAsKind() method

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

Signature:

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

Parameters

Parameter Type Description
kind Kind the structure kind.
name string the key to get.

Returns:

Extract<TypeMemberImpl, KindedStructure<Kind>> | undefined