shelving 1.47.2 → 1.47.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/db/Database.d.ts +2 -2
- package/db/Database.js +1 -1
- package/package.json +1 -1
package/db/Database.d.ts
CHANGED
|
@@ -163,8 +163,8 @@ export declare class DatabaseDocument<T extends Data = Data> implements Observab
|
|
|
163
163
|
}
|
|
164
164
|
/** Database data embeds the corresponding `Document` instance and string ID into the data. */
|
|
165
165
|
export declare type DocumentData<T extends Data> = T & {
|
|
166
|
-
|
|
167
|
-
|
|
166
|
+
id: string;
|
|
167
|
+
doc: DatabaseDocument<T>;
|
|
168
168
|
};
|
|
169
169
|
/** Get the data for a document from a result for that document. */
|
|
170
170
|
export declare function getDocumentData<T extends Data>(result: Result<T>, ref: DatabaseDocument<T>): DocumentData<T>;
|
package/db/Database.js
CHANGED
|
@@ -259,7 +259,7 @@ export class DatabaseDocument {
|
|
|
259
259
|
/** Get the data for a document from a result for that document. */
|
|
260
260
|
export function getDocumentData(result, ref) {
|
|
261
261
|
if (result)
|
|
262
|
-
return { ...result,
|
|
262
|
+
return { ...result, id: ref.id, doc: ref };
|
|
263
263
|
throw new DocumentRequiredError(ref);
|
|
264
264
|
}
|
|
265
265
|
/** Get the data for a document from a result for that document. */
|