Skip to content

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