From 97cd7bf5af7bcf6a96c3688919d92b9fbc928b9d Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Fri, 27 Oct 2017 10:14:21 -0700 Subject: [PATCH] Respond to code review comments --- src/compiler/core.ts | 2 +- src/compiler/types.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/compiler/core.ts b/src/compiler/core.ts index 1db21ae46f0..9daf31f7899 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -1710,7 +1710,7 @@ namespace ts { return moduleResolution; } - export function getStrictOptionValue(compilerOptions: CompilerOptions, flag: "noImplicitAny" | "noImplicitThis" | "strictNullChecks" | "strictFunctionTypes" | "alwaysStrict"): boolean { + export function getStrictOptionValue(compilerOptions: CompilerOptions, flag: StrictOptionName): boolean { return compilerOptions[flag] === undefined ? compilerOptions.strict : compilerOptions[flag]; } diff --git a/src/compiler/types.ts b/src/compiler/types.ts index fb59c9eb881..8749d06b43d 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -3676,6 +3676,8 @@ namespace ts { export type CompilerOptionsValue = string | number | boolean | (string | number)[] | string[] | MapLike | PluginImport[] | null | undefined; + export type StrictOptionName = "noImplicitAny" | "noImplicitThis" | "strictNullChecks" | "strictFunctionTypes" | "alwaysStrict"; + export interface CompilerOptions { /*@internal*/ all?: boolean; allowJs?: boolean;