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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: improve def command #3788

Merged
merged 2 commits into from Aug 20, 2023
Merged

fix: improve def command #3788

merged 2 commits into from Aug 20, 2023

Conversation

kobenguyent
Copy link
Collaborator

@kobenguyent kobenguyent commented Jul 31, 2023

Motivation/Description of the PR

  • improve def command, so when we have multiple custom helpers, WithTranslation<Methods> would be enough instead of WithTranslation<GraphQL>, WithTranslation<CustomGraphQL>
/// <reference types='codeceptjs' />
type steps_file = typeof import('./steps_file');
type CustomGraphQL = import('./CustomGraphQL');

declare namespace CodeceptJS {
  interface SupportObject { I: I, current: any }
  interface Methods extends GraphQL, CustomGraphQL {}
  interface I extends ReturnType<steps_file>, WithTranslation<Methods> {}
  namespace Translation {
    interface Actions {}
  }
}

Type of change

  • 馃悰 Bug fix

Checklist:

  • Tests have been added
  • Documentation has been added (Run npm run docs)
  • Lint checking (Run npm run lint)
  • Local tests are passed (Run npm test)

@kobenguyent kobenguyent added enhancement typescript Changes for typings or typescript compatibility labels Jul 31, 2023
@Arhell Arhell requested a review from DavertMik August 1, 2023 00:08
@DavertMik DavertMik merged commit 9f8e582 into 3.x Aug 20, 2023
9 checks passed
@DavertMik DavertMik deleted the improve-def-command branch August 20, 2023 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement typescript Changes for typings or typescript compatibility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants