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
|
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
declare namespace AMDLoader {
interface ILoaderPlugin {
load: (pluginParam: string, parentRequire: IRelativeRequire, loadCallback: IPluginLoadCallback, options: IConfigurationOptions) => void;
write?: (pluginName: string, moduleName: string, write: IPluginWriteCallback) => void;
writeFile?: (pluginName: string, moduleName: string, req: IRelativeRequire, write: IPluginWriteFileCallback, config: IConfigurationOptions) => void;
finishBuild?: (write: (filename: string, contents: string) => void) => void;
}
interface IRelativeRequire {
(dependencies: string[], callback: Function, errorback?: (error: Error) => void): void;
toUrl(id: string): string;
}
interface IPluginLoadCallback {
(value: any): void;
error(err: any): void;
}
interface IConfigurationOptions {
isBuild: boolean | undefined;
[key: string]: any;
}
interface IPluginWriteCallback {
(contents: string): void;
getEntryPoint(): string;
asModule(moduleId: string, contents: string): void;
}
interface IPluginWriteFileCallback {
(filename: string, contents: string): void;
getEntryPoint(): string;
asModule(moduleId: string, contents: string): void;
}
}
|