Skip to content

Commit

Permalink
fix(types): turn any type into void where applicable
Browse files Browse the repository at this point in the history
  • Loading branch information
shrugs committed Dec 16, 2020
1 parent ced0c79 commit 4092def
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.<Datom>} Returns all the datoms in the database.
Expand All @@ -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.
Expand All @@ -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.
Expand All @@ -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`.
Expand Down

0 comments on commit 4092def

Please sign in to comment.