Skip to content

Commit

Permalink
Merge pull request #660 from Shopify/liz/update-app-config-type
Browse files Browse the repository at this point in the history
Update AppConfig type to readonly
  • Loading branch information
lizkenyon authored Feb 23, 2024
2 parents 835dd9f + 9c626d2 commit fb1317f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .changeset/mighty-bikes-sneeze.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@shopify/shopify-app-remix": patch
---

Update AppConfig type to Readonly. The config should not be modified after it is created.

2 changes: 1 addition & 1 deletion packages/shopify-app-remix/src/server/shopify-app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export function shopifyApp<
Resources extends ShopifyRestResources,
Storage extends SessionStorage,
Future extends FutureFlagOptions = Config['future'],
>(appConfig: Config): ShopifyApp<Config> {
>(appConfig: Readonly<Config>): ShopifyApp<Config> {
const api = deriveApi(appConfig);
const config = deriveConfig<Storage>(appConfig, api.config);
const logger = overrideLogger(api.logger);
Expand Down

0 comments on commit fb1317f

Please sign in to comment.