gen-jhipster
Version:
Spring Boot + Angular/React/Vue in one handy generator
32 lines (31 loc) • 1.24 kB
TypeScript
import type { MemFsEditor } from 'mem-fs-editor';
import type { Storage } from 'yeoman-generator';
import type { ApplicationType, BaseApplicationSource } from '../../lib/types/application/application.js';
import type { Entity } from '../../lib/types/application/entity.js';
import type { Entity as BaseEntity } from '../../lib/types/base/entity.js';
import type { Control } from './types.js';
export default class SharedData<EntityType extends BaseEntity = Entity, Application = ApplicationType> {
_storage: any;
_editor: MemFsEditor;
_log: any;
_logCwd: string;
constructor(storage: Storage, { memFs, destinationPath, log, logCwd }: {
memFs: any;
destinationPath: any;
log: any;
logCwd: any;
}, initialControl?: Partial<Control>);
getSource(): BaseApplicationSource;
getControl(): Control;
getApplication(): Application;
setEntity(entityName: string, entity: {
name: string;
} & Partial<EntityType>): void;
hasEntity(entityName: string): boolean;
getEntity(entityName: string): EntityType;
getEntities(entityNames?: string[]): {
entityName: string;
entity: EntityType;
}[];
getEntitiesMap(): Record<string, EntityType>;
}