shared-types.ts 490 B

12345678910111213141516171819202122232425
  1. /**
  2. * A recursive implementation of the Partial<T> type.
  3. */
  4. export type DeepPartial<T> = { [K in keyof T]?: DeepPartial<T[K]> };
  5. // tslint:disable:ban-types
  6. /**
  7. * A type representing the type rather than instance of a class.
  8. */
  9. export type Type<T> = {
  10. new (): T;
  11. } & Function;
  12. /**
  13. * A type describing the shape of a paginated list response
  14. */
  15. export type PaginatedList<T> = {
  16. items: T[];
  17. totalItems: number;
  18. };
  19. /**
  20. * An entity ID
  21. */
  22. export type ID = string | number;