Improve types/documentation.

Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
This commit is contained in:
Eric Peterson
2021-07-06 10:14:00 +02:00
committed by Eric Peterson
parent 5fe0c2ce78
commit 790f02c898
3 changed files with 11 additions and 5 deletions
@@ -221,7 +221,7 @@ export class DocsBuilder {
});
// Invalidate the cache for any published objects.
if (this.cache && published?.objects?.length) {
if (this.cache && published && published?.objects?.length) {
await this.cache.invalidateMultiple(published.objects);
}
+1 -1
View File
@@ -100,7 +100,7 @@ export const createCacheMiddleware = ({
// Monkey-patch the response's socket to keep track of chunks as they are
// written over the wire.
socket.write = (
data,
data: string | Uint8Array,
encoding?: BufferEncoding | ErrorCallback,
callback?: ErrorCallback,
) => {