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

feat: add ability to extend hermione.ctx typings #888

Merged
merged 2 commits into from
Mar 27, 2024

Conversation

KuznetsovRoman
Copy link
Member

@KuznetsovRoman KuznetsovRoman commented Mar 27, 2024

Resolves #883

Usage example

  • Extend interface HermioneCtx from module "hermione":
// global.d.ts
import type { HermioneCtx } from "hermione";

declare module "hermione" {
  interface HermioneCtx {
    someVariable: string;
  }
}
  • Use hermione.ctx with extended typings:
hermione.ctx.someVariable // string

@KuznetsovRoman KuznetsovRoman merged commit 78fa5fa into master Mar 27, 2024
2 checks passed
@KuznetsovRoman KuznetsovRoman deleted the feat/issue/883 branch March 27, 2024 12:13
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.

hermione.ctx нельзя типизировать
2 participants