Skip to content

Latest commit

 

History

History
36 lines (28 loc) · 660 Bytes

ts-naming-drop-noun.md

File metadata and controls

36 lines (28 loc) · 660 Bytes

ts-naming-drop-noun

Requires client methods that return instances of the client to drop the client name from the method name.

Examples

Good

class ServiceClient {
  create(): ServiceClient {
    /* code to return instance of ServiceClient */
  }
}
// private methods are ignored
class ServiceClient {
  private _createService(): ServiceClient {
    /* code to return instance of ServiceClient */
  }
}

Bad

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