We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3e5773c commit bef7d7aCopy full SHA for bef7d7a
1 file changed
src/core/enum.ts
@@ -2,7 +2,7 @@ import assert from 'node:assert'
2
import { spawnSync } from 'node:child_process'
3
import { readFileSync } from 'node:fs'
4
import path from 'node:path'
5
-import { babelParse, getLang, isTs } from 'ast-kit'
+import { babelParse, getLang, isDts, isTs } from 'ast-kit'
6
import picomatch from 'picomatch'
7
import { globSync } from 'tinyglobby'
8
import type { OptionsResolved } from './options'
@@ -70,7 +70,7 @@ export function scanEnums(options: ScanOptions): EnumData {
70
// 2. parse matched files to collect enum info
71
for (const file of files) {
72
const lang = getLang(file)
73
- if (!isTs(lang)) continue
+ if (!isTs(lang) || isDts(file)) continue
74
75
const content = readFileSync(file, 'utf8')
76
const ast = babelParse(content, lang)
0 commit comments