regexFind: /async\s+([a-zA-Z_$][a-zA-Z0-9_$.-]*)\s*=/
regexReplace: $1 =Remove async modifier from property declaration. The async modifier can only be used on function declarations and methods, not on class properties or variables.
class TestClass {
- async property = 'value'
+ property = 'value'
}Explanation: Remove async modifier from class property declaration
- const async config = { api: 'https://api.com' }
+ const config = { api: 'https://api.com' }Explanation: Remove async modifier from variable declaration
npx tsc ./docs/1042/index.ts --noEmit --prettydocs/1042/index.ts:2:3 - error TS1042: 'async' modifier cannot be used here.
2 async property = 'value'
~~~~~OR (without --pretty flag):
docs/1042/index.ts(2,3): error TS1042: 'async' modifier cannot be used here.