Merge branch 'master' into preserveFormatting

Conflicts:
	tests/baselines/reference/stringLiteralTypeIsSubtypeOfString.js
This commit is contained in:
Cyrus Najmabadi
2015-03-08 19:47:34 -07:00
29 changed files with 84 additions and 29 deletions

View File

@@ -5,6 +5,9 @@ module ts {
/* @internal */ export var emitTime = 0;
/* @internal */ export var ioReadTime = 0;
/** The version of the TypeScript compiler release */
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

@@ -1174,7 +1174,7 @@ module ts {
}
export function nodeIsSynthesized(node: Node): boolean {
return node.pos === -1 && node.end === -1;
return node.pos === -1;
}
export function createSynthesizedNode(kind: SyntaxKind, startsOnNewLine?: boolean): Node {

6
src/lib/core.d.ts vendored
View File

@@ -410,6 +410,9 @@ interface String {
*/
substr(from: number, length?: number): string;
/** Returns the primitive value of the specified object. */
valueOf(): string;
[index: number]: string;
}
@@ -462,6 +465,9 @@ interface Number {
* @param precision Number of significant digits. Must be in the range 1 - 21, inclusive.
*/
toPrecision(precision?: number): string;
/** Returns the primitive value of the specified object. */
valueOf(): number;
}
interface NumberConstructor {

View File

@@ -11,6 +11,7 @@
/// <reference path='formatting\smartIndenter.ts' />
module ts {
/** The version of the language service API */
export var servicesVersion = "0.4"
export interface Node {