Created
January 17, 2020 19:06
-
-
Save aleph-naught2tog/cc31df2a5b126b39821aab653fe79545 to your computer and use it in GitHub Desktop.
Rename JS(X) files containing types to their TS(X)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
`tsc | grep -e 'TS8010'`.split("\n").map(&:strip).map { |err| err.split('(').first }.uniq.map { |source| File.rename(source, source.gsub(/\.j(?=sx?$)/, '.t')) } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
`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