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

feat: Added TypeScript definitions #2916

Merged
merged 2 commits into from Aug 24, 2023
Merged

Conversation

seebeen
Copy link
Member

@seebeen seebeen commented Aug 21, 2023

These type definitions are feature complete and include all of the interfaces, options and callbacks from the main semantic-release package.

Fully implemented TS definitions for semantic-release package
Copy link
Member

@gr2m gr2m left a comment

Choose a reason for hiding this comment

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

should we add type tests with tsd, at least some basic ones that we can add to as needed?

Comment on lines +1 to +3
declare interface AggregateError extends Error {
errors: any[];
}
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

we're still using the library rather than the built-in. i think there is something that would make the switch a breaking change, but i do think we should migrate

Copy link
Member Author

Choose a reason for hiding this comment

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

We need to defined it because we can't cross-reference node types easily.
It's builtin since node 15.

@seebeen
Copy link
Member Author

seebeen commented Aug 23, 2023

should we add type tests with tsd, at least some basic ones that we can add to as needed?

I can add those later in. The typedef file added in this PR is also in @semantic-release/wordpress, and in a PR https://github.com/DefinitelyTyped/DefinitelyTyped/pull/66223.

Since that PR won't be merged anytime soon, let's roll our own, and I can implement a full typechecking test later on.

@travi travi changed the title Implented typescript definitions feat: Added TypeScript definitions Aug 24, 2023
@travi travi merged commit c21a1ac into semantic-release:master Aug 24, 2023
4 checks passed
@github-actions
Copy link

🎉 This PR is included in version 21.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants