see https export interface CRUDEngineBase { param tableName param primaryKey param entity returns create < EntityType = Object , PrimaryKey = string > ( tableName , primaryKey , entity ) : Promise < PrimaryKey > ; param tableName param primaryKey throws returns read < EntityType = Object , PrimaryKey = string > ( tableName , primaryKey ) : Promise < EntityType > ; param tableName param primaryKey param changes returns update < PrimaryKey = string , ChangesType = Object > ( tableName , primaryKey , changes ) : Promise < PrimaryKey > ; param tableName param primaryKey returns delete < PrimaryKey = string > ( tableName , primaryKey ) : Promise < PrimaryKey > ; } /**
 * Interface definition for CRUD operations with support for collections.
 */ export interface CRUDEngineBaseCollection extends CRUDEngineBase { /**
     * Reads all records from a table.
     */ readAll < EntityType > ( tableName ) : Promise < EntityType [ ] > ; /**
     * Returns all primary keys of records that are stored in a table.
     */ readAllPrimaryKeys ( tableName ) : Promise < string [ ] > ; param tableName returns deleteAll ( tableName ) : Promise < boolean > ; } /**
 * Extends collection-aware CRUD operations with convenience methods for practical usage in web applications (such as "Wire for Web").
 */ export interface CRUDEngine extends CRUDEngineBaseCollection { [ index ] : any ; returns clearTables ( ) : Promise < void > ; param storeName param settings returns throws init ( storeName , ... settings ) : Promise < any > ; returns isSupported ( ) : Promise < void > ; returns purge ( ) : Promise < void > ; storeName : string ; param tableName param primaryKey param changes returns updateOrCreate < PrimaryKey = string , ChangesType = Object > ( tableName , primaryKey , changes ) : Promise < PrimaryKey > ; }