Skip to content

Commit

Permalink
ignore incorrect TS error
Browse files Browse the repository at this point in the history
  • Loading branch information
BYK committed Aug 28, 2024
1 parent 82ee0bd commit 7e75cb3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/overlay/src/lib/db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ export const OBJECT_STORE_NAME = 'events';
export const DB_VERSION = 2;

function promiseWithResolvers<T = unknown>() {
let reject: (value: T | PromiseLike<T>) => void;
let resolve: (reason?: unknown) => void;
let resolve: (value: T | PromiseLike<T>) => void;
let reject: (reason?: unknown) => void;
const promise = new Promise((rs, rj) => {
resolve = rs;
reject = rj;
});
// @ts-expect-error ts2454 -- This is not a valid error as the promise constructor callback is executed immediately
return { resolve, reject, promise };
}

Expand Down

0 comments on commit 7e75cb3

Please sign in to comment.