Home > ts-morph-structures > MemberedTypeToClass > defineStatementsByPurpose
Define a statement purpose group for the target class.
Signature:
defineStatementsByPurpose(purposeKey: string, isBlockStatement: boolean, regionName?: string): void;
Parameter | Type | Description |
---|---|---|
purposeKey | string | The purpose of the statmeent group (validation, preconditions, body, postconditions, etc.) |
isBlockStatement | boolean | true if the statement block should be enclosed in curly braces. |
regionName | string | <p>(Optional) an optional #region / #endregion comment name.</p><p>Call this in the order of statement purpose groups you intend.</p> |
Returns:
void