Enable no implicit this (#2709)

* Enable no implicit this

* Fix this reference in order return utils
This commit is contained in:
Michał Droń 2022-11-30 11:11:28 +01:00 committed by GitHub
parent cf2b42f467
commit 20c69efe16
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View file

@ -56,12 +56,12 @@ class ReturnFormDataParser {
? this.formData.amount ? this.formData.amount
: undefined; : undefined;
private getParsedLineData = function< private getParsedLineData = <
T extends OrderReturnFulfillmentLineInput | OrderReturnLineInput T extends OrderReturnFulfillmentLineInput | OrderReturnLineInput
>( >(
itemsQuantities: FormsetQuantityData, itemsQuantities: FormsetQuantityData,
idKey: "fulfillmentLineId" | "orderLineId", idKey: "fulfillmentLineId" | "orderLineId",
): T[] { ): T[] => {
const { itemsToBeReplaced } = this.formData; const { itemsToBeReplaced } = this.formData;
return itemsQuantities.reduce((result, { value: quantity, id }) => { return itemsQuantities.reduce((result, { value: quantity, id }) => {

View file

@ -9,6 +9,7 @@
"target": "es5", "target": "es5",
"noUnusedLocals": true, "noUnusedLocals": true,
"noUnusedParameters": true, "noUnusedParameters": true,
"noImplicitThis": true,
"paths": { "paths": {
"@assets/*": ["assets/*"], "@assets/*": ["assets/*"],
"@locale/*": ["locale/*"], "@locale/*": ["locale/*"],