Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing updated types for examples #218

Closed
thegoldenmule opened this issue Oct 9, 2024 · 3 comments
Closed

Missing updated types for examples #218

thegoldenmule opened this issue Oct 9, 2024 · 3 comments

Comments

@thegoldenmule
Copy link

When attempting to use some of the examples from a Typescript app, the type information is outdated or missing. For example:

// this is missing type info and typescript complains
import { IDBBatchAtomicVFS } from "wa-sqlite/src/examples/IDBBatchAtomicVFS.js";

I can get this work locally by adding to the index.d.ts:

** @ignore */
declare module 'wa-sqlite/src/examples/IDBBatchAtomicVFS.js' {
  import * as VFS from "wa-sqlite/src/VFS.js";

  export interface VFSOptions {
    durability?: "default" | "strict" | "relaxed";
    purge?: "deferred" | "manual";
    purgeAtLeast?: number;
  }

  export class IDBBatchAtomicVFS extends VFS.Base {
    constructor(idbDatabaseName:string, options: VFSOptions)
  }
}

Happy to make a PR if you'd like, but I was unsure if that index.d.ts was generated or not.

@rhashimoto
Copy link
Owner

index.d.ts was only machine-generated at creation, and has been updated manually since then. Feel free to submit a PR.

@thegoldenmule
Copy link
Author

@rhashimoto Thanks. I've made the PR here: #220

@rhashimoto
Copy link
Owner

Closing as PR was withdrawn.

@rhashimoto rhashimoto closed this as not planned Won't fix, can't repro, duplicate, stale Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants