This project is read-only.

Feature request - Contracts in TypeScript

Topics: Language Specification
Feb 4, 2013 at 9:09 PM
My team has been having a discussion about how much defensive programming (paranoia programming?) one ought to do in TypeScript.

We would like a mechanism to specify in code things like ENSURE, REQUIRE, ASSERT, and INVARIANT... and have those be able to wash out of our code with some compiler flag. Something that isn't really possible without a preprocessor-and-macros (ugh!), or bona fide language support.

I'm thinking along the lines of the D Programming Language facility for Contract Programming, which has a very nice contract facility.
Feb 5, 2013 at 4:39 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.