File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import assert from 'node:assert'
22import { spawnSync } from 'node:child_process'
33import { readFileSync } from 'node:fs'
44import path from 'node:path'
5- import { babelParse , getLang , isTs } from 'ast-kit'
5+ import { babelParse , getLang , isDts , isTs } from 'ast-kit'
66import picomatch from 'picomatch'
77import { globSync } from 'tinyglobby'
88import type { OptionsResolved } from './options'
@@ -70,7 +70,7 @@ export function scanEnums(options: ScanOptions): EnumData {
7070 // 2. parse matched files to collect enum info
7171 for ( const file of files ) {
7272 const lang = getLang ( file )
73- if ( ! isTs ( lang ) ) continue
73+ if ( ! isTs ( lang ) || isDts ( file ) ) continue
7474
7575 const content = readFileSync ( file , 'utf8' )
7676 const ast = babelParse ( content , lang )
You can’t perform that action at this time.
0 commit comments