Skip to content

Commit

Permalink
chore: change context type to interface (#1508)
Browse files Browse the repository at this point in the history
* chore: change context type to interface

* fix: lint

---------

Co-authored-by: Tomasz Góral <[email protected]>
  • Loading branch information
jagoral and Tomasz Góral authored Apr 4, 2024
1 parent 5268b15 commit 0636236
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/random-name-tg.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@vue-storefront/magento-api": patch
---

[CHANGED] `Context` from type to interface to allow declaration merging.
3 changes: 2 additions & 1 deletion packages/api-client/src/types/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ import { ApiClientMethods, IntegrationContext } from "@vue-storefront/middleware
import { MagentoApiMethods } from "@vue-storefront/magento-types";
import { ClientInstance, Config } from "./setup";

export type Context = IntegrationContext<ClientInstance, Config, ApiClientMethods<MagentoApiMethods>>;
// eslint-disable-next-line @typescript-eslint/no-empty-interface -- Allow extending this interface
export interface Context extends IntegrationContext<ClientInstance, Config, ApiClientMethods<MagentoApiMethods>> {}

0 comments on commit 0636236

Please sign in to comment.