UNPKG

690 BTypeScriptView Raw
1import type { ReplContext } from './repl-context';
2import type { ReplFunction } from './repl-function';
3export type ReplFnDefinition = {
4 /** Function's name. Note that this should be a valid JavaScript function name. */
5 name: string;
6 /** Alternative names to the function. */
7 aliases?: ReplFnDefinition['name'][];
8 /** Function's description to display when `<function>.help` is entered. */
9 description: string;
10 /**
11 * Function's signature following TypeScript _function type expression_ syntax.
12 * @example '(token: InjectionToken) => any'
13 */
14 signature: string;
15};
16export type ReplFunctionClass = new (replContext: ReplContext) => ReplFunction;