Improve log events types

This commit is contained in:
Leonid Logvinov 2017-10-25 18:47:31 +03:00
parent 73d13d61a7
commit 6eb5411029
No known key found for this signature in database
GPG Key ID: 0DD294BFDE8C95D4

View File

@ -114,15 +114,22 @@ declare module 'web3' {
type LogTopic = null|string|string[]; type LogTopic = null|string|string[];
interface SolidityEvent<A> { interface DecodedLogEntry<A> extends LogEntry {
event: string; event: string;
address: string;
args: A; args: A;
} }
interface DecodedLogEntryEvent<A> extends DecodedLogEntry<A> {
removed: boolean;
}
interface LogEntryEvent extends LogEntry {
removed: boolean;
}
interface FilterResult { interface FilterResult {
get(callback: () => void): void; get(callback: () => void): void;
watch<A>(callback: (err: Error, result: SolidityEvent<A>) => void): void; watch(callback: (err: Error, result: LogEntryEvent) => void): void;
stopWatching(callback: () => void): void; stopWatching(callback: () => void): void;
} }