From d84e2f164505b0b4ee530aad18c4e25263848b26 Mon Sep 17 00:00:00 2001 From: Kenneth Geisshirt Date: Fri, 25 May 2018 15:55:46 +0200 Subject: [PATCH] Fixing TypeScript definition of `Realm.objects()` and `Realm.objectForPrimaryKety()`. --- CHANGELOG.md | 3 ++- lib/index.d.ts | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 13ad0c4f..e91aac3c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/lib/index.d.ts b/lib/index.d.ts index 05997e81..93a04aba 100644 --- a/lib/index.d.ts +++ b/lib/index.d.ts @@ -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(type: string | Realm.ObjectSchema | Function, key: number | string): T | undefined; + objectForPrimaryKey(type: string | Realm.ObjectType | Function, key: number | string): T | undefined; /** * @param {string|Realm.ObjectType|Function} type * @returns Realm */ - objects(type: string | Realm.ObjectSchema | Function): Realm.Results; + objects(type: string | Realm.ObjectType | Function): Realm.Results; /** * @param {string} name