Skip to content

Instantly share code, notes, and snippets.

@aleph-naught2tog
Created January 17, 2020 19:06
Show Gist options
  • Save aleph-naught2tog/cc31df2a5b126b39821aab653fe79545 to your computer and use it in GitHub Desktop.
Save aleph-naught2tog/cc31df2a5b126b39821aab653fe79545 to your computer and use it in GitHub Desktop.
Rename JS(X) files containing types to their TS(X)
`tsc | grep -e 'TS8010'`.split("\n").map(&:strip).map { |err| err.split('(').first }.uniq.map { |source| File.rename(source, source.gsub(/\.j(?=sx?$)/, '.t')) }
`tsc | grep -e 'TS8010'`.split("\n")
.map(&:strip)
.map { |err| err.split('(').first }
.uniq
.map { |source| File.rename(source, source.gsub(/\.j(?=sx?$)/, '.t')) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment