Add Connection class
This commit is contained in:
4
web3.js/flow-typed/jayson.js
vendored
Normal file
4
web3.js/flow-typed/jayson.js
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
declare module 'jayson/lib/client/browser' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
27
web3.js/flow-typed/node-fetch.js
vendored
Normal file
27
web3.js/flow-typed/node-fetch.js
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
declare module 'node-fetch' {
|
||||
declare export type Config = {
|
||||
method?: string;
|
||||
headers?: {[key: string]: string};
|
||||
compress?: bool;
|
||||
body?: Buffer|string;
|
||||
size?: number;
|
||||
}
|
||||
|
||||
declare export class Headers {
|
||||
get(name: string): ?string;
|
||||
set(name: string, value: string): void;
|
||||
}
|
||||
|
||||
declare export class Response {
|
||||
url: string;
|
||||
status: string;
|
||||
statusText: string;
|
||||
headers: Headers;
|
||||
ok: bool;
|
||||
|
||||
json(): Promise<Object>;
|
||||
text(): Promise<string>;
|
||||
}
|
||||
|
||||
declare export default (url: string, config?: Config) => Promise<Response>;
|
||||
}
|
5
web3.js/flow-typed/superstruct.js
vendored
Normal file
5
web3.js/flow-typed/superstruct.js
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
declare module 'superstruct' {
|
||||
declare module.exports: {
|
||||
struct(schema: any): any;
|
||||
}
|
||||
}
|
1
web3.js/flow-typed/tweetnacl.js
vendored
1
web3.js/flow-typed/tweetnacl.js
vendored
@ -7,6 +7,7 @@ declare module "tweetnacl" {
|
||||
declare module.exports: {
|
||||
sign: {
|
||||
keyPair(): KeyPair;
|
||||
detached(text: Buffer, secretKey: Buffer): Buffer;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user