Merge pull request #1816 from realm/kneth/fix-ts-objects

Fixing TypeScript definition of `Realm.objects()` and `Realm.objectFrPrimaryKey()`
This commit is contained in:
Kenneth Geisshirt 2018-05-30 15:29:18 +02:00 committed by GitHub
commit e82ba2cf50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 7 deletions

View File

@ -1,4 +1,4 @@
2.8.0 Release notes (YYYY-MM-DD)
X.Y.Z Release notes
=============================================================
### Compatibility
* Sync protocol: 24
@ -6,22 +6,28 @@
* File format: 7
* Realm Object Server: 3.0.0 or later
### Notes
The feature known as Partial synchronization has been renamed to Query-based synchronization and is now the default mode
for synchronized Realms. This has impacted a number of APIs. See below for the details.
### Deprecated
* [Sync] `Realm.Configuration.SyncConfiguration.partial` has been deprecated in favor of `Realm.Configuration.SyncConfiguration.fullSynchronization`.
* [Sync] `Realm.automaticSyncConfiguration()` has been deprecated in favor of `Realm.Sync.User.createConfiguration()`
### Enhancements
### Breaking changes
* None.
### Enhancements
* [Sync] `Realm.Configuration.SyncConfiguration.fullSynchronization` has been added.
* [Sync] `Realm.Sync.User.createConfiguration(config)` has been added for creating default and user defined sync configurations.
### Internal
### Bug fixes
* Fixed TypeScript definition of `Realm.objects()` and `Realm.objectForPrimaryKey()` (#1803).
### Internal
* [Sync] `Realm.Configuration.SyncConfig._disablePartialSyncUrlChecks` has been renamed to `Realm.Configuration.sync._disableQueryBasedSyncUrlChecks`.
* Realm Sync v3.3.0.
* Realm Core v5.6.0.
2.7.0 Release notes (2018-5-29)
@ -40,6 +46,7 @@ for synchronized Realms. This has impacted a number of APIs. See below for the d
* Added schema change listener to `Realm.addListener()` (#1825).
### Bug fixes
* Fixed `Realm.open()` to work without passing a config.
* Fixed a bug in `Realm.open()` to work without passing a config.
### Internal

6
lib/index.d.ts vendored
View File

@ -664,17 +664,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