ts-morph-structures

Home > ts-morph-structures > TypeMembersMap > convertPropertyToAccessors

TypeMembersMap.convertPropertyToAccessors() method

Convert a property signature to get and/or set accessors. This may be lossy, but we try to be faithful.

Signature:

convertPropertyToAccessors(name: string, toGetter: boolean, toSetter: boolean): void;

Parameters

Parameter Type Description
name string the property name
toGetter boolean true if the caller wants a getter
toSetter boolean true if the caller wants a setter

Returns:

void