Recognize .cts and .mts file type as TypeScript (#6424)
TypeScript can use three type of file extensions:
- .ts for regular TypeScript
- .cts for CommonJS modules
- .mts for ES modules
Official documentation on supported file extensions:
https://www.typescriptlang.org/docs/handbook/esm-node.html#new-file-extensions
commit9a651188998bbc1584519ebf658cb5c2c31f4b21
authorAlexis-Lapierre <128792625+Alexis-Lapierre@users.noreply.github.com>
dateFri 24 Mar 2023, 19:13 (4 years ago)
parent6acd200
languages.toml+1−1
@@ -453,7 +453,7 @@ includeInlayVariableTypeHints = true
453453name = "typescript"
454454scope = "source.ts"
455455injection-regex = "(ts|typescript)"
456−file-types = ["ts"]
456+file-types = ["ts", "mts", "cts"]
457457shebangs = []
458458roots = []
459459# TODO: highlights-params