-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.d.ts
More file actions
62 lines (59 loc) · 1.52 KB
/
Copy pathindex.d.ts
File metadata and controls
62 lines (59 loc) · 1.52 KB
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
57
58
59
60
61
62
declare namespace GrpcWebPlugin {
type OutputType = 'js' | 'grpc-web';
type ImportStyleType = 'closure' | 'commonjs' | 'commonjs+dts' | 'typescript';
type WireFormatModeType = 'grpcwebtext' | 'grpcweb';
interface Options {
/**
* E.g. `'./protos'`.
*/
protoPath: string;
/**
* E.g. `['foo.proto', 'bar.proto']`.
*/
protoFiles: string[];
/**
* `'js'` or `'grpc-web'`.
*/
outputType: OutputType;
/**
* See [Import Style](https://github.com/grpc/grpc-web#import-style).
* Default: `closure`.
*/
importStyle?: ImportStyleType;
/**
* Enable it to serialize and deserialize your proto from the protocol buffers binary wire format.
* Default: `false`.
*/
binary?: boolean;
/**
* See [Wire Format Mode](https://github.com/grpc/grpc-web#wire-format-mode).
* Default: `grpcwebtext`.
*/
mode?: WireFormatModeType;
/**
* Default: `.`.
*/
outDir?: string;
/**
* Other configuration options, see `protoc -h`.
* Default: `[]`.
*/
extra?: string[];
/**
* Sync your generated codes with `.proto` files each time you run webpack.
* Default: `true`.
*/
synchronize?: boolean;
/**
* Watch `.proto` files and recompile whenever they change.
* Only works if `synchronize` is `true`.
* Default: `true`.
*/
watch?: boolean;
}
}
declare class GrpcWebPlugin {
constructor(options: GrpcWebPlugin.Options);
apply(compiler): void;
}
export = GrpcWebPlugin;