forked from NativeScript/nativescript-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathyok.d.ts
56 lines (52 loc) · 2.22 KB
/
yok.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
import { IDisposable, IDictionary } from "../declarations";
import { ICommand } from "./commands";
import { IKeyCommand, IValidKeyCommands } from "./key-commands";
interface IInjector extends IDisposable {
require(name: string, file: string): void;
require(names: string[], file: string): void;
requirePublic(names: string | string[], file: string): void;
requirePublicClass(names: string | string[], file: string): void;
requireCommand(name: string, file: string): void;
requireCommand(names: string[], file: string): void;
requireKeyCommand(name: string, file: string): void;
/**
* Resolves an implementation by constructor function.
* The injector will create new instances for every call.
*/
resolve(ctor: Function, ctorArguments?: { [key: string]: any }): any;
resolve<T>(ctor: Function, ctorArguments?: { [key: string]: any }): T;
/**
* Resolves an implementation by name.
* The injector will create only one instance per name and return the same instance on subsequent calls.
*/
resolve(name: string, ctorArguments?: IDictionary<any>): any;
resolve<T>(name: string, ctorArguments?: IDictionary<any>): T;
resolveCommand(name: string): ICommand;
resolveKeyCommand(key: string): IKeyCommand;
register(name: string, resolver: any, shared?: boolean): void;
registerCommand(name: string, resolver: any): void;
registerCommand(names: string[], resolver: any): void;
registerKeyCommand(key: IValidKeyCommands, resolver: any): void;
getRegisteredCommandsNames(includeDev: boolean): string[];
getRegisteredKeyCommandsNames(): string[];
dynamicCallRegex: RegExp;
dynamicCall(call: string, args?: any[]): Promise<any>;
isDefaultCommand(commandName: string): boolean;
isValidHierarchicalCommand(
commandName: string,
commandArguments: string[]
): Promise<boolean>;
getChildrenCommandsNames(commandName: string): string[];
buildHierarchicalCommand(
parentCommandName: string,
commandLineArguments: string[]
): any;
publicApi: any;
/**
* Defines if it's allowed to override already required module.
* This can be used in order to allow redefinition of modules, for example $logger can be replaced by a plugin.
* Default value is false.
*/
overrideAlreadyRequiredModule: boolean;
}
declare var $injector: IInjector;