Describe the bug
Initial operations array is typed as never[], resulting in ts errors when operations are pushed into the array.
To Reproduce
- From an app directory, run
shopify app generate extension
- Select
Discount - Function
- After naming the discount, select
Typescript
In src/cart_lines_discounts_generate_run.ts lines 37-84 are highlighted with a typescript error
Expected behavior
Starter templates should use valid typescript
This issue can be resolved by typing operations as follows:
const operations: CartLinesDiscountsGenerateRunResult['operations'] = [];
Describe the bug
Initial
operationsarray is typed as never[], resulting in ts errors when operations are pushed into the array.To Reproduce
shopify app generate extensionDiscount - FunctionTypescriptIn
src/cart_lines_discounts_generate_run.tslines 37-84 are highlighted with a typescript errorExpected behavior
Starter templates should use valid typescript
This issue can be resolved by typing
operationsas follows:const operations: CartLinesDiscountsGenerateRunResult['operations'] = [];