UNPKG

1.54 kBTypeScriptView Raw
1declare module 'systemjs-builder' {
2 import * as Promise from 'bluebird';
3
4 let Builder: Builder.BuilderConstructor;
5 namespace Builder {
6 export interface BuilderConstructor {
7 new (baseURL: string, cfg: any): BuilderInstance;
8 new (baseURL: string): BuilderInstance;
9 }
10
11 export interface BuilderInstance {
12 bundle(expressionOrTree: string | any, opts: any): Promise<Output>;
13 trace(expressionOrTree: string | any, opts: any): Promise<any>;
14 getDepCache(tree: any): any;
15 getCanonicalName(fileUrl: string): string;
16 config(config: any, saveForReset?: boolean, ignoreBaseURL?: boolean): void;
17 }
18
19 export interface Output {
20 source: string;
21 sourceMap: string;
22 modules: string[];
23 }
24 }
25 export = Builder;
26}
27
28declare module 'systemjs-builder/lib/utils.js' {
29 let Utils: Utils.Utils;
30 namespace Utils {
31 export interface Utils {
32 fromFileURL(url: string): string;
33 toFileURL(path: string): string;
34 }
35 }
36 export = Utils;
37}
38
39declare module 'rev-hash' {
40 function revHash(buf: Buffer): string;
41 namespace revHash {}
42 export = revHash;
43}
44
45declare module 'rev-path' {
46 function revPath(pth: string, hash: string): string;
47 namespace revPath {
48 export function revert(pth: string, hash: string): string;
49 }
50 export = revPath;
51}
52
53declare module 'globby' {
54 function globby(pattern: string, opts: any): Promise<string[]>;
55 namespace globby {
56 export function sync(patterns: string[], opts: { cwd: string }): string[];
57 }
58 export = globby;
59}