Fixing TypeScript definition of Realm.objects() and Realm.objectForPrimaryKety().

This commit is contained in:
Kenneth Geisshirt 2018-05-25 15:55:46 +02:00
parent 16bea5f42b
commit d84e2f1645
2 changed files with 5 additions and 4 deletions

View File

@ -9,7 +9,8 @@ x.x.x Release notes (xxxx-xx-xx)
* None
### Bug fixes
* Fix `Realm.open()` to work without passing a config.
* Fixed `Realm.open()` to work without passing a config.
* Fixed TypeScript definition of `Realm.objects()` and `Realm.objectForPrimaryKety()`.
### Internal

6
lib/index.d.ts vendored
View File

@ -651,17 +651,17 @@ declare class Realm {
deleteAll(): void;
/**
* @param {string|Realm.ObjectSchema|Function} type
* @param {string|Realm.ObjectType|Function} type
* @param {number|string} key
* @returns {T | undefined}
*/
objectForPrimaryKey<T>(type: string | Realm.ObjectSchema | Function, key: number | string): T | undefined;
objectForPrimaryKey<T>(type: string | Realm.ObjectType | Function, key: number | string): T | undefined;
/**
* @param {string|Realm.ObjectType|Function} type
* @returns Realm
*/
objects<T>(type: string | Realm.ObjectSchema | Function): Realm.Results<T>;
objects<T>(type: string | Realm.ObjectType | Function): Realm.Results<T>;
/**
* @param {string} name