summaryrefslogtreecommitdiff
path: root/std/io/writers.ts
diff options
context:
space:
mode:
authorSamrith Shankar <samrith-s@users.noreply.github.com>2020-03-20 14:38:34 +0100
committerGitHub <noreply@github.com>2020-03-20 09:38:34 -0400
commit798904b0f2ed0c7284b67bba2f125f406b5850de (patch)
tree5aba8d35aa8984aa778c894258bcaed56f1ce17c /std/io/writers.ts
parent35f6e2e45ddb96524a6bdf54b0a6155caa88d5e0 (diff)
Add require-await lint rule (#4401)
Diffstat (limited to 'std/io/writers.ts')
-rw-r--r--std/io/writers.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/std/io/writers.ts b/std/io/writers.ts
index 722e0297f..b9a6a5e70 100644
--- a/std/io/writers.ts
+++ b/std/io/writers.ts
@@ -14,11 +14,11 @@ export class StringWriter implements Writer {
this.byteLength += c.byteLength;
}
- async write(p: Uint8Array): Promise<number> {
+ write(p: Uint8Array): Promise<number> {
this.chunks.push(p);
this.byteLength += p.byteLength;
this.cache = undefined;
- return p.byteLength;
+ return Promise.resolve(p.byteLength);
}
toString(): string {