regexFind: /\d+\s+((function|enum|class|interface|type))\s*=\s*(.*)/
regexReplace: $1 myFunction = $3Add a valid identifier name after the keyword
- function = () => {};
+ function myFunction = () => {};Explanation: Missing function name after function keyword
- enum = { A, B };
+ enum MyEnum = { A, B };Explanation: Missing enum name after enum keyword
npx tsc ./docs/1003/index.ts --noEmit --prettydocs/1003/index.ts:1:10 - error TS1003: Identifier expected.
1 function = () => {};
docs/1003/index.ts:2:6 - error TS1003: Identifier expected.
2 enum = { A, B };OR (without --pretty flag):
docs/1003/index.ts(1,10): error TS1003: Identifier expected.
docs/1003/index.ts(2,6): error TS1003: Identifier expected.