-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from Teneff/bugfix
Fixes #6
- Loading branch information
Showing
11 changed files
with
312 additions
and
313 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,35 @@ | ||
{ | ||
"env": { | ||
"es2021": true, | ||
"es2020": true, | ||
"node": true | ||
}, | ||
"extends": ["plugin:@typescript-eslint/recommended"], | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"project": ["tsconfig.jest.json"], | ||
"ecmaVersion": 12, | ||
"sourceType": "module" | ||
"project": ["tsconfig.build.json"] | ||
}, | ||
"plugins": ["@typescript-eslint"], | ||
"rules": { | ||
"@typescript-eslint/no-explicit-any": "off" | ||
}, | ||
"overrides": [ | ||
{ | ||
"rules": { | ||
"@typescript-eslint/no-explicit-any": "off" | ||
}, | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"project": ["tsconfig.jest.json"] | ||
}, | ||
"files": [ | ||
"**/__tests__/**/*.[jt]s?(x)", | ||
"**/?(*.)+(spec|test).[tj]s?(x)" | ||
], | ||
"plugins": ["jest"], | ||
"extends": ["plugin:@typescript-eslint/recommended", "plugin:jest/recommended"] | ||
"extends": [ | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:jest/recommended" | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.eslint": "explicit" | ||
"source.fixAll.eslint": "always" | ||
}, | ||
"typescript.tsdk": "node_modules/typescript/lib" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
import withRetry from "./withRetry"; | ||
|
||
export default function (...args: Parameters<typeof withRetry>) { | ||
return function <T, K extends keyof T>( | ||
target: T, | ||
export default function <T>(...args: Parameters<typeof withRetry>) { | ||
return function <K extends string>( | ||
target: { [key in K]: (...args: any[]) => Promise<T> }, | ||
propertyKey: K, | ||
descriptor: PropertyDescriptor | ||
): void { | ||
Object.assign(descriptor, { | ||
value: withRetry(...args)(descriptor.value), | ||
descriptor?: TypedPropertyDescriptor<() => Promise<T>> | ||
): any { | ||
const method = target[propertyKey]; | ||
return Object.assign({}, descriptor, { | ||
value: withRetry(...args)(method), | ||
}); | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"extends": "./tsconfig.json", | ||
"compilerOptions": { | ||
"experimentalDecorators": true /* Enables experimental support for ES7 decorators. */, | ||
"emitDecoratorMetadata": true /* Enables experimental support for emitting type metadata for decorators. */, | ||
}, | ||
"exclude": [ | ||
"**/*.spec.*", | ||
"**/*.test.*", | ||
"**/__*__/**/*" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.