The concept of "file type" is important. For example, a text editor wants to figure out whether the current open file is written in Python or TypeScript to provide file type specific features including something like syntax highlighting.
Many editors / tools are using short identifier to distinguish file types (e.g. javascript
, typescriptreact
, zsh
, python
).
For example, (probably) the most popular open source text editor, VS Code has a list of "known language identifiers" and closely related, LSP spec is also mentioning "common language identifier".
Since VS Code and LSP are popular, I think these language identifiers are considered kind of "standard" and other editors tend to follow them (e.g. [Vim/Neovim is using "typescriptreact" for ".tsx" files](https://