How to extend TypeScript

Topics: General, Language Specification
Oct 17, 2012 at 4:06 AM

There are a few things that I'd really like to have added to TS, and I figured I might as well do it myself. What is the policy on 3rd party contributions? I'm assuming there's a grammar description for TS. Is it also open source and somewhere in the repository that I've missed?

Oct 17, 2012 at 7:35 AM

Is it OpenSource?
http://typescript.codeplex.com/license

Yes

Is there are grammar description?
Not sure what you mean, possibly the language spec is what your looking for? 

http://typescript.codeplex.com/
Look down under documentation. (I'm to lazy to find the PDF version right now, but there is one) 

At the very bottom of that same page there are some product guidelines etc... (Under more info)...
You could also fork it.

Oct 17, 2012 at 5:37 PM

That's not quite what I'm looking for.  Something like BNF so that I can make additions without having to modify the parser by hand, which would be a waste if the work flow was to generate it anyway. If you're not familiar with grammars I recommend http://en.m.wikipedia.org/wiki/Formal_grammar

Oct 23, 2012 at 5:28 PM

+1, I think it's a good idea! That would be nice to integrate into a TypeScript

But what about the internal implementation? This shouldn't slow down the compiler significantly!

BTW this is a duplicate of http://typescript.codeplex.com/discussions/397997.