[ember-data] DS.Store.unloadAll() modelName argument is optional.

This commit is contained in:
Jonathan Viney
2018-10-26 11:27:38 +13:00
parent 0e0e730ec8
commit e2eb3285b8
4 changed files with 8 additions and 2 deletions
+1 -1
View File
@@ -1132,7 +1132,7 @@ export namespace DS {
* This method unloads all records in the store.
* It schedules unloading to happen during the next run loop.
*/
unloadAll<K extends keyof ModelRegistry>(modelName: K): void;
unloadAll<K extends keyof ModelRegistry>(modelName?: K): void;
/**
* DEPRECATED:
* This method has been deprecated and is an alias for store.hasRecordForId, which should
+3
View File
@@ -205,3 +205,6 @@ declare module 'ember-data/types/registries/serializer' {
assertType<UserAdapter>(store.adapterFor('user'));
assertType<UserSerializer>(store.serializerFor('user'));
store.unloadAll();
store.unloadAll('user');
+1 -1
View File
@@ -1094,7 +1094,7 @@ export namespace DS {
* This method unloads all records in the store.
* It schedules unloading to happen during the next run loop.
*/
unloadAll<K extends keyof ModelRegistry>(modelName: K): void;
unloadAll<K extends keyof ModelRegistry>(modelName?: K): void;
/**
* DEPRECATED:
* This method has been deprecated and is an alias for store.hasRecordForId, which should
+3
View File
@@ -203,3 +203,6 @@ declare module 'ember-data' {
assertType<UserAdapter>(store.adapterFor('user'));
assertType<UserSerializer>(store.serializerFor('user'));
store.unloadAll();
store.unloadAll('user');