There was an error while loading. Please reload this page.
1 parent 8e8ea75 commit 649db2cCopy full SHA for 649db2c
1 file changed
packages/plugin-dts/src/utils.ts
@@ -31,6 +31,7 @@ let astGrepNapi: typeof import('@ast-grep/napi') | undefined;
31
32
const loadAstGrepNapi = (): typeof import('@ast-grep/napi') => {
33
if (!astGrepNapi) {
34
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
35
astGrepNapi = require('@ast-grep/napi') as typeof import('@ast-grep/napi');
36
}
37
@@ -42,6 +43,7 @@ const loadAstGrepNapi = (): typeof import('@ast-grep/napi') => {
42
43
* for better startup performance. If we use `import ts from 'typescript'`,
44
* Node.js will use `cjs-module-lexer` to parse it, which slows down startup time.
45
*/
46
+// eslint-disable-next-line @typescript-eslint/no-var-requires
47
const ts = require('typescript') as typeof import('typescript');
48
49
export { ts };
0 commit comments