mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-23 12:56:46 +08:00
@@ -1,5 +1,5 @@
|
||||
declare namespace adone {
|
||||
namespace application {
|
||||
namespace app {
|
||||
namespace I {
|
||||
type ArgumentType = ((x: string, index: number) => any) | RegExp;
|
||||
|
||||
@@ -12,7 +12,7 @@ declare namespace adone {
|
||||
| "append"
|
||||
| "count"
|
||||
| "set";
|
||||
nargs?: number | "+" | "*" | "?"
|
||||
nargs?: number | "+" | "*" | "?";
|
||||
type?: ArgumentType | ArgumentType[];
|
||||
verify?: (args: any, opts: any) => boolean; // TODO
|
||||
required?: boolean;
|
||||
@@ -49,7 +49,7 @@ declare namespace adone {
|
||||
name?: string;
|
||||
description?: string;
|
||||
subsystems?: SubsystemInfo[];
|
||||
commandsGroups?: Group[]
|
||||
commandsGroups?: Group[];
|
||||
}
|
||||
|
||||
interface SubsystemInfo {
|
||||
@@ -71,24 +71,24 @@ declare namespace adone {
|
||||
|
||||
namespace I {
|
||||
interface LoadSubsystemOptions {
|
||||
name?: string,
|
||||
description?: string,
|
||||
group?: string,
|
||||
transpile?: boolean
|
||||
name?: string;
|
||||
description?: string;
|
||||
group?: string;
|
||||
transpile?: boolean;
|
||||
}
|
||||
|
||||
interface CommonAddSubsystemInfo {
|
||||
name?: string,
|
||||
useFilename?: boolean
|
||||
description?: string,
|
||||
group?: string,
|
||||
configureArgs?: any[]
|
||||
transpile?: boolean,
|
||||
bind?: boolean | string
|
||||
name?: string;
|
||||
useFilename?: boolean;
|
||||
description?: string;
|
||||
group?: string;
|
||||
configureArgs?: any[];
|
||||
transpile?: boolean;
|
||||
bind?: boolean | string;
|
||||
}
|
||||
|
||||
interface AddSubsystemInfo extends CommonAddSubsystemInfo {
|
||||
subsystem: Subsystem | string,
|
||||
subsystem: Subsystem | string;
|
||||
}
|
||||
|
||||
interface SysInfo {
|
||||
@@ -109,7 +109,7 @@ declare namespace adone {
|
||||
}
|
||||
|
||||
interface AddSubsystemsFromOptions extends CommonAddSubsystemInfo {
|
||||
filter?: string[] | ((file: string) => boolean | Promise<boolean>)
|
||||
filter?: string[] | ((file: string) => boolean | Promise<boolean>);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -211,25 +211,22 @@ declare namespace adone {
|
||||
_rejectionHandled(p: Promise<any>): void;
|
||||
|
||||
_signalExit(sigName: string): void;
|
||||
|
||||
}
|
||||
|
||||
namespace I {
|
||||
interface Command {
|
||||
// ?
|
||||
names: string[];
|
||||
// TODO
|
||||
}
|
||||
|
||||
interface Argument {
|
||||
// ?
|
||||
names: string[];
|
||||
// TODO
|
||||
}
|
||||
|
||||
interface PositionalArgument extends Argument {
|
||||
// ?
|
||||
}
|
||||
type PositionalArgument = Argument; // TODO
|
||||
|
||||
interface OptionalArgument extends Argument {
|
||||
// ?
|
||||
}
|
||||
type OptionalArgument = Argument; // TODO
|
||||
|
||||
interface DefineCommandFromSubsystemOptions {
|
||||
name?: string;
|
||||
4
types/adone/glosses/is.d.ts
vendored
4
types/adone/glosses/is.d.ts
vendored
@@ -320,12 +320,12 @@ declare namespace adone {
|
||||
/**
|
||||
* Checks whether the given object is an adone subsystem
|
||||
*/
|
||||
export function subsystem(obj: any): obj is adone.application.Subsystem;
|
||||
export function subsystem(obj: any): obj is adone.app.Subsystem;
|
||||
|
||||
/**
|
||||
* Checks whether the given object is an adone application
|
||||
*/
|
||||
export function application(obj: any): obj is adone.application.Application;
|
||||
export function application(obj: any): obj is adone.app.Application;
|
||||
|
||||
/**
|
||||
* Checks whether the given object is an adone logger
|
||||
|
||||
2
types/adone/index.d.ts
vendored
2
types/adone/index.d.ts
vendored
@@ -5,7 +5,7 @@
|
||||
// TypeScript Version: 2.4
|
||||
|
||||
/// <reference path="./adone.d.ts" />
|
||||
/// <reference path="./glosses/application.d.ts" />
|
||||
/// <reference path="./glosses/app.d.ts" />
|
||||
/// <reference path="./glosses/archives.d.ts" />
|
||||
/// <reference path="./glosses/assertion.d.ts" />
|
||||
/// <reference path="./glosses/collections/index.d.ts" />
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace applicationTests {
|
||||
Subsystem,
|
||||
runCli,
|
||||
Application
|
||||
} = adone.application;
|
||||
} = adone.app;
|
||||
|
||||
namespace DApplicationTests {
|
||||
{
|
||||
@@ -24,6 +24,7 @@
|
||||
"adone.d.ts",
|
||||
"async.d.ts",
|
||||
"benchmark.d.ts",
|
||||
"glosses/app.d.ts",
|
||||
"glosses/archives.d.ts",
|
||||
"glosses/assertion.d.ts",
|
||||
"glosses/collections/array_set.d.ts",
|
||||
@@ -95,7 +96,7 @@
|
||||
"glosses/utils.d.ts",
|
||||
"glosses/vault.d.ts",
|
||||
"index.d.ts",
|
||||
"test/glosses/application.ts",
|
||||
"test/glosses/app.ts",
|
||||
"test/glosses/archives.ts",
|
||||
"test/glosses/assertion.ts",
|
||||
"test/glosses/collections/array_set.ts",
|
||||
|
||||
Reference in New Issue
Block a user