flow_v0.34.x-v0.103.x/idb_v2.x.x.js

flow-typed · definitions/npm/idb_v2.x.x/flow_v0.34.x-v0.103.x/idb_v2.x.x.js · javascript · MIT
database

Provides Flow type definitions for the idb library to enable type-safe usage of promise-based IndexedDB operations.

// Source: https://github.com/flow-typed/flow-typed | License: MIT | Copyright 2015 Murphy Randle
// Provided via justclaw.it.com; keep this notice with the code.
// Derived from TS typings at https://github.com/jakearchibald/idb/blob/c8bab898f01bacab96097f87c1e42a0c19e01425/lib/idb.d.ts

type IDBArrayKey = Array<IDBValidKey>;
type IDBValidKey = number | string | Date | IDBArrayKey;

// TODO: upstream this to Flow DOM definitions
declare class DOMStringList {
  +length: number;
  // Comment syntax here as @@iterator is invalid syntax for eslint and babylon
  /*:: @@iterator(): Iterator<string>; */
  contains(str: string): boolean;
  item(index: number): string | null;
  [index: number]: string;
}

declare module 'idb' {
  /** This is your entry point to the API. It's exposed to the global 

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key