Skip to content

Commit

Permalink
Merge branch 'master' into semanticBindingPropNames
Browse files Browse the repository at this point in the history
Conflicts:
	src/harness/fourslash.ts
  • Loading branch information
DanielRosenwasser committed Jul 15, 2015
2 parents 4c483e5 + c17934e commit ca3c14f
Show file tree
Hide file tree
Showing 193 changed files with 36,751 additions and 23,853 deletions.
47 changes: 34 additions & 13 deletions Jakefile.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ var languageServiceLibrarySources = [
return path.join(serverDirectory, f);
}).concat(servicesSources);

var harnessSources = [
var harnessCoreSources = [
"harness.ts",
"sourceMapRecorder.ts",
"harnessLanguageService.ts",
Expand All @@ -129,7 +129,9 @@ var harnessSources = [
"runner.ts"
].map(function (f) {
return path.join(harnessDirectory, f);
}).concat([
});

var harnessSources = harnessCoreSources.concat([
"incrementalParser.ts",
"jsDocParsing.ts",
"services/colorization.ts",
Expand Down Expand Up @@ -361,7 +363,7 @@ compileFile(servicesFile, servicesSources,[builtLocalDirectory, copyright].conca
/*keepComments*/ true,
/*noResolve*/ false,
/*stripInternal*/ true,
/*callback*/ function () {
/*callback*/ function () {
jake.cpR(servicesFile, nodePackageFile, {silent: true});

prependFile(copyright, standaloneDefinitionsFile);
Expand All @@ -379,12 +381,12 @@ compileFile(serverFile, serverSources,[builtLocalDirectory, copyright].concat(se

var lsslFile = path.join(builtLocalDirectory, "tslssl.js");
compileFile(
lsslFile,
languageServiceLibrarySources,
lsslFile,
languageServiceLibrarySources,
[builtLocalDirectory, copyright].concat(languageServiceLibrarySources),
/*prefixes*/ [copyright],
/*useBuiltCompiler*/ true,
/*noOutFile*/ false,
/*prefixes*/ [copyright],
/*useBuiltCompiler*/ true,
/*noOutFile*/ false,
/*generateDeclarations*/ true);

// Local target to build the language service server library
Expand Down Expand Up @@ -488,7 +490,7 @@ var refTest262Baseline = path.join(internalTests, "baselines/test262/reference")
desc("Builds the test infrastructure using the built compiler");
task("tests", ["local", run].concat(libraryTargets));

function exec(cmd, completeHandler) {
function exec(cmd, completeHandler, errorHandler) {
var ex = jake.createExec([cmd], {windowsVerbatimArguments: true});
// Add listeners for output and error
ex.addListener("stdout", function(output) {
Expand All @@ -504,8 +506,12 @@ function exec(cmd, completeHandler) {
complete();
});
ex.addListener("error", function(e, status) {
fail("Process exited with code " + status);
})
if(errorHandler) {
errorHandler(e, status);
} else {
fail("Process exited with code " + status);
}
});

ex.run();
}
Expand Down Expand Up @@ -562,7 +568,7 @@ task("runtests", ["tests", builtLocalDirectory], function() {
colors = process.env.colors || process.env.color
colors = colors ? ' --no-colors ' : ' --colors ';
tests = tests ? ' -g ' + tests : '';
reporter = process.env.reporter || process.env.r || 'dot';
reporter = process.env.reporter || process.env.r || 'mocha-fivemat-progress-reporter';
// timeout normally isn't necessary but Travis-CI has been timing out on compiler baselines occasionally
// default timeout is 2sec which really should be enough, but maybe we just need a small amount longer
var cmd = host + " -R " + reporter + tests + colors + ' -t ' + testTimeout + ' ' + run;
Expand Down Expand Up @@ -717,7 +723,22 @@ task('tsc-instrumented', [loggedIOJsPath, instrumenterJsPath, tscFile], function
}, { async: true });

desc("Updates the sublime plugin's tsserver");
task("update-sublime", [serverFile], function() {
task("update-sublime", ["local", serverFile], function() {
jake.cpR(serverFile, "../TypeScript-Sublime-Plugin/tsserver/");
jake.cpR(serverFile + ".map", "../TypeScript-Sublime-Plugin/tsserver/");
});

// if the codebase were free of linter errors we could make jake runtests
// run this task automatically
desc("Runs tslint on the compiler sources");
task("lint", [], function() {
function success(f) { return function() { console.log('SUCCESS: No linter errors in ' + f + '\n'); }};
function failure(f) { return function() { console.log('FAILURE: Please fix linting errors in ' + f + '\n') }};

var lintTargets = compilerSources.concat(harnessCoreSources);
for(var i in lintTargets) {
var f = lintTargets[i];
var cmd = 'tslint -f ' + f;
exec(cmd, success(f), failure(f));
}
}, { async: true });
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
[![Build Status](https://travis-ci.org/Microsoft/TypeScript.svg?branch=master)](https://travis-ci.org/Microsoft/TypeScript)
[![Issue Stats](http://issuestats.com/github/Microsoft/TypeScript/badge/pr)](http://issuestats.com/github/microsoft/typescript)
[![Issue Stats](http://issuestats.com/github/Microsoft/TypeScript/badge/issue)](http://issuestats.com/github/microsoft/typescript)
[![npm version](https://badge.fury.io/js/typescript.svg)](http://badge.fury.io/js/typescript)
[![Downloads](http://img.shields.io/npm/dm/TypeScript.svg)](https://npmjs.org/package/typescript)

Expand Down
13 changes: 13 additions & 0 deletions bin/lib.core.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1184,3 +1184,16 @@ declare type ClassDecorator = <TFunction extends Function>(target: TFunction) =>
declare type PropertyDecorator = (target: Object, propertyKey: string | symbol) => void;
declare type MethodDecorator = <T>(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T> | void;
declare type ParameterDecorator = (target: Object, propertyKey: string | symbol, parameterIndex: number) => void;

declare type PromiseConstructorLike = new <T>(executor: (resolve: (value?: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void) => PromiseLike<T>;

interface PromiseLike<T> {
/**
* Attaches callbacks for the resolution and/or rejection of the Promise.
* @param onfulfilled The callback to execute when the Promise is resolved.
* @param onrejected The callback to execute when the Promise is rejected.
* @returns A Promise for the completion of which ever callback is executed.
*/
then<TResult>(onfulfilled?: (value: T) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => TResult | PromiseLike<TResult>): PromiseLike<TResult>;
then<TResult>(onfulfilled?: (value: T) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => void): PromiseLike<TResult>;
}
25 changes: 14 additions & 11 deletions bin/lib.core.es6.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1184,6 +1184,19 @@ declare type ClassDecorator = <TFunction extends Function>(target: TFunction) =>
declare type PropertyDecorator = (target: Object, propertyKey: string | symbol) => void;
declare type MethodDecorator = <T>(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T> | void;
declare type ParameterDecorator = (target: Object, propertyKey: string | symbol, parameterIndex: number) => void;

declare type PromiseConstructorLike = new <T>(executor: (resolve: (value?: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void) => PromiseLike<T>;

interface PromiseLike<T> {
/**
* Attaches callbacks for the resolution and/or rejection of the Promise.
* @param onfulfilled The callback to execute when the Promise is resolved.
* @param onrejected The callback to execute when the Promise is rejected.
* @returns A Promise for the completion of which ever callback is executed.
*/
then<TResult>(onfulfilled?: (value: T) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => TResult | PromiseLike<TResult>): PromiseLike<TResult>;
then<TResult>(onfulfilled?: (value: T) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => void): PromiseLike<TResult>;
}
declare type PropertyKey = string | number | symbol;

interface Symbol {
Expand Down Expand Up @@ -4759,17 +4772,6 @@ declare module Reflect {
function setPrototypeOf(target: any, proto: any): boolean;
}

interface PromiseLike<T> {
/**
* Attaches callbacks for the resolution and/or rejection of the Promise.
* @param onfulfilled The callback to execute when the Promise is resolved.
* @param onrejected The callback to execute when the Promise is rejected.
* @returns A Promise for the completion of which ever callback is executed.
*/
then<TResult>(onfulfilled?: (value: T) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => TResult | PromiseLike<TResult>): PromiseLike<TResult>;
then<TResult>(onfulfilled?: (value: T) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => void): PromiseLike<TResult>;
}

/**
* Represents the completion of an asynchronous operation
*/
Expand All @@ -4789,6 +4791,7 @@ interface Promise<T> {
* @returns A Promise for the completion of the callback.
*/
catch(onrejected?: (reason: any) => T | PromiseLike<T>): Promise<T>;
catch(onrejected?: (reason: any) => void): Promise<T>;

[Symbol.toStringTag]: string;
}
Expand Down
Loading

0 comments on commit ca3c14f

Please sign in to comment.