fix(typings): update test.typings for abstract superclasses
This commit is contained in:
parent
6075509f26
commit
5458036de7
|
@ -74,7 +74,7 @@ module.exports = new Package('angular-v2-docs', [jsdocPackage, nunjucksPackage,
|
||||||
references: ['./angular2.d.ts', '../jasmine/jasmine.d.ts'],
|
references: ['./angular2.d.ts', '../jasmine/jasmine.d.ts'],
|
||||||
remapTypes: { Type: 'ng.Type', Binding: 'ng.Binding', ViewMetadata: 'ng.ViewMetadata', Injector: 'ng.Injector',
|
remapTypes: { Type: 'ng.Type', Binding: 'ng.Binding', ViewMetadata: 'ng.ViewMetadata', Injector: 'ng.Injector',
|
||||||
Predicate: 'ng.Predicate', ElementRef: 'ng.ElementRef', DebugElement: 'ng.DebugElement',
|
Predicate: 'ng.Predicate', ElementRef: 'ng.ElementRef', DebugElement: 'ng.DebugElement',
|
||||||
InjectableReference: 'ng.InjectableReference' },
|
InjectableReference: 'ng.InjectableReference', ComponentRef: 'ng.ComponentRef' },
|
||||||
modules: {'angular2/test_lib': {namespace: 'ngTestLib', id: 'angular2/test_lib'}}
|
modules: {'angular2/test_lib': {namespace: 'ngTestLib', id: 'angular2/test_lib'}}
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
|
@ -59,6 +59,10 @@ DtsSerializer.prototype = {
|
||||||
},
|
},
|
||||||
|
|
||||||
interfaceOrClass: function(buffer, ast, isInterface) {
|
interfaceOrClass: function(buffer, ast, isInterface) {
|
||||||
|
if (ast.abstract) {
|
||||||
|
buffer.push('abstract ');
|
||||||
|
}
|
||||||
|
|
||||||
buffer.push(isInterface ? 'interface ' : 'class ');
|
buffer.push(isInterface ? 'interface ' : 'class ');
|
||||||
buffer.push(ast.name);
|
buffer.push(ast.name);
|
||||||
buffer.push(ast.typeParams);
|
buffer.push(ast.typeParams);
|
||||||
|
|
|
@ -223,6 +223,9 @@ module.exports = function readTypeScriptModules(tsParser, modules, getFileInfo,
|
||||||
if (exportSymbol.flags & ts.SymbolFlags.TypeAlias) {
|
if (exportSymbol.flags & ts.SymbolFlags.TypeAlias) {
|
||||||
exportDoc.typeDefinition = typeDefinition;
|
exportDoc.typeDefinition = typeDefinition;
|
||||||
}
|
}
|
||||||
|
if (isAbstract(exportSymbol)) {
|
||||||
|
exportDoc.abstract = true;
|
||||||
|
}
|
||||||
|
|
||||||
// Compute the original module name from the relative file path
|
// Compute the original module name from the relative file path
|
||||||
exportDoc.originalModule = exportDoc.fileInfo.relativePath
|
exportDoc.originalModule = exportDoc.fileInfo.relativePath
|
||||||
|
@ -345,6 +348,10 @@ module.exports = function readTypeScriptModules(tsParser, modules, getFileInfo,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function isAbstract(symbol) {
|
||||||
|
var declaration = symbol.valueDeclaration || symbol.declarations[0];
|
||||||
|
return declaration.flags & ts.NodeFlags.Abstract;
|
||||||
|
}
|
||||||
|
|
||||||
function expandSourceFiles(sourceFiles, basePath) {
|
function expandSourceFiles(sourceFiles, basePath) {
|
||||||
var filePaths = [];
|
var filePaths = [];
|
||||||
|
|
|
@ -39,6 +39,9 @@ import {ViewResolver} from './linker/view_resolver';
|
||||||
import {DirectiveResolver} from './linker/directive_resolver';
|
import {DirectiveResolver} from './linker/directive_resolver';
|
||||||
import {PipeResolver} from './linker/pipe_resolver';
|
import {PipeResolver} from './linker/pipe_resolver';
|
||||||
import {Compiler} from 'angular2/src/core/linker/compiler';
|
import {Compiler} from 'angular2/src/core/linker/compiler';
|
||||||
|
import {DynamicComponentLoader_} from "./linker/dynamic_component_loader";
|
||||||
|
import {AppViewManager_} from "./linker/view_manager";
|
||||||
|
import {Compiler_} from "./linker/compiler";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs the set of bindings meant for use at the platform level.
|
* Constructs the set of bindings meant for use at the platform level.
|
||||||
|
@ -71,7 +74,7 @@ function _componentBindings(appComponentType: Type): Array<Type | Binding | any[
|
||||||
return componentRef;
|
return componentRef;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
[DynamicComponentLoader, Injector]),
|
[bind(DynamicComponentLoader).toClass(DynamicComponentLoader_), Injector]),
|
||||||
|
|
||||||
bind(appComponentType)
|
bind(appComponentType)
|
||||||
.toFactory((p: Promise<any>) => p.then(ref => ref.instance), [APP_COMPONENT_REF_PROMISE]),
|
.toFactory((p: Promise<any>) => p.then(ref => ref.instance), [APP_COMPONENT_REF_PROMISE]),
|
||||||
|
@ -84,11 +87,12 @@ function _componentBindings(appComponentType: Type): Array<Type | Binding | any[
|
||||||
*/
|
*/
|
||||||
export function applicationCommonBindings(): Array<Type | Binding | any[]> {
|
export function applicationCommonBindings(): Array<Type | Binding | any[]> {
|
||||||
return [
|
return [
|
||||||
Compiler,
|
bind(Compiler)
|
||||||
|
.toClass(Compiler_),
|
||||||
APP_ID_RANDOM_BINDING,
|
APP_ID_RANDOM_BINDING,
|
||||||
AppViewPool,
|
AppViewPool,
|
||||||
bind(APP_VIEW_POOL_CAPACITY).toValue(10000),
|
bind(APP_VIEW_POOL_CAPACITY).toValue(10000),
|
||||||
AppViewManager,
|
bind(AppViewManager).toClass(AppViewManager_),
|
||||||
AppViewManagerUtils,
|
AppViewManagerUtils,
|
||||||
AppViewListener,
|
AppViewListener,
|
||||||
ProtoViewFactory,
|
ProtoViewFactory,
|
||||||
|
@ -98,7 +102,7 @@ export function applicationCommonBindings(): Array<Type | Binding | any[]> {
|
||||||
bind(KeyValueDiffers).toValue(defaultKeyValueDiffers),
|
bind(KeyValueDiffers).toValue(defaultKeyValueDiffers),
|
||||||
DirectiveResolver,
|
DirectiveResolver,
|
||||||
PipeResolver,
|
PipeResolver,
|
||||||
DynamicComponentLoader,
|
bind(DynamicComponentLoader).toClass(DynamicComponentLoader_),
|
||||||
bind(LifeCycle).toFactory((exceptionHandler) => new LifeCycle_(null, assertionsEnabled()),
|
bind(LifeCycle).toFactory((exceptionHandler) => new LifeCycle_(null, assertionsEnabled()),
|
||||||
[ExceptionHandler]),
|
[ExceptionHandler]),
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import {RuntimeCompiler_} from "./runtime_compiler";
|
||||||
export {TemplateCompiler} from './template_compiler';
|
export {TemplateCompiler} from './template_compiler';
|
||||||
export {
|
export {
|
||||||
CompileDirectiveMetadata,
|
CompileDirectiveMetadata,
|
||||||
|
@ -43,7 +44,7 @@ export function compilerBindings(): Array<Type | Binding | any[]> {
|
||||||
.toValue(
|
.toValue(
|
||||||
new ChangeDetectorGenConfig(assertionsEnabled(), assertionsEnabled(), false, true)),
|
new ChangeDetectorGenConfig(assertionsEnabled(), assertionsEnabled(), false, true)),
|
||||||
TemplateCompiler,
|
TemplateCompiler,
|
||||||
RuntimeCompiler,
|
bind(RuntimeCompiler).toClass(RuntimeCompiler_),
|
||||||
bind(Compiler).toAlias(RuntimeCompiler),
|
bind(Compiler).toAlias(RuntimeCompiler),
|
||||||
DomElementSchemaRegistry,
|
DomElementSchemaRegistry,
|
||||||
bind(ElementSchemaRegistry).toAlias(DomElementSchemaRegistry),
|
bind(ElementSchemaRegistry).toAlias(DomElementSchemaRegistry),
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
export * from './debug/debug_element';
|
export {DebugElement, asNativeElements, By, Scope, inspectElement} from './debug/debug_element';
|
||||||
export {inspectNativeElement, ELEMENT_PROBE_BINDINGS} from './debug/debug_element_view_listener';
|
export {inspectNativeElement, ELEMENT_PROBE_BINDINGS} from './debug/debug_element_view_listener';
|
||||||
|
|
|
@ -40,7 +40,7 @@ export class NgClass implements DoCheck, OnDestroy {
|
||||||
private _rawClass;
|
private _rawClass;
|
||||||
|
|
||||||
constructor(private _iterableDiffers: IterableDiffers, private _keyValueDiffers: KeyValueDiffers,
|
constructor(private _iterableDiffers: IterableDiffers, private _keyValueDiffers: KeyValueDiffers,
|
||||||
private _ngEl: ElementRef_, private _renderer: Renderer) {}
|
private _ngEl: ElementRef, private _renderer: Renderer) {}
|
||||||
|
|
||||||
set initialClasses(v) {
|
set initialClasses(v) {
|
||||||
this._applyInitialClasses(true);
|
this._applyInitialClasses(true);
|
||||||
|
|
|
@ -66,7 +66,7 @@ export class NgStyle implements DoCheck {
|
||||||
_rawStyle;
|
_rawStyle;
|
||||||
_differ: KeyValueDiffer;
|
_differ: KeyValueDiffer;
|
||||||
|
|
||||||
constructor(private _differs: KeyValueDiffers, private _ngEl: ElementRef_,
|
constructor(private _differs: KeyValueDiffers, private _ngEl: ElementRef,
|
||||||
private _renderer: Renderer) {}
|
private _renderer: Renderer) {}
|
||||||
|
|
||||||
set rawStyle(v) {
|
set rawStyle(v) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Public API for Facade
|
// Public API for Facade
|
||||||
export {Type} from './facade/lang';
|
export {ConcreteType, Type} from './facade/lang';
|
||||||
export {Observable, EventEmitter} from './facade/async';
|
export {Observable, EventEmitter} from './facade/async';
|
||||||
export {Predicate} from './facade/collection';
|
export {Predicate} from './facade/collection';
|
||||||
export {WrappedException} from './facade/exceptions';
|
export {WrappedException} from './facade/exceptions';
|
|
@ -33,8 +33,7 @@ import {ElementRef} from './element_ref';
|
||||||
import {ProtoPipes} from 'angular2/src/core/pipes/pipes';
|
import {ProtoPipes} from 'angular2/src/core/pipes/pipes';
|
||||||
import {camelCaseToDashCase} from 'angular2/src/core/render/dom/util';
|
import {camelCaseToDashCase} from 'angular2/src/core/render/dom/util';
|
||||||
import {TemplateCmd} from './template_commands';
|
import {TemplateCmd} from './template_commands';
|
||||||
import {ViewRef_} from "./view_ref";
|
import {ViewRef_, ProtoViewRef_} from "./view_ref";
|
||||||
import {ProtoViewRef_} from "./view_ref";
|
|
||||||
|
|
||||||
export {DebugContext} from 'angular2/src/core/change_detection/interfaces';
|
export {DebugContext} from 'angular2/src/core/change_detection/interfaces';
|
||||||
|
|
||||||
|
|
|
@ -4,13 +4,11 @@ import * as eli from './element_injector';
|
||||||
import {isPresent, isBlank} from 'angular2/src/core/facade/lang';
|
import {isPresent, isBlank} from 'angular2/src/core/facade/lang';
|
||||||
import * as viewModule from './view';
|
import * as viewModule from './view';
|
||||||
import * as avmModule from './view_manager';
|
import * as avmModule from './view_manager';
|
||||||
import {ElementRef} from './element_ref';
|
import {ElementRef, ElementRef_} from './element_ref';
|
||||||
import {TemplateRef} from './template_ref';
|
import {TemplateRef, TemplateRef_} from './template_ref';
|
||||||
import {Renderer, RenderViewWithFragments} from 'angular2/src/core/render/api';
|
import {Renderer, RenderViewWithFragments} from 'angular2/src/core/render/api';
|
||||||
import {Locals} from 'angular2/src/core/change_detection/change_detection';
|
import {Locals} from 'angular2/src/core/change_detection/change_detection';
|
||||||
import {Pipes} from 'angular2/src/core/pipes/pipes';
|
import {Pipes} from 'angular2/src/core/pipes/pipes';
|
||||||
import {TemplateRef_} from "./template_ref";
|
|
||||||
import {ElementRef_} from "./element_ref";
|
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class AppViewManagerUtils {
|
export class AppViewManagerUtils {
|
||||||
|
|
|
@ -152,6 +152,8 @@ export interface RenderElementRef {
|
||||||
renderView: RenderViewRef;
|
renderView: RenderViewRef;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @internal
|
||||||
|
*
|
||||||
* Index of the Element (in the depth-first order) inside the Render View.
|
* Index of the Element (in the depth-first order) inside the Render View.
|
||||||
*
|
*
|
||||||
* This index is used internally by Angular to locate elements.
|
* This index is used internally by Angular to locate elements.
|
||||||
|
|
|
@ -3,9 +3,8 @@ import {DOM} from 'angular2/src/core/dom/dom_adapter';
|
||||||
import {Map, MapWrapper, ListWrapper} from 'angular2/src/core/facade/collection';
|
import {Map, MapWrapper, ListWrapper} from 'angular2/src/core/facade/collection';
|
||||||
import {CONST, CONST_EXPR} from 'angular2/src/core/facade/lang';
|
import {CONST, CONST_EXPR} from 'angular2/src/core/facade/lang';
|
||||||
import {BaseException, WrappedException} from 'angular2/src/core/facade/exceptions';
|
import {BaseException, WrappedException} from 'angular2/src/core/facade/exceptions';
|
||||||
import {NgZone} from '../zone/ng_zone';
|
import {NgZone, NgZone_} from '../zone/ng_zone';
|
||||||
import {PromiseWrapper} from 'angular2/src/core/facade/async';
|
import {PromiseWrapper} from 'angular2/src/core/facade/async';
|
||||||
import {NgZone_} from "../zone/ng_zone";
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -12,8 +12,7 @@ import {Map, MapWrapper, StringMapWrapper} from 'angular2/src/core/facade/collec
|
||||||
|
|
||||||
import {RouteHandler} from './route_handler';
|
import {RouteHandler} from './route_handler';
|
||||||
import {Url, RootUrl, serializeParams} from './url_parser';
|
import {Url, RootUrl, serializeParams} from './url_parser';
|
||||||
import {ComponentInstruction} from './instruction';
|
import {ComponentInstruction, ComponentInstruction_} from "./instruction";
|
||||||
import {ComponentInstruction_} from "./instruction";
|
|
||||||
|
|
||||||
class TouchMap {
|
class TouchMap {
|
||||||
map: {[key: string]: string} = {};
|
map: {[key: string]: string} = {};
|
||||||
|
|
|
@ -57,6 +57,9 @@ import {APP_ID} from 'angular2/src/core/application_tokens';
|
||||||
import {Serializer} from "angular2/src/web_workers/shared/serializer";
|
import {Serializer} from "angular2/src/web_workers/shared/serializer";
|
||||||
import {Log} from './utils';
|
import {Log} from './utils';
|
||||||
import {compilerBindings} from 'angular2/src/core/compiler/compiler';
|
import {compilerBindings} from 'angular2/src/core/compiler/compiler';
|
||||||
|
import {DomRenderer_} from "../core/render/dom/dom_renderer";
|
||||||
|
import {DynamicComponentLoader_} from "../core/linker/dynamic_component_loader";
|
||||||
|
import {AppViewManager_} from "../core/linker/view_manager";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the root injector bindings.
|
* Returns the root injector bindings.
|
||||||
|
@ -93,13 +96,13 @@ function _getAppBindings() {
|
||||||
compilerBindings(),
|
compilerBindings(),
|
||||||
bind(ChangeDetectorGenConfig).toValue(new ChangeDetectorGenConfig(true, true, false, true)),
|
bind(ChangeDetectorGenConfig).toValue(new ChangeDetectorGenConfig(true, true, false, true)),
|
||||||
bind(DOCUMENT).toValue(appDoc),
|
bind(DOCUMENT).toValue(appDoc),
|
||||||
DomRenderer,
|
bind(DomRenderer).toClass(DomRenderer_),
|
||||||
bind(Renderer).toAlias(DomRenderer),
|
bind(Renderer).toAlias(DomRenderer),
|
||||||
bind(APP_ID).toValue('a'),
|
bind(APP_ID).toValue('a'),
|
||||||
DomSharedStylesHost,
|
DomSharedStylesHost,
|
||||||
bind(SharedStylesHost).toAlias(DomSharedStylesHost),
|
bind(SharedStylesHost).toAlias(DomSharedStylesHost),
|
||||||
AppViewPool,
|
AppViewPool,
|
||||||
AppViewManager,
|
bind(AppViewManager).toClass(AppViewManager_),
|
||||||
AppViewManagerUtils,
|
AppViewManagerUtils,
|
||||||
Serializer,
|
Serializer,
|
||||||
ELEMENT_PROBE_BINDINGS,
|
ELEMENT_PROBE_BINDINGS,
|
||||||
|
@ -111,7 +114,7 @@ function _getAppBindings() {
|
||||||
bind(IterableDiffers).toValue(defaultIterableDiffers),
|
bind(IterableDiffers).toValue(defaultIterableDiffers),
|
||||||
bind(KeyValueDiffers).toValue(defaultKeyValueDiffers),
|
bind(KeyValueDiffers).toValue(defaultKeyValueDiffers),
|
||||||
Log,
|
Log,
|
||||||
DynamicComponentLoader,
|
bind(DynamicComponentLoader).toClass(DynamicComponentLoader_),
|
||||||
PipeResolver,
|
PipeResolver,
|
||||||
bind(ExceptionHandler).toValue(new ExceptionHandler(DOM)),
|
bind(ExceptionHandler).toValue(new ExceptionHandler(DOM)),
|
||||||
bind(LocationStrategy).toClass(MockLocationStrategy),
|
bind(LocationStrategy).toClass(MockLocationStrategy),
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
import {LifeCycle} from 'angular2/angular2';
|
import {LifeCycle} from 'angular2/angular2';
|
||||||
import {ComponentRef} from 'angular2/src/core/linker/dynamic_component_loader';
|
import {ComponentRef, ComponentRef_} from 'angular2/src/core/linker/dynamic_component_loader';
|
||||||
import {isPresent, NumberWrapper} from 'angular2/src/core/facade/lang';
|
import {isPresent, NumberWrapper} from 'angular2/src/core/facade/lang';
|
||||||
import {performance, window} from 'angular2/src/core/facade/browser';
|
import {performance, window} from 'angular2/src/core/facade/browser';
|
||||||
import {DOM} from 'angular2/src/core/dom/dom_adapter';
|
import {DOM} from 'angular2/src/core/dom/dom_adapter';
|
||||||
import {ComponentRef_} from "../core/linker/dynamic_component_loader";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Entry point for all Angular debug tools. This object corresponds to the `ng`
|
* Entry point for all Angular debug tools. This object corresponds to the `ng`
|
||||||
|
|
|
@ -7,8 +7,7 @@ import {BaseException, WrappedException} from 'angular2/src/core/facade/exceptio
|
||||||
import {EventEmitter} from 'angular2/src/core/facade/async';
|
import {EventEmitter} from 'angular2/src/core/facade/async';
|
||||||
import {StringMapWrapper} from 'angular2/src/core/facade/collection';
|
import {StringMapWrapper} from 'angular2/src/core/facade/collection';
|
||||||
import {Injectable} from "angular2/src/core/di";
|
import {Injectable} from "angular2/src/core/di";
|
||||||
import {NgZone} from 'angular2/src/core/zone/ng_zone';
|
import {NgZone, NgZone_} from 'angular2/src/core/zone/ng_zone';
|
||||||
import {NgZone_} from "../../core/zone/ng_zone";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A TypeScript implementation of {@link MessageBus} for communicating via JavaScript's
|
* A TypeScript implementation of {@link MessageBus} for communicating via JavaScript's
|
||||||
|
|
|
@ -11,9 +11,11 @@ import {
|
||||||
fakeAsync
|
fakeAsync
|
||||||
} from 'angular2/test_lib';
|
} from 'angular2/test_lib';
|
||||||
|
|
||||||
import {ChangeDetectorRef} from 'angular2/src/core/change_detection/change_detector_ref';
|
import {
|
||||||
|
ChangeDetectorRef,
|
||||||
|
ChangeDetectorRef_
|
||||||
|
} from 'angular2/src/core/change_detection/change_detector_ref';
|
||||||
import {SpyChangeDetector} from '../spies';
|
import {SpyChangeDetector} from '../spies';
|
||||||
import {ChangeDetectorRef_} from "../../../src/core/change_detection/change_detector_ref";
|
|
||||||
|
|
||||||
|
|
||||||
export function main() {
|
export function main() {
|
||||||
|
|
|
@ -24,6 +24,7 @@ import {Compiler} from 'angular2/src/core/linker/compiler';
|
||||||
import {ProtoViewFactory} from 'angular2/src/core/linker/proto_view_factory';
|
import {ProtoViewFactory} from 'angular2/src/core/linker/proto_view_factory';
|
||||||
import {reflector, ReflectionInfo} from 'angular2/src/core/reflection/reflection';
|
import {reflector, ReflectionInfo} from 'angular2/src/core/reflection/reflection';
|
||||||
import {AppProtoView} from 'angular2/src/core/linker/view';
|
import {AppProtoView} from 'angular2/src/core/linker/view';
|
||||||
|
import {Compiler_} from "../../../src/core/linker/compiler";
|
||||||
|
|
||||||
export function main() {
|
export function main() {
|
||||||
describe('Compiler', () => {
|
describe('Compiler', () => {
|
||||||
|
@ -36,7 +37,8 @@ export function main() {
|
||||||
protoViewFactorySpy = new SpyProtoViewFactory();
|
protoViewFactorySpy = new SpyProtoViewFactory();
|
||||||
someProtoView = new AppProtoView(null, null, null, null, null, null);
|
someProtoView = new AppProtoView(null, null, null, null, null, null);
|
||||||
protoViewFactorySpy.spy('createHost').andReturn(someProtoView);
|
protoViewFactorySpy.spy('createHost').andReturn(someProtoView);
|
||||||
return [bind(ProtoViewFactory).toValue(protoViewFactorySpy), Compiler];
|
return
|
||||||
|
[bind(ProtoViewFactory).toValue(protoViewFactorySpy), bind(Compiler).toClass(Compiler_)];
|
||||||
});
|
});
|
||||||
|
|
||||||
beforeEach(inject([Compiler], (_compiler) => {
|
beforeEach(inject([Compiler], (_compiler) => {
|
||||||
|
|
|
@ -40,12 +40,11 @@ import {
|
||||||
import {OnDestroy} from 'angular2/lifecycle_hooks';
|
import {OnDestroy} from 'angular2/lifecycle_hooks';
|
||||||
import {bind, Injector, Binding, Optional, Inject, Injectable, Self, SkipSelf, InjectMetadata, Host, HostMetadata, SkipSelfMetadata} from 'angular2/core';
|
import {bind, Injector, Binding, Optional, Inject, Injectable, Self, SkipSelf, InjectMetadata, Host, HostMetadata, SkipSelfMetadata} from 'angular2/core';
|
||||||
import {ViewContainerRef} from 'angular2/src/core/linker/view_container_ref';
|
import {ViewContainerRef} from 'angular2/src/core/linker/view_container_ref';
|
||||||
import {TemplateRef} from 'angular2/src/core/linker/template_ref';
|
import {TemplateRef, TemplateRef_} from 'angular2/src/core/linker/template_ref';
|
||||||
import {ElementRef} from 'angular2/src/core/linker/element_ref';
|
import {ElementRef} from 'angular2/src/core/linker/element_ref';
|
||||||
import {DynamicChangeDetector, ChangeDetectorRef, Parser, Lexer} from 'angular2/src/core/change_detection/change_detection';
|
import {DynamicChangeDetector, ChangeDetectorRef, Parser, Lexer} from 'angular2/src/core/change_detection/change_detection';
|
||||||
import {QueryList} from 'angular2/src/core/linker/query_list';
|
import {QueryList} from 'angular2/src/core/linker/query_list';
|
||||||
import {AppView, AppViewContainer} from "angular2/src/core/linker/view";
|
import {AppView, AppViewContainer} from "angular2/src/core/linker/view";
|
||||||
import {TemplateRef_} from "../../../src/core/linker/template_ref";
|
|
||||||
|
|
||||||
function createDummyView(detector = null): AppView {
|
function createDummyView(detector = null): AppView {
|
||||||
var res = new SpyView();
|
var res = new SpyView();
|
||||||
|
|
|
@ -82,7 +82,7 @@ import {
|
||||||
import {QueryList} from 'angular2/src/core/linker/query_list';
|
import {QueryList} from 'angular2/src/core/linker/query_list';
|
||||||
|
|
||||||
import {ViewContainerRef} from 'angular2/src/core/linker/view_container_ref';
|
import {ViewContainerRef} from 'angular2/src/core/linker/view_container_ref';
|
||||||
import {ViewRef} from 'angular2/src/core/linker/view_ref';
|
import {ViewRef, ViewRef_} from 'angular2/src/core/linker/view_ref';
|
||||||
|
|
||||||
import {Compiler} from 'angular2/src/core/linker/compiler';
|
import {Compiler} from 'angular2/src/core/linker/compiler';
|
||||||
import {ElementRef} from 'angular2/src/core/linker/element_ref';
|
import {ElementRef} from 'angular2/src/core/linker/element_ref';
|
||||||
|
@ -90,7 +90,7 @@ import {TemplateRef} from 'angular2/src/core/linker/template_ref';
|
||||||
|
|
||||||
import {DomRenderer} from 'angular2/src/core/render/dom/dom_renderer';
|
import {DomRenderer} from 'angular2/src/core/render/dom/dom_renderer';
|
||||||
import {IS_DART} from '../../platform';
|
import {IS_DART} from '../../platform';
|
||||||
import {ViewRef_} from "../../../src/core/linker/view_ref";
|
import {Compiler_} from "../../../src/core/linker/compiler";
|
||||||
|
|
||||||
const ANCHOR_ELEMENT = CONST_EXPR(new OpaqueToken('AnchorElement'));
|
const ANCHOR_ELEMENT = CONST_EXPR(new OpaqueToken('AnchorElement'));
|
||||||
|
|
||||||
|
@ -1020,7 +1020,7 @@ export function main() {
|
||||||
describe('dynamic ViewContainers', () => {
|
describe('dynamic ViewContainers', () => {
|
||||||
|
|
||||||
it('should allow to create a ViewContainerRef at any bound location',
|
it('should allow to create a ViewContainerRef at any bound location',
|
||||||
inject([TestComponentBuilder, AsyncTestCompleter, Compiler],
|
inject([TestComponentBuilder, AsyncTestCompleter, bind(Compiler).toClass(Compiler_)],
|
||||||
(tcb: TestComponentBuilder, async, compiler) => {
|
(tcb: TestComponentBuilder, async, compiler) => {
|
||||||
tcb.overrideView(MyComp, new ViewMetadata({
|
tcb.overrideView(MyComp, new ViewMetadata({
|
||||||
template: '<div><dynamic-vp #dynamic></dynamic-vp></div>',
|
template: '<div><dynamic-vp #dynamic></dynamic-vp></div>',
|
||||||
|
|
|
@ -16,12 +16,9 @@ import {
|
||||||
|
|
||||||
import {SpyView, SpyAppViewManager} from '../spies';
|
import {SpyView, SpyAppViewManager} from '../spies';
|
||||||
import {AppView, AppViewContainer} from 'angular2/src/core/linker/view';
|
import {AppView, AppViewContainer} from 'angular2/src/core/linker/view';
|
||||||
import {ViewContainerRef} from 'angular2/src/core/linker/view_container_ref';
|
import {ViewContainerRef, ViewContainerRef_} from 'angular2/src/core/linker/view_container_ref';
|
||||||
import {ElementRef} from 'angular2/src/core/linker/element_ref';
|
import {ElementRef, ElementRef_} from 'angular2/src/core/linker/element_ref';
|
||||||
import {ViewRef} from 'angular2/src/core/linker/view_ref';
|
import {ViewRef, ViewRef_} from 'angular2/src/core/linker/view_ref';
|
||||||
import {ViewContainerRef_} from "../../../src/core/linker/view_container_ref";
|
|
||||||
import {ViewRef_} from "../../../src/core/linker/view_ref";
|
|
||||||
import {ElementRef_} from "../../../src/core/linker/element_ref";
|
|
||||||
|
|
||||||
export function main() {
|
export function main() {
|
||||||
// TODO(tbosch): add missing tests
|
// TODO(tbosch): add missing tests
|
||||||
|
|
|
@ -17,9 +17,15 @@ import {SpyRenderer, SpyAppViewPool, SpyAppViewListener, SpyProtoViewFactory} fr
|
||||||
import {Injector, bind} from 'angular2/core';
|
import {Injector, bind} from 'angular2/core';
|
||||||
|
|
||||||
import {AppProtoView, AppView, AppViewContainer, ViewType} from 'angular2/src/core/linker/view';
|
import {AppProtoView, AppView, AppViewContainer, ViewType} from 'angular2/src/core/linker/view';
|
||||||
import {ProtoViewRef, ViewRef, internalView} from 'angular2/src/core/linker/view_ref';
|
import {
|
||||||
|
ProtoViewRef,
|
||||||
|
ProtoViewRef_,
|
||||||
|
ViewRef,
|
||||||
|
ViewRef_,
|
||||||
|
internalView
|
||||||
|
} from 'angular2/src/core/linker/view_ref';
|
||||||
import {ElementRef} from 'angular2/src/core/linker/element_ref';
|
import {ElementRef} from 'angular2/src/core/linker/element_ref';
|
||||||
import {TemplateRef} from 'angular2/src/core/linker/template_ref';
|
import {TemplateRef, TemplateRef_} from 'angular2/src/core/linker/template_ref';
|
||||||
import {
|
import {
|
||||||
Renderer,
|
Renderer,
|
||||||
RenderViewRef,
|
RenderViewRef,
|
||||||
|
@ -27,7 +33,7 @@ import {
|
||||||
RenderFragmentRef,
|
RenderFragmentRef,
|
||||||
RenderViewWithFragments
|
RenderViewWithFragments
|
||||||
} from 'angular2/src/core/render/api';
|
} from 'angular2/src/core/render/api';
|
||||||
import {AppViewManager} from 'angular2/src/core/linker/view_manager';
|
import {AppViewManager, AppViewManager_} from 'angular2/src/core/linker/view_manager';
|
||||||
import {AppViewManagerUtils} from 'angular2/src/core/linker/view_manager_utils';
|
import {AppViewManagerUtils} from 'angular2/src/core/linker/view_manager_utils';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
|
@ -38,10 +44,6 @@ import {
|
||||||
createNestedElBinder,
|
createNestedElBinder,
|
||||||
createProtoElInjector
|
createProtoElInjector
|
||||||
} from './view_manager_utils_spec';
|
} from './view_manager_utils_spec';
|
||||||
import {ProtoViewRef_} from "../../../src/core/linker/view_ref";
|
|
||||||
import {ViewRef_} from "../../../src/core/linker/view_ref";
|
|
||||||
import {AppViewManager_} from "../../../src/core/linker/view_manager";
|
|
||||||
import {TemplateRef_} from "../../../src/core/linker/template_ref";
|
|
||||||
|
|
||||||
export function main() {
|
export function main() {
|
||||||
// TODO(tbosch): add missing tests
|
// TODO(tbosch): add missing tests
|
||||||
|
|
|
@ -14,10 +14,9 @@ import {
|
||||||
EventManagerPlugin,
|
EventManagerPlugin,
|
||||||
DomEventsPlugin
|
DomEventsPlugin
|
||||||
} from 'angular2/src/core/render/dom/events/event_manager';
|
} from 'angular2/src/core/render/dom/events/event_manager';
|
||||||
import {NgZone} from 'angular2/src/core/zone/ng_zone';
|
import {NgZone, NgZone_} from 'angular2/src/core/zone/ng_zone';
|
||||||
import {ListWrapper, Map, MapWrapper} from 'angular2/src/core/facade/collection';
|
import {ListWrapper, Map, MapWrapper} from 'angular2/src/core/facade/collection';
|
||||||
import {DOM} from 'angular2/src/core/dom/dom_adapter';
|
import {DOM} from 'angular2/src/core/dom/dom_adapter';
|
||||||
import {NgZone_} from "../../../../../src/core/zone/ng_zone";
|
|
||||||
|
|
||||||
export function main() {
|
export function main() {
|
||||||
var domEventPlugin;
|
var domEventPlugin;
|
||||||
|
|
|
@ -53,7 +53,21 @@ export class SpyAppViewManager extends SpyObject {
|
||||||
}
|
}
|
||||||
|
|
||||||
export class SpyRenderer extends SpyObject {
|
export class SpyRenderer extends SpyObject {
|
||||||
constructor() { super(Renderer); }
|
constructor() {
|
||||||
|
// Note: Renderer is an abstract class,
|
||||||
|
// so we can't generates spy functions automatically
|
||||||
|
// by inspecting the prototype...
|
||||||
|
super(Renderer);
|
||||||
|
this.spy('setEventDispatcher');
|
||||||
|
this.spy('destroyView');
|
||||||
|
this.spy('createView');
|
||||||
|
this.spy('createProtoView');
|
||||||
|
this.spy('hydrateView');
|
||||||
|
this.spy('dehydrateView');
|
||||||
|
this.spy('attachFragmentAfterElement');
|
||||||
|
this.spy('attachFragmentAfterFragment');
|
||||||
|
this.spy('detachFragment');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class SpyAppViewPool extends SpyObject {
|
export class SpyAppViewPool extends SpyObject {
|
||||||
|
|
|
@ -12,10 +12,9 @@ import {
|
||||||
SpyObject
|
SpyObject
|
||||||
} from 'angular2/test_lib';
|
} from 'angular2/test_lib';
|
||||||
import {Testability} from 'angular2/src/core/testability/testability';
|
import {Testability} from 'angular2/src/core/testability/testability';
|
||||||
import {NgZone} from 'angular2/src/core/zone/ng_zone';
|
import {NgZone, NgZone_} from 'angular2/src/core/zone/ng_zone';
|
||||||
import {normalizeBlank} from 'angular2/src/core/facade/lang';
|
import {normalizeBlank} from 'angular2/src/core/facade/lang';
|
||||||
import {PromiseWrapper} from 'angular2/src/core/facade/async';
|
import {PromiseWrapper} from 'angular2/src/core/facade/async';
|
||||||
import {NgZone_} from "../../../src/core/zone/ng_zone";
|
|
||||||
|
|
||||||
// Schedules a microtasks (using a resolved promise .then())
|
// Schedules a microtasks (using a resolved promise .then())
|
||||||
function microTask(fn: Function): void {
|
function microTask(fn: Function): void {
|
||||||
|
|
|
@ -17,8 +17,7 @@ import {
|
||||||
import {PromiseCompleter, PromiseWrapper, TimerWrapper} from 'angular2/src/core/facade/async';
|
import {PromiseCompleter, PromiseWrapper, TimerWrapper} from 'angular2/src/core/facade/async';
|
||||||
import {BaseException} from 'angular2/src/core/facade/exceptions';
|
import {BaseException} from 'angular2/src/core/facade/exceptions';
|
||||||
|
|
||||||
import {NgZone} from 'angular2/src/core/zone/ng_zone';
|
import {NgZone, NgZone_} from 'angular2/src/core/zone/ng_zone';
|
||||||
import {NgZone_} from "../../../src/core/zone/ng_zone";
|
|
||||||
|
|
||||||
var needsLongerTimers = browserDetection.isSlow || browserDetection.isEdge;
|
var needsLongerTimers = browserDetection.isSlow || browserDetection.isEdge;
|
||||||
var resultTimer = 1000;
|
var resultTimer = 1000;
|
||||||
|
|
|
@ -13,7 +13,11 @@ import {
|
||||||
} from 'angular2/test_lib';
|
} from 'angular2/test_lib';
|
||||||
import {ObservableWrapper} from 'angular2/src/core/facade/async';
|
import {ObservableWrapper} from 'angular2/src/core/facade/async';
|
||||||
import {BrowserJsonp} from 'angular2/src/http/backends/browser_jsonp';
|
import {BrowserJsonp} from 'angular2/src/http/backends/browser_jsonp';
|
||||||
import {JSONPConnection, JSONPBackend} from 'angular2/src/http/backends/jsonp_backend';
|
import {
|
||||||
|
JSONPConnection,
|
||||||
|
JSONPConnection_,
|
||||||
|
JSONPBackend
|
||||||
|
} from 'angular2/src/http/backends/jsonp_backend';
|
||||||
import {bind, Injector} from 'angular2/core';
|
import {bind, Injector} from 'angular2/core';
|
||||||
import {isPresent, StringWrapper} from 'angular2/src/core/facade/lang';
|
import {isPresent, StringWrapper} from 'angular2/src/core/facade/lang';
|
||||||
import {TimerWrapper} from 'angular2/src/core/facade/async';
|
import {TimerWrapper} from 'angular2/src/core/facade/async';
|
||||||
|
@ -23,7 +27,6 @@ import {Map} from 'angular2/src/core/facade/collection';
|
||||||
import {RequestOptions, BaseRequestOptions} from 'angular2/src/http/base_request_options';
|
import {RequestOptions, BaseRequestOptions} from 'angular2/src/http/base_request_options';
|
||||||
import {BaseResponseOptions, ResponseOptions} from 'angular2/src/http/base_response_options';
|
import {BaseResponseOptions, ResponseOptions} from 'angular2/src/http/base_response_options';
|
||||||
import {ResponseTypes, ReadyStates, RequestMethods} from 'angular2/src/http/enums';
|
import {ResponseTypes, ReadyStates, RequestMethods} from 'angular2/src/http/enums';
|
||||||
import {JSONPConnection_} from "../../../src/http/backends/jsonp_backend";
|
|
||||||
|
|
||||||
var addEventListenerSpy;
|
var addEventListenerSpy;
|
||||||
var existingScripts = [];
|
var existingScripts = [];
|
||||||
|
|
|
@ -7,12 +7,11 @@ import {
|
||||||
it,
|
it,
|
||||||
expect
|
expect
|
||||||
} from "angular2/test_lib";
|
} from "angular2/test_lib";
|
||||||
import {RenderProtoViewRef} from "angular2/src/core/render/api";
|
import {RenderProtoViewRef, RenderProtoViewRef_} from "angular2/src/core/render/api";
|
||||||
import {RenderProtoViewRefStore} from "angular2/src/web_workers/shared/render_proto_view_ref_store";
|
import {RenderProtoViewRefStore} from "angular2/src/web_workers/shared/render_proto_view_ref_store";
|
||||||
import {
|
import {
|
||||||
WebWorkerRenderProtoViewRef
|
WebWorkerRenderProtoViewRef
|
||||||
} from "angular2/src/web_workers/shared/render_proto_view_ref_store";
|
} from "angular2/src/web_workers/shared/render_proto_view_ref_store";
|
||||||
import {RenderProtoViewRef_} from "../../../src/core/render/api";
|
|
||||||
|
|
||||||
export function main() {
|
export function main() {
|
||||||
describe("RenderProtoViewRefStore", () => {
|
describe("RenderProtoViewRefStore", () => {
|
||||||
|
|
|
@ -12,7 +12,10 @@ import {
|
||||||
} from 'angular2/test_lib';
|
} from 'angular2/test_lib';
|
||||||
import {createPairedMessageBuses} from '../shared/web_worker_test_util';
|
import {createPairedMessageBuses} from '../shared/web_worker_test_util';
|
||||||
import {Serializer, PRIMITIVE} from 'angular2/src/web_workers/shared/serializer';
|
import {Serializer, PRIMITIVE} from 'angular2/src/web_workers/shared/serializer';
|
||||||
import {ServiceMessageBroker} from 'angular2/src/web_workers/shared/service_message_broker';
|
import {
|
||||||
|
ServiceMessageBroker,
|
||||||
|
ServiceMessageBroker_
|
||||||
|
} from 'angular2/src/web_workers/shared/service_message_broker';
|
||||||
import {ObservableWrapper, PromiseWrapper} from 'angular2/src/core/facade/async';
|
import {ObservableWrapper, PromiseWrapper} from 'angular2/src/core/facade/async';
|
||||||
import {bind} from 'angular2/core';
|
import {bind} from 'angular2/core';
|
||||||
import {ON_WEB_WORKER} from 'angular2/src/web_workers/shared/api';
|
import {ON_WEB_WORKER} from 'angular2/src/web_workers/shared/api';
|
||||||
|
@ -20,7 +23,6 @@ import {RenderProtoViewRefStore} from 'angular2/src/web_workers/shared/render_pr
|
||||||
import {
|
import {
|
||||||
RenderViewWithFragmentsStore
|
RenderViewWithFragmentsStore
|
||||||
} from 'angular2/src/web_workers/shared/render_view_with_fragments_store';
|
} from 'angular2/src/web_workers/shared/render_view_with_fragments_store';
|
||||||
import {ServiceMessageBroker_} from "../../../src/web_workers/shared/service_message_broker";
|
|
||||||
|
|
||||||
export function main() {
|
export function main() {
|
||||||
const CHANNEL = "UIMessageBroker Test Channel";
|
const CHANNEL = "UIMessageBroker Test Channel";
|
||||||
|
|
|
@ -26,6 +26,7 @@ import {
|
||||||
import {WebWorkerRenderer} from "angular2/src/web_workers/worker/renderer";
|
import {WebWorkerRenderer} from "angular2/src/web_workers/worker/renderer";
|
||||||
import {
|
import {
|
||||||
ClientMessageBrokerFactory,
|
ClientMessageBrokerFactory,
|
||||||
|
ClientMessageBrokerFactory_,
|
||||||
UiArguments,
|
UiArguments,
|
||||||
FnArg
|
FnArg
|
||||||
} from "angular2/src/web_workers/shared/client_message_broker";
|
} from "angular2/src/web_workers/shared/client_message_broker";
|
||||||
|
@ -50,10 +51,11 @@ import {
|
||||||
import {WebWorkerApplication} from 'angular2/src/web_workers/ui/impl';
|
import {WebWorkerApplication} from 'angular2/src/web_workers/ui/impl';
|
||||||
import {MessageBasedRenderer} from 'angular2/src/web_workers/ui/renderer';
|
import {MessageBasedRenderer} from 'angular2/src/web_workers/ui/renderer';
|
||||||
import {createPairedMessageBuses, PairedMessageBuses} from '../shared/web_worker_test_util';
|
import {createPairedMessageBuses, PairedMessageBuses} from '../shared/web_worker_test_util';
|
||||||
import {ServiceMessageBrokerFactory} from 'angular2/src/web_workers/shared/service_message_broker';
|
import {
|
||||||
|
ServiceMessageBrokerFactory,
|
||||||
|
ServiceMessageBrokerFactory_
|
||||||
|
} from 'angular2/src/web_workers/shared/service_message_broker';
|
||||||
import {WebWorkerEventDispatcher} from 'angular2/src/web_workers/worker/event_dispatcher';
|
import {WebWorkerEventDispatcher} from 'angular2/src/web_workers/worker/event_dispatcher';
|
||||||
import {ServiceMessageBrokerFactory_} from "../../../src/web_workers/shared/service_message_broker";
|
|
||||||
import {ClientMessageBrokerFactory_} from "../../../src/web_workers/shared/client_message_broker";
|
|
||||||
|
|
||||||
|
|
||||||
export function main() {
|
export function main() {
|
||||||
|
|
|
@ -13,11 +13,11 @@ import {Type} from 'angular2/src/core/facade/lang';
|
||||||
import {
|
import {
|
||||||
ClientMessageBroker,
|
ClientMessageBroker,
|
||||||
UiArguments,
|
UiArguments,
|
||||||
ClientMessageBrokerFactory
|
ClientMessageBrokerFactory,
|
||||||
|
ClientMessageBrokerFactory_
|
||||||
} from 'angular2/src/web_workers/shared/client_message_broker';
|
} from 'angular2/src/web_workers/shared/client_message_broker';
|
||||||
import {WebWorkerXHRImpl} from "angular2/src/web_workers/worker/xhr_impl";
|
import {WebWorkerXHRImpl} from "angular2/src/web_workers/worker/xhr_impl";
|
||||||
import {PromiseWrapper} from "angular2/src/core/facade/async";
|
import {PromiseWrapper} from "angular2/src/core/facade/async";
|
||||||
import {ClientMessageBrokerFactory_} from "../../../src/web_workers/shared/client_message_broker";
|
|
||||||
|
|
||||||
export function main() {
|
export function main() {
|
||||||
describe("WebWorkerXHRImpl", () => {
|
describe("WebWorkerXHRImpl", () => {
|
||||||
|
|
|
@ -1,6 +1,15 @@
|
||||||
export * from '../src/core/facade';
|
export * from '../src/core/facade';
|
||||||
export * from '../src/core/zone';
|
export * from '../src/core/zone';
|
||||||
export * from "../src/web_workers/ui/application";
|
export * from "../src/web_workers/ui/application";
|
||||||
export * from "../src/web_workers/shared/client_message_broker";
|
export {
|
||||||
export * from "../src/web_workers/shared/service_message_broker";
|
ClientMessageBroker,
|
||||||
|
ClientMessageBrokerFactory,
|
||||||
|
FnArg,
|
||||||
|
UiArguments
|
||||||
|
} from "../src/web_workers/shared/client_message_broker";
|
||||||
|
export {
|
||||||
|
ReceivedMessage,
|
||||||
|
ServiceMessageBroker,
|
||||||
|
ServiceMessageBrokerFactory
|
||||||
|
} from "../src/web_workers/shared/service_message_broker";
|
||||||
export {PRIMITIVE} from '../src/web_workers/shared/serializer';
|
export {PRIMITIVE} from '../src/web_workers/shared/serializer';
|
||||||
|
|
|
@ -40,6 +40,15 @@ export * from '../src/core/change_detection';
|
||||||
|
|
||||||
export * from '../profile';
|
export * from '../profile';
|
||||||
export * from '../src/web_workers/worker/application';
|
export * from '../src/web_workers/worker/application';
|
||||||
export * from '../src/web_workers/shared/client_message_broker';
|
export {
|
||||||
export * from '../src/web_workers/shared/service_message_broker';
|
ClientMessageBroker,
|
||||||
|
ClientMessageBrokerFactory,
|
||||||
|
FnArg,
|
||||||
|
UiArguments
|
||||||
|
} from '../src/web_workers/shared/client_message_broker';
|
||||||
|
export {
|
||||||
|
ReceivedMessage,
|
||||||
|
ServiceMessageBroker,
|
||||||
|
ServiceMessageBrokerFactory
|
||||||
|
} from '../src/web_workers/shared/service_message_broker';
|
||||||
export {PRIMITIVE} from '../src/web_workers/shared/serializer';
|
export {PRIMITIVE} from '../src/web_workers/shared/serializer';
|
||||||
|
|
Loading…
Reference in New Issue