mongoose-management
Version:
Mongoose schemas management tool
16 lines (15 loc) • 718 B
TypeScript
import Prompts from '../../prompts';
import { choiceType, choiceValueType } from '../../types';
export default abstract class AbstractMenu<T, S> {
protected prompts: Prompts;
constructor(prompts: Prompts);
abstract exec(item: T): Promise<choiceValueType<S>>;
getMenuChoiceCreate(type: string, action?: 'create' | 'createColumn' | 'createIndex'): choiceType<S>;
getMenuChoiceEdit(type: string, data?: S): choiceType<S>;
getMenuChoiceRemove(type: string, data?: S): choiceType<S>;
getMenuChoiceSave(): choiceType<S>;
getMenuChoiceWrite(): choiceType<S>;
getMenuChoiceBack(): choiceType<S>;
getMenuChoiceBackToCollection(): choiceType<S>;
getMenuChoiceExit(): choiceType<S>;
}