DisplayValue GetModuleKind(TypeScriptProject project, BuildConfiguration buildConfig) { string value = project.GetModuleKind(buildConfig); DisplayValue displayValue = moduleKinds.FirstOrDefault(moduleKind => moduleKind.Id.Equals(value, StringComparison.OrdinalIgnoreCase)); if (displayValue != null) { return(displayValue); } return(moduleKinds[0]); }
DisplayValue GetEcmaScriptTargetVersion(TypeScriptProject project, BuildConfiguration buildConfig) { string value = project.GetEcmaScriptVersion(buildConfig); DisplayValue displayValue = ecmaScriptTargetVersions.FirstOrDefault(version => version.Id.Equals(value, StringComparison.OrdinalIgnoreCase)); if (displayValue != null) { return(displayValue); } return(ecmaScriptTargetVersions[0]); }