From 573c047d50add1f5a6636dff11b9ec34214a9327 Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Thu, 9 Jul 2015 17:32:42 -0700 Subject: [PATCH] chore(build): Fix .d.ts generation errors caused by invisible types of exported declarations Fixes #3098 --- modules/angular2/src/change_detection/parser/lexer.ts | 2 +- modules/angular2/src/directives/ng_for.ts | 2 +- modules/angular2/src/render/dom/compiler/selector.ts | 4 ++-- modules/angular2/src/render/dom/dom_renderer.ts | 2 +- modules/benchpress/src/common_options.ts | 4 ++-- modules/benchpress/src/metric.ts | 4 ++-- modules/benchpress/src/reporter.ts | 4 ++-- modules/benchpress/src/validator.ts | 4 ++-- modules/benchpress/src/web_driver_adapter.ts | 4 ++-- 9 files changed, 15 insertions(+), 15 deletions(-) diff --git a/modules/angular2/src/change_detection/parser/lexer.ts b/modules/angular2/src/change_detection/parser/lexer.ts index 0e99793d9a..618f8456cc 100644 --- a/modules/angular2/src/change_detection/parser/lexer.ts +++ b/modules/angular2/src/change_detection/parser/lexer.ts @@ -8,7 +8,7 @@ import { isPresent } from "angular2/src/facade/lang"; -enum TokenType { +export enum TokenType { CHARACTER, IDENTIFIER, KEYWORD, diff --git a/modules/angular2/src/directives/ng_for.ts b/modules/angular2/src/directives/ng_for.ts index be0db5f41f..3c20634547 100644 --- a/modules/angular2/src/directives/ng_for.ts +++ b/modules/angular2/src/directives/ng_for.ts @@ -123,7 +123,7 @@ export class NgFor { } } -class RecordViewTuple { +export class RecordViewTuple { view: ViewRef; record: any; constructor(record, view) { diff --git a/modules/angular2/src/render/dom/compiler/selector.ts b/modules/angular2/src/render/dom/compiler/selector.ts index 4e47d04843..436eaee8b9 100644 --- a/modules/angular2/src/render/dom/compiler/selector.ts +++ b/modules/angular2/src/render/dom/compiler/selector.ts @@ -338,14 +338,14 @@ export class SelectorMatcher { } -class SelectorListContext { +export class SelectorListContext { alreadyMatched: boolean = false; constructor(public selectors: CssSelector[]) {} } // Store context to pass back selector and context when a selector is matched -class SelectorContext { +export class SelectorContext { notSelectors: CssSelector[]; constructor(public selector: CssSelector, public cbContext: any, diff --git a/modules/angular2/src/render/dom/dom_renderer.ts b/modules/angular2/src/render/dom/dom_renderer.ts index 05c6a80d1e..d0dc5ec4b5 100644 --- a/modules/angular2/src/render/dom/dom_renderer.ts +++ b/modules/angular2/src/render/dom/dom_renderer.ts @@ -270,4 +270,4 @@ function moveChildNodes(source: Node, target: Node) { DOM.appendChild(target, currChild); currChild = nextChild; } -} \ No newline at end of file +} diff --git a/modules/benchpress/src/common_options.ts b/modules/benchpress/src/common_options.ts index 8ab071b386..f534c1e5f9 100644 --- a/modules/benchpress/src/common_options.ts +++ b/modules/benchpress/src/common_options.ts @@ -1,8 +1,8 @@ -import {bind, OpaqueToken} from 'angular2/di'; +import {bind, Binding, OpaqueToken} from 'angular2/di'; import {DateWrapper} from 'angular2/src/facade/lang'; export class Options { - static get DEFAULT_BINDINGS() { return _DEFAULT_BINDINGS; } + static get DEFAULT_BINDINGS(): Binding[] { return _DEFAULT_BINDINGS; } // TODO(tbosch): use static initializer when our transpiler supports it static get SAMPLE_ID() { return _SAMPLE_ID; } // TODO(tbosch): use static initializer when our transpiler supports it diff --git a/modules/benchpress/src/metric.ts b/modules/benchpress/src/metric.ts index 6b3c6f38e7..7ce88d4ad9 100644 --- a/modules/benchpress/src/metric.ts +++ b/modules/benchpress/src/metric.ts @@ -1,4 +1,4 @@ -import {bind} from 'angular2/di'; +import {bind, Binding} from 'angular2/di'; import {Promise, PromiseWrapper} from 'angular2/src/facade/async'; import {ABSTRACT, BaseException} from 'angular2/src/facade/lang'; import {StringMap} from 'angular2/src/facade/collection'; @@ -8,7 +8,7 @@ import {StringMap} from 'angular2/src/facade/collection'; */ @ABSTRACT() export class Metric { - static bindTo(delegateToken) { + static bindTo(delegateToken): Binding[] { return [bind(Metric).toFactory((delegate) => delegate, [delegateToken])]; } diff --git a/modules/benchpress/src/reporter.ts b/modules/benchpress/src/reporter.ts index ccd31ebdcf..015934e974 100644 --- a/modules/benchpress/src/reporter.ts +++ b/modules/benchpress/src/reporter.ts @@ -1,4 +1,4 @@ -import {bind} from 'angular2/di'; +import {bind, Binding} from 'angular2/di'; import {Promise, PromiseWrapper} from 'angular2/src/facade/async'; import {ABSTRACT, BaseException} from 'angular2/src/facade/lang'; import {MeasureValues} from './measure_values'; @@ -9,7 +9,7 @@ import {List} from 'angular2/src/facade/collection'; */ @ABSTRACT() export class Reporter { - static bindTo(delegateToken) { + static bindTo(delegateToken): Binding[] { return [bind(Reporter).toFactory((delegate) => delegate, [delegateToken])]; } diff --git a/modules/benchpress/src/validator.ts b/modules/benchpress/src/validator.ts index a88f93f8d6..e0e1a955ba 100644 --- a/modules/benchpress/src/validator.ts +++ b/modules/benchpress/src/validator.ts @@ -1,4 +1,4 @@ -import {bind} from 'angular2/di'; +import {bind, Binding} from 'angular2/di'; import {List, StringMap} from 'angular2/src/facade/collection'; import {ABSTRACT, BaseException} from 'angular2/src/facade/lang'; @@ -11,7 +11,7 @@ import {MeasureValues} from './measure_values'; */ @ABSTRACT() export class Validator { - static bindTo(delegateToken) { + static bindTo(delegateToken): Binding[] { return [bind(Validator).toFactory((delegate) => delegate, [delegateToken])]; } diff --git a/modules/benchpress/src/web_driver_adapter.ts b/modules/benchpress/src/web_driver_adapter.ts index 77fb15acfc..1499da2395 100644 --- a/modules/benchpress/src/web_driver_adapter.ts +++ b/modules/benchpress/src/web_driver_adapter.ts @@ -1,4 +1,4 @@ -import {bind} from 'angular2/di'; +import {bind, Binding} from 'angular2/di'; import {Promise} from 'angular2/src/facade/async'; import {BaseException, ABSTRACT} from 'angular2/src/facade/lang'; import {List, Map} from 'angular2/src/facade/collection'; @@ -10,7 +10,7 @@ import {List, Map} from 'angular2/src/facade/collection'; */ @ABSTRACT() export class WebDriverAdapter { - static bindTo(delegateToken) { + static bindTo(delegateToken): Binding[] { return [bind(WebDriverAdapter).toFactory((delegate) => delegate, [delegateToken])]; }