Skip to content

Latest commit

 

History

History
30 lines (23 loc) · 599 Bytes

ts-naming-options.md

File metadata and controls

30 lines (23 loc) · 599 Bytes

ts-naming-options

Requires client method options parameter types to be suffixed with Options and prefixed with the method name.

Examples

Good

class ServiceClient {
  createItem(options: CreateItemOptions): Item {
    /* code to return instance of Item */
  }
  upsertItem(options: UpsertItemOptions): Item {
    /* code to return instance of Item */
  }
}

Bad

class ServiceClient {
  createItem(options: Options): Item {
    /* code to return instance of Item */
  }
}