diff --git a/src/Query/index.d.ts b/src/Query/index.d.ts index 6a13ec3b2..568d0993d 100644 --- a/src/Query/index.d.ts +++ b/src/Query/index.d.ts @@ -1,5 +1,5 @@ declare module '@nozbe/watermelondb/Query' { - import { Collection, ColumnName, Model, TableName, RawRecord } from '@nozbe/watermelondb' + import { Collection, ColumnName, Model, TableName, RecordState } from '@nozbe/watermelondb' import { AssociationInfo } from '@nozbe/watermelondb/Model' import { Condition, QueryDescription } from '@nozbe/watermelondb/QueryDescription' import { Observable } from 'rxjs' @@ -22,13 +22,13 @@ declare module '@nozbe/watermelondb/Query' { public fetch(): Promise - public experimentalFetchColumns(rawFields: ColumnName[]): Promise + public experimentalFetchColumns(rawFields: ColumnName[]): Promise public observe(): Observable public observeWithColumns(rawFields: ColumnName[]): Observable - public experimentalObserveColumns(rawFields: ColumnName[]): Observable + public experimentalObserveColumns(rawFields: ColumnName[]): Observable public fetchCount(): Promise diff --git a/src/RawRecord/index.d.ts b/src/RawRecord/index.d.ts index a7f21d557..7aa9f4b38 100644 --- a/src/RawRecord/index.d.ts +++ b/src/RawRecord/index.d.ts @@ -11,6 +11,11 @@ declare module '@nozbe/watermelondb/RawRecord' { last_modified: number | null } + export interface RecordState { + id: string + [k: string]: any + } + export function sanitizedRaw(dirtyRaw: DirtyRaw, tableSchema: TableSchema): RawRecord export function setRawSanitized( diff --git a/src/index.d.ts b/src/index.d.ts index 6b29751ea..74a67c450 100644 --- a/src/index.d.ts +++ b/src/index.d.ts @@ -11,7 +11,7 @@ declare module '@nozbe/watermelondb' { export { tableName, columnName, appSchema, tableSchema } from '@nozbe/watermelondb/Schema' export { DatabaseAdapter } from '@nozbe/watermelondb/adapters/type' - export { RawRecord, DirtyRaw } from '@nozbe/watermelondb/RawRecord' + export { RawRecord, DirtyRaw, RecordState } from '@nozbe/watermelondb/RawRecord' export { RecordId } from '@nozbe/watermelondb/Model' export { TableName,