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

[Experiment] feat(51556): support satisfies operator on functions/classes #57859

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

a-tarasyuk
Copy link
Contributor

Fixes #51556

@typescript-bot typescript-bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Mar 20, 2024
@typescript-bot
Copy link
Collaborator

Looks like you're introducing a change to the public API surface area. If this includes breaking changes, please document them on our wiki's API Breaking Changes page.

Also, please make sure @DanielRosenwasser and @RyanCavanaugh are aware of the changes, just as a heads up.

@alvis
Copy link

alvis commented Aug 7, 2024

@a-tarasyuk Really appreciate for your effort for making satisfies works on functions! Is this PR still in draft status or close to ship?

Plz consider adding it to typescript 5.6 🙏🏼 @DanielRosenwasser and @RyanCavanaugh

@a-tarasyuk
Copy link
Contributor Author

@alvis It's still a draft because there's no final consensus on certain cases. In addition, I think that version 5.6 won't include this feature...

I'm uncertain about the future of this feature, however, @RyanCavanaugh or @DanielRosenwasser might have more information.

Copy link

@louwers louwers left a comment

Choose a reason for hiding this comment

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

Looking forward to this functionality. I think the satisfies operator is already supported on functions, it's just not supported on function declarations.

Does this also bring support for @satisfies in JSDoc? Could you add tests for it? See my comment here for an example that is expected to work.

@a-tarasyuk
Copy link
Contributor Author

@louwers You're right — satisfies currently works only for expressions. I think it’s better to handle JSDoc support in a separate PR. This PR should focus on supporting satisfies for func declarations (and possibly class declarations #60849?).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support satisfies operator on functions
4 participants