From a973a93c6a530eb927ad146e90776285049ad0d7 Mon Sep 17 00:00:00 2001 From: Timo Bechtel Date: Sun, 17 Oct 2021 19:22:11 +0200 Subject: [PATCH] fix(typescript): allow using types without providing a generic type would break code where a ChainReference or SocketDBClientAPI type was used as it required generics. added any as default generic type --- src/client.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client.ts b/src/client.ts index 45c8bcd..aeeca99 100644 --- a/src/client.ts +++ b/src/client.ts @@ -17,7 +17,7 @@ import { createStore, Store } from './store'; import { BatchedUpdate, createUpdateBatcher } from './updateBatcher'; import { deepClone, isObject, mergeDiff } from './utils'; -export type SocketDBClientAPI = { +export type SocketDBClientAPI = { disconnect: () => void; } & ChainReference; @@ -25,7 +25,7 @@ type Unsubscriber = () => void; type SchemaDefinition = KeyValue | Value; -export type ChainReference = { +export type ChainReference = { get( path: Schema extends KeyValue ? Key : never ): ChainReference;