Improve TypeScript shebang detection (#31437)

Closes #13981

Release Notes:

- Improved TypeScript shebang detection
This commit is contained in:
Umesh Yadav 2025-05-31 01:41:13 +05:30 committed by GitHub
parent a78563b80b
commit 32214abb64
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,7 +1,7 @@
name = "TypeScript"
grammar = "typescript"
path_suffixes = ["ts", "cts", "mts"]
first_line_pattern = '^#!.*\b(?:deno run|ts-node|bun|tsx)\b'
first_line_pattern = '^#!.*\b(?:deno run|ts-node|bun|tsx|[/ ]node)\b'
line_comments = ["// "]
block_comment = ["/*", "*/"]
autoclose_before = ";:.,=}])>"