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

Explict callback types in option #397

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

offich
Copy link

@offich offich commented Nov 24, 2024

fix: #398

Description

Improving callback types in option:

interface Options {
...
  beforeString?: (string: String, instance: TypeIt) => void | ((string: String, instance: TypeIt) => Promise<void>);
  afterString?: (string: String, instance: TypeIt) => void | ((string: String, instance: TypeIt) => Promise<void>);
  beforeStep?: (instance: TypeIt) => void | ((instance: TypeIt) => Promise<void>);
  afterStep?: (instance: TypeIt) => void | ((instance: TypeIt) => Promise<void>);
  afterComplete?: (instance: TypeIt) => void | ((instance: TypeIt) => Promise<void>);
...
}

Type of Change

  • It's a bug fix.
  • It's a new feature (without breaking changes).
  • It's a breaking change.

Checklist

  • Provided detailed description of the issue above.
  • Updated tests where appropriate.

License Agreement

[] By submitting this code, I'm aware that, if merged, it will be used as part of a commercial project. By submitting this pull request, I am aware that I'm giving my consent for my code to become a part of TypeIt or any of its related packages, and for it to be used and sold commercially.

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.

Explict callback types in option
1 participant