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

Add JSDocs #4598

Merged
merged 23 commits into from
Jan 8, 2024
Merged

Add JSDocs #4598

merged 23 commits into from
Jan 8, 2024

Conversation

davidkpiano
Copy link
Member

No description provided.

Copy link

changeset-bot bot commented Dec 17, 2023

⚠️ No Changeset found

Latest commit: b6ab35a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

codesandbox-ci bot commented Dec 17, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit b6ab35a:

Sandbox Source
XState Example Template Configuration
XState React Template Configuration

* Whether the current state value is a subset of the given parent state value.
* @param testValue
* Whether the current state value is a subset of the given partial state value.
* @param partialStateValue
Copy link
Member

Choose a reason for hiding this comment

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

partial sounds like literally a partial of the state value but for a state value like { a: 'b' } we can also test against 'a'

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, was just trying to figure out something less ambiguous than testValue, which doesn't suggest a state value

davidkpiano and others added 3 commits December 17, 2023 09:01
Co-authored-by: Mateusz Burzyński <[email protected]>
Co-authored-by: Mateusz Burzyński <[email protected]>
Co-authored-by: Mateusz Burzyński <[email protected]>
@ducin
Copy link

ducin commented Dec 17, 2023

One thing I'd like to add here is - it would be super cool to provide simple example of usage for most important functions, such as createActor or whatever. rxjs is an example package where internal impl. is full of explanations and examples. I know it might be quite some effort to get there, but at least simple usage examples would be very useful.

@davidkpiano
Copy link
Member Author

One thing I'd like to add here is - it would be super cool to provide simple example of usage for most important functions, such as createActor or whatever. rxjs is an example package where internal impl. is full of explanations and examples. I know it might be quite some effort to get there, but at least simple usage examples would be very useful.

The createActor function, as well as many other functions, do have examples in them 👍

Just some gaps that need to be filled

@@ -10,12 +10,26 @@ import {
IndexByProp
} from './types.ts';

/**
* @internal
Copy link
Member

Choose a reason for hiding this comment

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

Marking those as deprecated might blow up somewhere since they will disappear from the generated declaration files.

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 don't think it disappears from the generated declaration files: https://www.typescriptlang.org/play#example/jsdoc-deprecated

Copy link
Member

Choose a reason for hiding this comment

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

Sorry, I meant "marking those as internal"

@Andarist
Copy link
Member

Andarist commented Jan 8, 2024

Let's merge this sooner than later. We don't need a long-lived umbrella branch for this - those JSDoc improvements can land incrementally.

@davidkpiano davidkpiano marked this pull request as ready for review January 8, 2024 11:03
@davidkpiano davidkpiano merged commit 3f3c829 into main Jan 8, 2024
1 check passed
@davidkpiano davidkpiano deleted the davidkpiano/jsdoc-additions branch January 8, 2024 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants