Skip to content

Commit

Permalink
Add typescript as a valid parser value (#1318)
Browse files Browse the repository at this point in the history
* Add typescript as a valid parser value

Now that typescript development has started, each contributor has been adding this as a supported flag themselves.

This just adds it as an allowed option, with a warning that support for this parser is experimental.

I also tried to structure this a bit future proof, in case other experimental parsers come along.

* Simplifies the code at vjeux's request

Rather than a notion of "experimental" parsers, we'll just leave typescript out of the documentation until it's supported.
  • Loading branch information
Quantumplation authored and vjeux committed Apr 18, 2017
1 parent 8d03423 commit 5e7503d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/prettier.js
Expand Up @@ -66,7 +66,7 @@ function getParserOption() {
return "flow";
}

if (value === "flow" || value === "babylon") {
if (value === "flow" || value === "babylon" || value === "typescript") {
return value;
}

Expand Down

0 comments on commit 5e7503d

Please sign in to comment.