Skip to content

Commit

Permalink
Added new tsconfig validation for options introduced in microsoft/Typ…
Browse files Browse the repository at this point in the history
…eScript#4788 (reachability checks)
  • Loading branch information
mjohnsonengr committed Nov 15, 2015
1 parent 0876bf4 commit 9b043c7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions dist/main/tsconfig/tsconfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ var simpleValidator = require('./simpleValidator');
var types = simpleValidator.types;
var compilerOptionsValidation = {
allowNonTsExtensions: { type: types.boolean },
allowUnreachableCode: { type: types.boolean },
allowUnusedLabels: { type: types.boolean },
charset: { type: types.string },
codepage: { type: types.number },
declaration: { type: types.boolean },
Expand All @@ -26,7 +28,9 @@ var compilerOptionsValidation = {
noEmitHelpers: { type: types.boolean },
noEmitOnError: { type: types.boolean },
noErrorTruncation: { type: types.boolean },
noFallthroughCasesInSwitch: { type: types.boolean },
noImplicitAny: { type: types.boolean },
noImplicitReturns: { type: types.boolean },
noLib: { type: types.boolean },
noLibCheck: { type: types.boolean },
noResolve: { type: types.boolean },
Expand Down
8 changes: 8 additions & 0 deletions lib/main/tsconfig/tsconfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ var types = simpleValidator.types;
*/
interface CompilerOptions {
allowNonTsExtensions?: boolean;
allowUnreachableCode?: boolean;
allowUnusedLabels?: boolean;
charset?: string;
codepage?: number;
declaration?: boolean;
Expand All @@ -40,7 +42,9 @@ interface CompilerOptions {
noEmitHelpers?: boolean;
noEmitOnError?: boolean;
noErrorTruncation?: boolean;
noFallthroughCasesInSwitch?: boolean;
noImplicitAny?: boolean; // Error on inferred `any` type
noImplicitReturns?: boolean;
noLib?: boolean;
noLibCheck?: boolean;
noResolve?: boolean;
Expand All @@ -62,6 +66,8 @@ interface CompilerOptions {

var compilerOptionsValidation: simpleValidator.ValidationInfo = {
allowNonTsExtensions: { type: types.boolean },
allowUnreachableCode: { type: types.boolean },
allowUnusedLabels: { type: types.boolean },
charset: { type: types.string },
codepage: { type: types.number },
declaration: { type: types.boolean },
Expand All @@ -85,7 +91,9 @@ var compilerOptionsValidation: simpleValidator.ValidationInfo = {
noEmitHelpers: { type: types.boolean },
noEmitOnError: { type: types.boolean },
noErrorTruncation: { type: types.boolean },
noFallthroughCasesInSwitch: { type: types.boolean },
noImplicitAny: { type: types.boolean },
noImplicitReturns: { type: types.boolean },
noLib: { type: types.boolean },
noLibCheck: { type: types.boolean },
noResolve: { type: types.boolean },
Expand Down

0 comments on commit 9b043c7

Please sign in to comment.