Browse Source

feat: add service model to schematics

pull/5137/head
Arman Ozak 6 years ago
parent
commit
5c5c9e31bb
  1. 1
      npm/ng-packs/packages/schematics/src/models/index.ts
  2. 17
      npm/ng-packs/packages/schematics/src/models/service.ts

1
npm/ng-packs/packages/schematics/src/models/index.ts

@ -2,4 +2,5 @@ export * from './api-definition';
export * from './import'; export * from './import';
export * from './method'; export * from './method';
export * from './project'; export * from './project';
export * from './service';
export * from './util'; export * from './util';

17
npm/ng-packs/packages/schematics/src/models/service.ts

@ -0,0 +1,17 @@
import { Import } from './import';
import { Method } from './method';
import { Omissible } from './util';
export class Service {
apiName: string;
imports: Import[] = [];
methods: Method[] = [];
name: string;
namespace: string;
constructor(options: ServiceOptions) {
Object.assign(this, options);
}
}
export type ServiceOptions = Omissible<Service, 'imports' | 'methods'>;
Loading…
Cancel
Save