ts-morph-structures

Home > ts-morph-structures > ClassMembersMap > convertPropertyToAccessors

ClassMembersMap.convertPropertyToAccessors() method

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

Signature:

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

Parameters

Parameter Type Description
isStatic boolean true if the property is static (and the accessors should be)
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