avoid more implicit any and some 💄

This commit is contained in:
Benjamin Pasero
2017-09-04 11:20:09 +02:00
parent 7712905526
commit bef497ff82
114 changed files with 282 additions and 296 deletions

View File

@@ -144,7 +144,7 @@ export function asText(context: IRequestContext): TPromise<string> {
}
let buffer: string[] = [];
context.stream.on('data', d => buffer.push(d));
context.stream.on('data', (d: string) => buffer.push(d));
context.stream.on('end', () => c(buffer.join('')));
context.stream.on('error', e);
});
@@ -165,7 +165,7 @@ export function asJson<T>(context: IRequestContext): TPromise<T> {
}
const buffer: string[] = [];
context.stream.on('data', d => buffer.push(d));
context.stream.on('data', (d: string) => buffer.push(d));
context.stream.on('end', () => c(JSON.parse(buffer.join(''))));
context.stream.on('error', e);
});