-
-
Notifications
You must be signed in to change notification settings - Fork 2
Add missing overloads #19
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 missing overloads #19
Conversation
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. Thanks for integrating Codecov - We've got you covered ☂️ |
JounQin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
Sorry, my bad. Got confused there for a moment. New type definitions: export default function remarkRetext(processor: Processor, options?: Options | null | undefined): TransformBridge;
export default function remarkRetext(parser: Parser, options?: Options | null | undefined): TransformMutate;
export default function remarkRetext(destination: Parser | Processor, options?: Options | null | undefined): TransformBridge | TransformMutate; |
|
I was applying this patch in Before: After: |
This comment has been minimized.
This comment has been minimized.
|
thanks, released in |
Initial checklist
Description of changes
This PR adds two more overloads to the
remarkRetextfunction to fix the TypeScript type definitions (see issue #18). One without any parameters and another with a common signature (as the compiler doesn't generate one without the@overloadtag).New overloads:
Resulting type definitions:
This removes the need for
@ts-expect-errorintest.jsand dependent projects.