web 3d图形渲染器
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

10 lines
764 B

  1. import { YargsInstance, Arguments } from './yargs';
  2. export declare function globalMiddlewareFactory<T>(globalMiddleware: Middleware[], context: T): (callback: MiddlewareCallback | MiddlewareCallback[], applyBeforeValidation?: boolean) => T;
  3. export declare function commandMiddlewareFactory(commandMiddleware?: MiddlewareCallback[]): Middleware[];
  4. export declare function applyMiddleware(argv: Arguments | Promise<Arguments>, yargs: YargsInstance, middlewares: Middleware[], beforeValidation: boolean): Arguments | Promise<Arguments>;
  5. export interface MiddlewareCallback {
  6. (argv: Arguments, yargs: YargsInstance): Partial<Arguments> | Promise<Partial<Arguments>>;
  7. }
  8. export interface Middleware extends MiddlewareCallback {
  9. applyBeforeValidation: boolean;
  10. }