From 4092defcd6db1a6975958b06f823da9f9712bf0c Mon Sep 17 00:00:00 2001 From: Matt Condon Date: Wed, 16 Dec 2020 00:07:01 -0500 Subject: [PATCH] fix(types): turn any type into void where applicable --- types/index.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/types/index.d.ts b/types/index.d.ts index 5c5ed3f6..36cf47ea 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -60,7 +60,7 @@ export type homebaseClient = { * Replaces the current db with one generated by `homebaseClient.dbToString()`. * @param {string} dbString - a serialized db string */ - dbFromString: (dbString: string) => any, + dbFromString: (dbString: string) => void, /** * Datoms are the smallest unit of data in the database, similar to a key-value pair with extra info. * @returns {Array.} Returns all the datoms in the database. @@ -70,7 +70,7 @@ export type homebaseClient = { * Adds a listener callback that fires after every transaction. Typically used to save data to a backend. Only one transact listener is supported per homebaseClient instance. * @param {transactListener} listener - A callback that provides an array of changedDatoms. */ - addTransactListener: (listener: (changedDatoms: Datom[]) => any) => any, + addTransactListener: (listener: (changedDatoms: Datom[]) => void) => void, /** * This callback is displayed as part of the Requester class. @@ -81,7 +81,7 @@ export type homebaseClient = { /** * Removes the transact listener. Only one transact listener is supported per homebaseClient instance. */ - removeTransactListener: () => any, + removeTransactListener: () => void, /** * Transacts data without triggering any listeners. Typically used to sync data from your backend into the client. * @param transaction - A database transaction. @@ -103,7 +103,7 @@ export function HomebaseProvider(props: {config?:config, children:any}): any; * const [transact] = useTransact() * transact([{ todo: { name: "a new todo" } }]) */ -export function useTransact(): [(transaction:Transaction) => any]; +export function useTransact(): [(transaction:Transaction) => void]; /** * React hook to return a single entity by `lookup`.