Made the 'version' string an exported property

This commit is contained in:
Bill Ticehurst 2015-03-06 17:09:55 -08:00
parent af41be88a1
commit da5caf5f72
10 changed files with 20 additions and 4 deletions

View file

@ -5,6 +5,8 @@ module ts {
/* @internal */ export var emitTime = 0;
/* @internal */ export var ioReadTime = 0;
export var version = "1.5.0.0";
export function createCompilerHost(options: CompilerOptions): CompilerHost {
var currentDirectory: string;
var existingDirectories: Map<boolean> = {};

View file

@ -2,8 +2,6 @@
/// <reference path="commandLineParser.ts"/>
module ts {
var version = "1.5.0.0";
export interface SourceFile {
fileWatcher: FileWatcher;
}
@ -178,7 +176,7 @@ module ts {
}
if (commandLine.options.version) {
reportDiagnostic(createCompilerDiagnostic(Diagnostics.Version_0, version));
reportDiagnostic(createCompilerDiagnostic(Diagnostics.Version_0, ts.version));
return sys.exit(ExitStatus.Success);
}
@ -419,7 +417,7 @@ module ts {
}
function printVersion() {
sys.write(getDiagnosticText(Diagnostics.Version_0, version) + sys.newLine);
sys.write(getDiagnosticText(Diagnostics.Version_0, ts.version) + sys.newLine);
}
function printHelp() {

View file

@ -1472,6 +1472,7 @@ declare module "typescript" {
function createTypeChecker(host: TypeCheckerHost, produceDiagnostics: boolean): TypeChecker;
}
declare module "typescript" {
var version: string;
function createCompilerHost(options: CompilerOptions): CompilerHost;
function getPreEmitDiagnostics(program: Program): Diagnostic[];
function flattenDiagnosticMessageText(messageText: string | DiagnosticMessageChain, newLine: string): string;

View file

@ -4716,6 +4716,9 @@ declare module "typescript" {
>TypeChecker : TypeChecker
}
declare module "typescript" {
var version: string;
>version : string
function createCompilerHost(options: CompilerOptions): CompilerHost;
>createCompilerHost : (options: CompilerOptions) => CompilerHost
>options : CompilerOptions

View file

@ -1503,6 +1503,7 @@ declare module "typescript" {
function createTypeChecker(host: TypeCheckerHost, produceDiagnostics: boolean): TypeChecker;
}
declare module "typescript" {
var version: string;
function createCompilerHost(options: CompilerOptions): CompilerHost;
function getPreEmitDiagnostics(program: Program): Diagnostic[];
function flattenDiagnosticMessageText(messageText: string | DiagnosticMessageChain, newLine: string): string;

View file

@ -4862,6 +4862,9 @@ declare module "typescript" {
>TypeChecker : TypeChecker
}
declare module "typescript" {
var version: string;
>version : string
function createCompilerHost(options: CompilerOptions): CompilerHost;
>createCompilerHost : (options: CompilerOptions) => CompilerHost
>options : CompilerOptions

View file

@ -1504,6 +1504,7 @@ declare module "typescript" {
function createTypeChecker(host: TypeCheckerHost, produceDiagnostics: boolean): TypeChecker;
}
declare module "typescript" {
var version: string;
function createCompilerHost(options: CompilerOptions): CompilerHost;
function getPreEmitDiagnostics(program: Program): Diagnostic[];
function flattenDiagnosticMessageText(messageText: string | DiagnosticMessageChain, newLine: string): string;

View file

@ -4812,6 +4812,9 @@ declare module "typescript" {
>TypeChecker : TypeChecker
}
declare module "typescript" {
var version: string;
>version : string
function createCompilerHost(options: CompilerOptions): CompilerHost;
>createCompilerHost : (options: CompilerOptions) => CompilerHost
>options : CompilerOptions

View file

@ -1541,6 +1541,7 @@ declare module "typescript" {
function createTypeChecker(host: TypeCheckerHost, produceDiagnostics: boolean): TypeChecker;
}
declare module "typescript" {
var version: string;
function createCompilerHost(options: CompilerOptions): CompilerHost;
function getPreEmitDiagnostics(program: Program): Diagnostic[];
function flattenDiagnosticMessageText(messageText: string | DiagnosticMessageChain, newLine: string): string;

View file

@ -4985,6 +4985,9 @@ declare module "typescript" {
>TypeChecker : TypeChecker
}
declare module "typescript" {
var version: string;
>version : string
function createCompilerHost(options: CompilerOptions): CompilerHost;
>createCompilerHost : (options: CompilerOptions) => CompilerHost
>options : CompilerOptions