Skip to content

Commit 4092def

Browse files
authored
fix(types): turn any type into void where applicable
1 parent ced0c79 commit 4092def

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

types/index.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export type homebaseClient = {
6060
* Replaces the current db with one generated by `homebaseClient.dbToString()`.
6161
* @param {string} dbString - a serialized db string
6262
*/
63-
dbFromString: (dbString: string) => any,
63+
dbFromString: (dbString: string) => void,
6464
/**
6565
* Datoms are the smallest unit of data in the database, similar to a key-value pair with extra info.
6666
* @returns {Array.<Datom>} Returns all the datoms in the database.
@@ -70,7 +70,7 @@ export type homebaseClient = {
7070
* 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.
7171
* @param {transactListener} listener - A callback that provides an array of changedDatoms.
7272
*/
73-
addTransactListener: (listener: (changedDatoms: Datom[]) => any) => any,
73+
addTransactListener: (listener: (changedDatoms: Datom[]) => void) => void,
7474

7575
/**
7676
* This callback is displayed as part of the Requester class.
@@ -81,7 +81,7 @@ export type homebaseClient = {
8181
/**
8282
* Removes the transact listener. Only one transact listener is supported per homebaseClient instance.
8383
*/
84-
removeTransactListener: () => any,
84+
removeTransactListener: () => void,
8585
/**
8686
* Transacts data without triggering any listeners. Typically used to sync data from your backend into the client.
8787
* @param transaction - A database transaction.
@@ -103,7 +103,7 @@ export function HomebaseProvider(props: {config?:config, children:any}): any;
103103
* const [transact] = useTransact()
104104
* transact([{ todo: { name: "a new todo" } }])
105105
*/
106-
export function useTransact(): [(transaction:Transaction) => any];
106+
export function useTransact(): [(transaction:Transaction) => void];
107107

108108
/**
109109
* React hook to return a single entity by `lookup`.

0 commit comments

Comments
 (0)