adhoc fix js-data/js-data.d.ts and js-data-http/js-data-http-tests.ts

This commit is contained in:
vvakame
2015-09-03 21:10:37 +09:00
parent 35da2f0db2
commit e02dc634d6
2 changed files with 6 additions and 6 deletions
+3 -3
View File
@@ -28,7 +28,7 @@ ADocument.inject({ id: 5, author: 'John' });
ADocument.inject({ id: 6, author: 'John' });
// bypass the data store
adapter.updateAll(ADocument, { author: 'Johnny' }, { author: 'John' }).then(function (documents) {
adapter.updateAll<{ id?: number; author: string; }>(ADocument, { author: 'Johnny' }, { author: 'John' }).then(function (documents) {
documents[0]; // { id: 5, author: 'Johnny' }
// The updated documents have NOT been injected into the data store because we bypassed the data store
@@ -37,7 +37,7 @@ adapter.updateAll(ADocument, { author: 'Johnny' }, { author: 'John' }).then(func
});
// Normally you would just go through the data store
ADocument.updateAll({ author: 'Johnny' }, { author: 'John' }).then(function (documents) {
ADocument.updateAll<{ id?: number; author: string; }>({ author: 'Johnny' }, { author: 'John' }).then(function (documents) {
documents[0]; // { id: 5, author: 'Johnny' }
// the updated documents have been injected into the data store
@@ -164,4 +164,4 @@ ADocument.create({ author: 'John' }).then(function (document:any) {
// the new document has been injected into the data store
ADocument.get(document.id); // { id: 5, author: 'John' }
});
});