1 | declare module 'bower' {
|
2 |
|
3 |
|
4 |
|
5 | export interface Config {
|
6 | color?: boolean;
|
7 | cwd?: string;
|
8 | directory?: string;
|
9 | interactive?: boolean;
|
10 | save?: boolean;
|
11 | offline?: boolean;
|
12 | }
|
13 |
|
14 | export const commands: {
|
15 | install(packages: string[], installOptions: {}, config: Config):
|
16 | NodeJS.EventEmitter;
|
17 | list(readOptions: {}, config: Config): NodeJS.EventEmitter;
|
18 | };
|
19 |
|
20 | export const config: Config;
|
21 |
|
22 | export type LogData = Warning|Conflict;
|
23 |
|
24 | export interface Warning {
|
25 | level: 'warn';
|
26 | id: string;
|
27 | message: string;
|
28 |
|
29 | }
|
30 | export interface Conflict {
|
31 | level: 'conflict';
|
32 | id: 'incompatible'|string;
|
33 | message: string;
|
34 | data: {
|
35 |
|
36 | name: string; picks: Pick[];
|
37 | }
|
38 | }
|
39 |
|
40 | export interface Pick {
|
41 |
|
42 | endpoint: {
|
43 | name: string;
|
44 |
|
45 | source: string;
|
46 |
|
47 | target: string;
|
48 | };
|
49 |
|
50 | canonicalDir: string;
|
51 |
|
52 | pkgMeta: {
|
53 | name: string; version: string;
|
54 |
|
55 |
|
56 | |
57 |
|
58 |
|
59 |
|
60 |
|
61 |
|
62 |
|
63 |
|
64 |
|
65 |
|
66 |
|
67 |
|
68 |
|
69 |
|
70 |
|
71 | },
|
72 | }
|
73 | }
|
74 |
|
75 | declare module 'bower/lib/config' {
|
76 | import {Config} from 'bower';
|
77 | const defaultConfig: (config: any) => Config;
|
78 | export = defaultConfig;
|
79 | }
|
80 |
|
81 | declare module 'bower/lib/renderers/StandardRenderer' {
|
82 | import {Config, LogData} from 'bower';
|
83 | class StandardRenderer {
|
84 | constructor(command: string, config: Config);
|
85 | log(data: LogData): void;
|
86 | end(data: any): void;
|
87 | error(error: Error): void;
|
88 | }
|
89 | export = StandardRenderer;
|
90 | }
|
91 |
|
92 | declare module 'bower/lib/core/Project' {
|
93 | import {Config} from 'bower';
|
94 | import Logger = require('bower-logger');
|
95 | class Project {
|
96 | constructor(config: Config, logger: Logger);
|
97 | install(endpoints: string[], options: any, config: Config): void;
|
98 | }
|
99 | export = Project;
|
100 | }
|