thisdot / open-source

Repository for open source packages
MIT License
34 stars 11 forks source link

In the documentation, the `getIndexedDb` method is not present for the typings #74

Closed TapaiBalazs closed 2 years ago

TapaiBalazs commented 2 years ago

What package and version are you using?

cypress-indexeddb@1.0.0

What browser are you using?

-

What operating system are you using?

OSX

Actual Behavior

The documentation published to npmjs.org says the following:

declare namespace Cypress {
  interface Chainable<Subject> {
    clearIndexedDb(databaseName: string): void;
    openIndexedDb(databaseName: string, version?: number): Chainable<IDBDatabase>;
    createObjectStore(storeName: string): Chainable<IDBObjectStore>;
    getStore(storeName: string): Chainable<IDBObjectStore>;
    createItem(key: string, value: unknown): Chainable<IDBObjectStore>;
    readItem<T = unknown>(key: IDBValidKey | IDBKeyRange): Chainable<T>;
    updateItem(key: string, value: unknown): Chainable<IDBObjectStore>;
    deleteItem(key: string): Chainable<IDBObjectStore>;
  }
}

Expected Behavior

The documentation published to npmjs.org should say the following:

declare namespace Cypress {
  interface Chainable<Subject> {
    clearIndexedDb(databaseName: string): void;
    openIndexedDb(databaseName: string, version?: number): Chainable<IDBDatabase>;
   // here:
    getIndexedDb(databaseName: string): Chainable<IDBDatabase>;

    createObjectStore(storeName: string): Chainable<IDBObjectStore>;
    getStore(storeName: string): Chainable<IDBObjectStore>;
    createItem(key: string, value: unknown): Chainable<IDBObjectStore>;
    readItem<T = unknown>(key: IDBValidKey | IDBKeyRange): Chainable<T>;
    updateItem(key: string, value: unknown): Chainable<IDBObjectStore>;
    deleteItem(key: string): Chainable<IDBObjectStore>;
  }
}

Reproduction

See: https://www.npmjs.com/package/@this-dot/cypress-indexeddb

Additional Information

No response