Subject: [media-types] TypeScript

From: David Caldwell <[email-masked]>
Date: Wed, 20 Nov 2019 15:08:42 -0500

I have an open source product that assumes all files (that may contain
source code) have a MIME type, and I am attempting to enhance it to process
TypeScript files.

I am looking at the vnd., prs., and x. trees for implementing it, and RFC
6838 "encourages" asking here in order to improve the quality of media type
names.

1. Is anything already underway surrounding TypeScript, which obviously is
becoming more and more pervasive?

2. What would be a good name for me to use for internal use?

- David P,. Caldwell
[email-masked]
http://www.davidpcaldwell.com/

---

From: Sean Leonard <[email-masked]>
Date: Fri, 22 Nov 2019 11:21:59 +0800

> On Nov 21, 2019, at 4:08 AM, David Caldwell <[email-masked]> wrote:
> 
> I have an open source product that assumes all files (that may contain source code) have a MIME type, and I am attempting to enhance it to process TypeScript files.
> 
> I am looking at the vnd., prs., and x. trees for implementing it, and RFC 6838 "encourages" asking here in order to improve the quality of media type names.
> 
> 1. Is anything already underway surrounding TypeScript, which obviously is becoming more and more pervasive?

I have not seen anything, but I do not think that a media type for TypeScript is really needed.

> 2. What would be a good name for me to use for internal use?

text/plain

Seriously. TypeScript is source code that is supposed to be compiled; it’s the same as with C/C++ files, or whatever. You would want a specific media type if it’s supposed to be handled differently by applications (as as in <script src=“…”> tags in HTML).

Regards,

Sean

> _______________________________________________
> media-types mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/media-types

---

From: Petter Reinholdtsen <[email-masked]>
Date: Fri, 22 Nov 2019 08:50:46 +0100

[Sean Leonard]
> Seriously. TypeScript is source code that is supposed to be compiled;
> it’s the same as with C/C++ files, or whatever. You would want a
> specific media type if it’s supposed to be handled differently by
> applications (as as in <script src=“…”> tags in HTML).

One use case for MIME types for both TypeScript and C/C++ files is to
pick the appropriate IDE when trying to open such file.  You might want
different IDEs to open when selecting C files and TypeScript files.

At least the KDE file browsers use MIME types internally to know how to
handle various files, and for these it is very valuable to have specific
format codes for each file format.

-- 
Happy hacking
Petter Reinholdtsen

---

From: David Caldwell <[email-masked]>
Date: Fri, 22 Nov 2019 05:50:55 -0500

[Sean Leonard]
> applications (as as in <script src=“…”> tags in HTML).

[Petter Reinholdtse]
> pick the appropriate IDE when trying to open such file.

Yes, Petter's description is closer to my use case. In this case I *do*
want to handle different MIME types differently in my application
(specifically, sending them to different preprocessors that emit
JavaScript; note that CoffeeScript, similarly a language that compiles
to JavaScript, already has an IANA registered MIME type.

- David P. Caldwell
[email-masked]