TestModules.ts 663 B

1234567891011121314151617181920212223
  1. import BaseModule from "../BaseModule";
  2. import OtherModule, { OtherModuleJobs } from "../modules/OtherModule";
  3. import StationModule, { StationModuleJobs } from "../modules/StationModule";
  4. export type Methods<T> = {
  5. [P in keyof T as T[P] extends Function ? P : never]: T[P];
  6. };
  7. export type UniqueMethods<T> = Methods<Omit<T, keyof typeof BaseModule>>;
  8. export type Jobs = {
  9. others: {
  10. [Property in keyof OtherModuleJobs]: OtherModuleJobs[Property];
  11. };
  12. stations: {
  13. [Property in keyof StationModuleJobs]: StationModuleJobs[Property];
  14. };
  15. };
  16. export type Modules = {
  17. others: OtherModule & typeof BaseModule;
  18. stations: StationModule & typeof BaseModule;
  19. };