Skip to content

Commit

Permalink
fix: harden type qualifier keywords
Browse files Browse the repository at this point in the history
  • Loading branch information
CodyJasonBennett committed Jan 19, 2025
1 parent 902f243 commit 646ba34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion patch-ts.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ for (const file of files) {
const cts = file.replace('.d.ts', '.d.cts')

// Add type qualifiers in annotations
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)
// Remove .js extensions
shell.sed('-i', /from '(\.[^.]+)\.js'/, "from '$1'", file)

Expand Down

0 comments on commit 646ba34

Please sign in to comment.