chore(typescript 1.6 upgrade): fix build.tools

This commit is contained in:
Alex Eagle
2015-09-22 12:03:39 -07:00
committed by Victor Savkin
parent 1cf45757cd
commit 2ee32fb02c
12 changed files with 747 additions and 205 deletions

View File

@ -1,10 +1,9 @@
/// <reference path="../typings/node/node.d.ts" />
/// <reference path="../../node_modules/typescript/bin/typescript.d.ts" />
/// <reference path="../../node_modules/typescript/lib/typescript.d.ts" />
import fs = require('fs');
import fse = require('fs-extra');
import path = require('path');
import ts = require('typescript');
import {wrapDiffingPlugin, DiffingBroccoliPlugin, DiffResult} from './diffing-broccoli-plugin';
@ -19,10 +18,10 @@ const FS_OPTS = {
* Broccoli plugin that implements incremental Typescript compiler.
*
* It instantiates a typescript compiler instance that keeps all the state about the project and
* can reemit only the files that actually changed.
* can re-emit only the files that actually changed.
*
* Limitations: only files that map directly to the changed source file via naming conventions are
* reemited. This primarily affects code that uses `const enum`s, because changing the enum value
* re-emitted. This primarily affects code that uses `const enum`s, because changing the enum value
* requires global emit, which can affect many files.
*/
class DiffingTSCompiler implements DiffingBroccoliPlugin {

View File

@ -1,6 +1,8 @@
/// <reference path="../typings/es6-promise/es6-promise.d.ts" />
declare class Writer { write(readTree: (tree) => Promise<string>, destDir: string): Promise<any>; }
export = Writer;
declare module "broccoli-writer" {
class Writer {
write(readTree:(tree) => Promise<string>, destDir:string):Promise<any>;
}
export = Writer;
}

View File

@ -1,5 +1,7 @@
/// <reference path="../typings/node/node.d.ts" />
/// <reference path="../typings/fs-extra/fs-extra.d.ts" />
/// <reference path="./broccoli-writer.d.ts" />
import Writer = require('broccoli-writer');
import fs = require('fs');
import fsx = require('fs-extra');

View File

@ -1,15 +1,18 @@
// TODO(martinprobst): This is a hand-written declarations file. Replace with an automatically
// generated one when TypeScript has a strategy to distribute TS source via npm.
export interface TranspilerOptions {
failFast?: boolean;
generateLibraryName?: boolean;
generateSourceMap?: boolean;
basePath?: string;
translateBuiltins?: boolean;
}
declare module "ts2dart" {
export interface TranspilerOptions {
failFast?: boolean;
generateLibraryName?: boolean;
generateSourceMap?: boolean;
basePath?: string;
translateBuiltins?: boolean;
}
export class Transpiler {
constructor(options: TranspilerOptions);
transpile(fileNames: string[], outdir?: string);
export class Transpiler {
constructor(options:TranspilerOptions);
transpile(fileNames:string[], outdir?:string);
}
}