Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Commit

Permalink
Support TypeScript 2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy Hanson committed May 11, 2017
1 parent 9cc69ec commit d57b7ef
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/rules/definitelytyped-header-parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import pm = require("parsimmon");
// Code copied from definitelytyped-header-parser
// Remove when that is published to NPM

export type TypeScriptVersion = "2.0" | "2.1" | "2.2";
export type TypeScriptVersion = "2.0" | "2.1" | "2.2" | "2.3";
export namespace TypeScriptVersion {
export const all: TypeScriptVersion[] = ["2.0", "2.1", "2.2"];
export const all: TypeScriptVersion[] = ["2.0", "2.1", "2.2", "2.3"];
/** Latest version that may be specified in a `// TypeScript Version:` header. */
export const latest = "2.2";
export const latest = "2.3";
}

interface Header {
Expand Down Expand Up @@ -167,6 +167,8 @@ const typeScriptVersionLineParser: pm.Parser<TypeScriptVersion> =
return pm.succeed<TypeScriptVersion>("2.1");
case "2":
return pm.succeed<TypeScriptVersion>("2.2");
case "3":
return pm.succeed<TypeScriptVersion>("2.3");
default:
return pm.fail(`TypeScript 2.${d} is not yet supported.`);
}
Expand Down

0 comments on commit d57b7ef

Please sign in to comment.