Skip to content

Commit

Permalink
improve OpfsWorkerConfig port assignability
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-smart committed Nov 14, 2024
1 parent a2d3559 commit ed25c82
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/sql-sqlite-wasm/src/OpfsWorker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { AccessHandlePoolVFS } from "wa-sqlite/src/examples/AccessHandlePoolVFS.
* @since 1.0.0
*/
export interface OpfsWorkerConfig {
readonly port: MessagePort
readonly port: EventTarget & Pick<MessagePort, "postMessage">
readonly dbName: string
}

Expand All @@ -38,7 +38,7 @@ export const run = (
)

return yield* Effect.async<never>((_resume) => {
const onMessage = async (event: MessageEvent) => {
const onMessage = async (event: any) => {
const [id, sql, params] = event.data as [number, string, Array<any>]
try {
const results: Array<any> = []
Expand Down

0 comments on commit ed25c82

Please sign in to comment.