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

Improving documentation for realm #6508

Merged
merged 3 commits into from
Feb 28, 2024
Merged

Improving documentation for realm #6508

merged 3 commits into from
Feb 28, 2024

Conversation

kraenhansen
Copy link
Member

@kraenhansen kraenhansen commented Feb 26, 2024

What, How & Why?

After #6492 we're able to generate more clean documentation.
NOTE: This PR also introduce exports of a couple of types that we haven't historically exported, but was referenced by other public APIs.

@kraenhansen kraenhansen self-assigned this Feb 26, 2024
@cla-bot cla-bot bot added the cla: yes label Feb 26, 2024
@kraenhansen
Copy link
Member Author

This failure seems unrelated.

@kraenhansen kraenhansen merged commit 3cb9c46 into main Feb 28, 2024
30 of 31 checks passed
@kraenhansen kraenhansen deleted the kh/improved-docs-2 branch February 28, 2024 14:30
Copy link
Contributor

@elle-j elle-j left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making these updates!

export type ObjectChangeCallback<T> = (
/**
* The object that changed.
*/ object: RealmObject<T> & T,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
*/ object: RealmObject<T> & T,
*/
object: RealmObject<T> & T,

insertions: number[];
/**
* The indices in the collection where objects were modified.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* The indices in the collection where objects were modified.
* The indices in the collection where objects were deleted.

deletions: number[];
/**
* The indices in the collection where objects were modified.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* The indices in the collection where objects were modified.
* The indices in the new state of the collection where objects were modified.

newModifications: number[];
/**
* The indices in the collection where objects were deleted.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* The indices in the collection where objects were deleted.
* The indices in the old state of the collection where objects were modified.

export type CollectionChangeCallback<T = unknown, EntryType extends [unknown, unknown] = [unknown, unknown]> = (
/**
* The collection instance that changed,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* The collection instance that changed,
* The collection instance that changed.

@@ -1271,6 +1317,10 @@ export namespace Realm {
export import ObjectClass = internal.RealmObjectConstructor;
/** @deprecated Will be removed in v13.0.0. Please use {@link internal.PropertyTypeName} */
export import PropertyType = internal.PropertyTypeName;
/** @deprecated Use the another {@link internal.ClientResetMode} than {@link internal.ClientResetMode.Manual}. */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To show slightly friendlier names for users you can show just the part excluding internal. (e.g. as such: previous comment. (Just readding it because I don't know if you saw the other reply 👍 )

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't sure why you suggested that - but now it makes perfect sense. Thanks!

@@ -1,12 +1,12 @@
{
"entryPoints": ["src/index.ts"],
"tsconfig": "./tsconfig.json",
"entryPoints": ["dist/public-types/index.d.ts"],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

kraenhansen added a commit that referenced this pull request Feb 28, 2024
@kraenhansen
Copy link
Member Author

kraenhansen commented Feb 28, 2024

I've just pushed an update with your feedback: 6e60915

kraenhansen added a commit that referenced this pull request Feb 28, 2024
bimusiek pushed a commit to bimusiek/realm-js that referenced this pull request Mar 14, 2024
* Improving typedoc config

* Adding missing exports

* Update deprecated-global.ts
bimusiek pushed a commit to bimusiek/realm-js that referenced this pull request Mar 14, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants