mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-15 17:47:49 +08:00
Merge pull request #24606 from SergAtGitHub/yeoman-fix
Renamed Base class to Generator so to follow latest yeoman API.
This commit is contained in:
18
types/yeoman-generator/index.d.ts
vendored
18
types/yeoman-generator/index.d.ts
vendored
@@ -11,7 +11,7 @@ import * as inquirer from 'inquirer';
|
||||
|
||||
type Callback = (err: any) => void;
|
||||
|
||||
declare namespace Base {
|
||||
declare namespace Generator {
|
||||
interface Question extends inquirer.Question {
|
||||
/**
|
||||
* whether to store the user's previous answer
|
||||
@@ -79,7 +79,7 @@ declare namespace Base {
|
||||
}
|
||||
}
|
||||
|
||||
declare class Base extends EventEmitter {
|
||||
declare class Generator extends EventEmitter {
|
||||
constructor(args: string|string[], options: {});
|
||||
|
||||
env: {
|
||||
@@ -89,18 +89,18 @@ declare class Base extends EventEmitter {
|
||||
resolved: string;
|
||||
description: string;
|
||||
appname: string;
|
||||
config: Base.Storage;
|
||||
fs: Base.MemFsEditor;
|
||||
config: Generator.Storage;
|
||||
fs: Generator.MemFsEditor;
|
||||
options: {};
|
||||
log(message?: string, context?: any): void;
|
||||
|
||||
argument(name: string, config: Base.ArgumentConfig): this;
|
||||
argument(name: string, config: Generator.ArgumentConfig): this;
|
||||
composeWith(namespace: string, options: { [name: string]: any }, settings?: { local: string, link: 'weak'|'strong' }): this;
|
||||
destinationPath(...path: string[]): string;
|
||||
destinationRoot(rootPath?: string): string;
|
||||
determineAppname(): string;
|
||||
option(name: string, config: Base.OptionConfig): this;
|
||||
prompt(questions: Base.Questions): Promise<Base.Answers>;
|
||||
option(name: string, config: Generator.OptionConfig): this;
|
||||
prompt(questions: Generator.Questions): Promise<Generator.Answers>;
|
||||
registerTransformStream(stream: {}|Array<{}>): this;
|
||||
rootGeneratorName(): string;
|
||||
rootGeneratorVersion(): string;
|
||||
@@ -149,7 +149,7 @@ declare class Base extends EventEmitter {
|
||||
*
|
||||
* @return Resolved if install successful, rejected otherwise
|
||||
*/
|
||||
installDependencies(options?: Base.InstallOptions): Promise<void>;
|
||||
installDependencies(options?: Generator.InstallOptions): Promise<void>;
|
||||
/**
|
||||
* Receives a list of `packages` and an `options` object to install through npm.
|
||||
*
|
||||
@@ -214,4 +214,4 @@ declare class Base extends EventEmitter {
|
||||
}
|
||||
};
|
||||
}
|
||||
export = Base;
|
||||
export = Generator;
|
||||
|
||||
Reference in New Issue
Block a user