更新时间:2023-08-24 15:17:58
***知道为什么服务TypeScript文件.
It would be good to know why you want to serve TypeScript files.
据我了解,TypeScript用于编译为Javascript,然后在浏览器中执行.当前,没有对TypeScript的本机支持(如果我输入错了,请纠正我).
As far as I understand, TypeScript is used to compile to Javascript, which is then executed in a browser. Currently, there is no native support for TypeScript (correct me if I'm wrong).
如果您仍然希望通过IIS提供.ts文件,则仍可以在与IIS Admin相关联的自定义mime类型中添加与.ts.该标准定义了前缀x.
,vnd.
和prs.
以及vnd.前缀还列在标准化的mime类型 text/和
If you still want to serve .ts files via IIS, you can still add a custom mime-type in IIS Admin associated with .ts. The standard defines the prefixes x.
, vnd.
and prs.
, and the vnd. prefix is also listed in the standardized mime types text/ and application/.
因此,根据您的用法,您可以选择text/x.typescript
或text/prs.typescript
.
So, depending on your usage, you might choose text/x.typescript
or text/prs.typescript
.