regexFind: /(.*)/
regexReplace: $1Remove self-reference. Files cannot reference themselves.
- /// <reference path="./index.ts" />
+ // Remove self-referenceExplanation: Remove triple-slash directive that references the same file
- /// <reference path="./index.ts" />
+ /// <reference path="./other-file.ts" />Explanation: Change reference to point to a different file
npx tsc ./docs/1006/index.ts --noEmit --prettydocs/1006/index.ts:1:22 - error TS1006: A file cannot have a reference to itself.
1 /// <reference path="./index.ts" />
~~~~~~~~~~OR (without --pretty flag):
docs/1006/index.ts(1,22): error TS1006: A file cannot have a reference to itself.