Skip to content

Commit

Permalink
Fix return type of database extension store method (#715)
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Haines <[email protected]>
  • Loading branch information
haines authored Oct 9, 2023
1 parent e175f4c commit 0912c4c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/extension-database/src/Database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export interface DatabaseConfiguration {
/**
* Pass a function to store updates in your database.
*/
store: (data: storePayload) => void,
store: (data: storePayload) => Promise<void>,
}

export class Database implements Extension {
Expand All @@ -25,7 +25,7 @@ export class Database implements Extension {
*/
configuration: DatabaseConfiguration = {
fetch: async () => null,
store: async () => null,
store: async () => {},
}

/**
Expand Down Expand Up @@ -55,7 +55,7 @@ export class Database implements Extension {
* Store new updates in the database.
*/
async onStoreDocument(data: onChangePayload) {
return this.configuration.store({
await this.configuration.store({
...data,
state: Buffer.from(
Y.encodeStateAsUpdate(data.document),
Expand Down

0 comments on commit 0912c4c

Please sign in to comment.