We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 902f243 commit 646ba34Copy full SHA for 646ba34
patch-ts.js
@@ -7,7 +7,7 @@ for (const file of files) {
7
const cts = file.replace('.d.ts', '.d.cts')
8
9
// Add type qualifiers in annotations
10
- shell.sed('-i', /(import|export )*\s+(?!type\b)/, '$1 type ', file)
+ shell.sed('-i', /(import|export)\s+(?!(type|enum|interface|class|function|const)\b)/, '$1 type ', file)
11
// Remove .js extensions
12
shell.sed('-i', /from '(\.[^.]+)\.js'/, "from '$1'", file)
13
0 commit comments