Skip to content

Latest commit

 

History

History
36 lines (28 loc) · 635 Bytes

ts-naming-subclients.md

File metadata and controls

36 lines (28 loc) · 635 Bytes

ts-naming-subclients

Requires client methods returning a subclient to have names prefixed suffixed with "get" and suffixed with "client".

Examples

Good

class ServiceClient {
  getSubClient(): SubClient {
    /* code to return instance of SubClient */
  }
}
// private methods are ignored
class ServiceClient {
  private _get(): SubClient {
    /* code to return instance of SubClient */
  }
}

Bad

class ServiceClient {
  get(): SubClient {
    /* code to return instance of SubClient */
  }
}