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'
2
2
import { spawnSync } from 'node:child_process'
3
3
import { readFileSync } from 'node:fs'
4
4
import path from 'node:path'
5
- import { babelParse , getLang , isTs } from 'ast-kit'
5
+ import { babelParse , getLang , isDts , isTs } from 'ast-kit'
6
6
import picomatch from 'picomatch'
7
7
import { globSync } from 'tinyglobby'
8
8
import type { OptionsResolved } from './options'
@@ -70,7 +70,7 @@ export function scanEnums(options: ScanOptions): EnumData {
70
70
// 2. parse matched files to collect enum info
71
71
for ( const file of files ) {
72
72
const lang = getLang ( file )
73
- if ( ! isTs ( lang ) ) continue
73
+ if ( ! isTs ( lang ) || isDts ( file ) ) continue
74
74
75
75
const content = readFileSync ( file , 'utf8' )
76
76
const ast = babelParse ( content , lang )
You can’t perform that action at this time.
0 commit comments