Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: premature TS deprecation warning #3243

Merged
merged 2 commits into from
Sep 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
x.x.x Release notes (yyyy-MM-dd)
=============================================================
### Enhancements
* None.

### Fixed
* Fixed `create<T>(...)` deprecation warning. ([#3243](https://github.com/realm/realm-js/pull/3243))

### Compatibility
* MongoDB Realm Cloud.
* APIs are backwards compatible with all previous releases of Realm JavaScript in the 10.x.y series.
* File format: generates Realms with format v20 (reads and upgrades file format v5 or later for non-synced Realm, upgrades file format v10 for synced Realms).

### Internal
* None.

10.0.0 Release notes (2020-9-18)
=============================================================
NOTE: Support for syncing with realm.cloud.io and/or Realm Object Server has been replaced with support for syncing with MongoDB Realm Cloud.
Expand Down
24 changes: 12 additions & 12 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -539,38 +539,38 @@ declare class Realm {
/**
* @param {string} type
* @param {T} properties
* @param {boolean} update?
* @param {Realm.UpdateMode} mode? If not provided, `Realm.UpdateMode.Never` is used.
* @returns T & Realm.Object
*
* @deprecated, to be removed in future versions. Use `create(type, properties, UpdateMode)` instead.
*/
create<T>(type: string, properties: RealmInsertionModel<T>, update?: boolean): T & Realm.Object
create<T>(type: string, properties: RealmInsertionModel<T>, mode?: Realm.UpdateMode): T & Realm.Object

/**
* @param {Class} type
* @param {T} properties
* @param {boolean} update?
* @param {Realm.UpdateMode} mode? If not provided, `Realm.UpdateMode.Never` is used.
* @returns T
*
* @deprecated, to be removed in future versions. Use `create(type, properties, UpdateMode)` instead.
*/
create<T extends Realm.Object>(type: {new(...arg: any[]): T; }, properties: RealmInsertionModel<T>, update?: boolean): T
create<T extends Realm.Object>(type: {new(...arg: any[]): T; }, properties: RealmInsertionModel<T>, mode?: Realm.UpdateMode): T

/**
* @param {string} type
* @param {T} properties
* @param {Realm.UpdateMode} mode? If not provided, `Realm.UpdateMode.Never` is used.
* @param {boolean} update?
* @returns T & Realm.Object
*
* @deprecated, to be removed in future versions. Use `create(type, properties, UpdateMode)` instead.
*/
create<T>(type: string, properties: RealmInsertionModel<T>, mode?: Realm.UpdateMode): T & Realm.Object
create<T>(type: string, properties: RealmInsertionModel<T>, update?: boolean): T & Realm.Object

/**
* @param {Class} type
* @param {T} properties
* @param {Realm.UpdateMode} mode? If not provided, `Realm.UpdateMode.Never` is used.
* @param {boolean} update?
* @returns T
*
* @deprecated, to be removed in future versions. Use `create(type, properties, UpdateMode)` instead.
*/
create<T extends Realm.Object>(type: {new(...arg: any[]): T; }, properties: RealmInsertionModel<T>, mode?: Realm.UpdateMode): T
create<T extends Realm.Object>(type: {new(...arg: any[]): T; }, properties: RealmInsertionModel<T>, update?: boolean): T

/**
* @param {Realm.Object|Realm.Object[]|Realm.List<any>|Realm.Results<any>|any} object
Expand Down