chore(typings): remove traceur-runtime.d.ts

fixes #4297

Closes #4415
This commit is contained in:
Alex Eagle
2015-09-29 11:11:06 -07:00
committed by Alex Eagle
parent fb9796130d
commit 9b7378d132
59 changed files with 142 additions and 256 deletions

View File

@ -45,8 +45,8 @@ import {
*/
@Injectable()
export class CompilerCache {
_cache: Map<Type, AppProtoView> = new Map();
_hostCache: Map<Type, AppProtoView> = new Map();
_cache = new Map<Type, AppProtoView>();
_hostCache = new Map<Type, AppProtoView>();
set(component: Type, protoView: AppProtoView): void { this._cache.set(component, protoView); }
@ -99,7 +99,7 @@ export class CompilerCache {
*/
@Injectable()
export class Compiler {
private _compiling: Map<Type, Promise<AppProtoView>> = new Map();
private _compiling = new Map<Type, Promise<AppProtoView>>();
private _appUrl: string;
private _defaultPipes: Type[];
@ -151,17 +151,17 @@ export class Compiler {
Compiler._assertTypeIsComponent(componentBinding);
var directiveMetadata = componentBinding.metadata;
hostPvPromise =
this._render.compileHost(directiveMetadata)
.then((hostRenderPv) => {
var protoViews = this._protoViewFactory.createAppProtoViews(
componentBinding, hostRenderPv, [componentBinding], []);
return this._compileNestedProtoViews(protoViews, componentType, new Map());
})
.then((appProtoView) => {
this._compilerCache.setHost(componentType, appProtoView);
return appProtoView;
});
hostPvPromise = this._render.compileHost(directiveMetadata)
.then((hostRenderPv) => {
var protoViews = this._protoViewFactory.createAppProtoViews(
componentBinding, hostRenderPv, [componentBinding], []);
return this._compileNestedProtoViews(protoViews, componentType,
new Map<Type, AppProtoView>());
})
.then((appProtoView) => {
this._compilerCache.setHost(componentType, appProtoView);
return appProtoView;
});
}
return hostPvPromise.then((hostAppProtoView) => {
wtfEndTimeRange(r);
@ -221,7 +221,7 @@ export class Compiler {
}
private _removeDuplicatedDirectives(directives: DirectiveBinding[]): DirectiveBinding[] {
var directivesMap: Map<number, DirectiveBinding> = new Map();
var directivesMap = new Map<number, DirectiveBinding>();
directives.forEach((dirBinding) => { directivesMap.set(dirBinding.key.id, dirBinding); });
return MapWrapper.values(directivesMap);
}

View File

@ -24,12 +24,9 @@ export class ComponentUrlMapper {
}
export class RuntimeComponentUrlMapper extends ComponentUrlMapper {
_componentUrls: Map<Type, string>;
_componentUrls = new Map<Type, string>();
constructor() {
super();
this._componentUrls = new Map();
}
constructor() { super(); }
setComponentUrl(component: Type, url: string) { this._componentUrls.set(component, url); }

View File

@ -33,7 +33,7 @@ import {ElementBinder} from './element_binder';
import {ProtoElementInjector, DirectiveBinding} from './element_injector';
export class BindingRecordsCreator {
_directiveRecordsMap: Map<number, DirectiveRecord> = new Map();
_directiveRecordsMap = new Map<number, DirectiveRecord>();
getEventBindingRecords(elementBinders: RenderElementBinder[],
allDirectiveMetadatas: RenderDirectiveMetadata[]): BindingRecord[] {
@ -353,7 +353,7 @@ function _collectNestedProtoViewsVariableBindings(nestedPvsWithIndex: RenderProt
}
function _createVariableBindings(renderProtoView): Map<string, string> {
var variableBindings = new Map();
var variableBindings = new Map<string, string>();
MapWrapper.forEach(renderProtoView.variableBindings,
(mappedName, varName) => { variableBindings.set(varName, mappedName); });
return variableBindings;
@ -384,7 +384,7 @@ function _createVariableNames(parentVariableNames: string[], renderProtoView): s
export function createVariableLocations(elementBinders: RenderElementBinder[]):
Map<string, number> {
var variableLocations = new Map();
var variableLocations = new Map<string, number>();
for (var i = 0; i < elementBinders.length; i++) {
var binder = elementBinders[i];
MapWrapper.forEach(binder.variableBindings,
@ -478,7 +478,7 @@ function _createElementBinder(protoView: AppProtoView, boundElementIndex, render
export function createDirectiveVariableBindings(renderElementBinder: RenderElementBinder,
directiveBindings: DirectiveBinding[]):
Map<string, number> {
var directiveVariableBindings = new Map();
var directiveVariableBindings = new Map<string, number>();
MapWrapper.forEach(renderElementBinder.variableBindings, (templateName, exportAs) => {
var dirIndex = _findDirectiveIndexByExportAs(renderElementBinder, directiveBindings, exportAs);
directiveVariableBindings.set(templateName, dirIndex);

View File

@ -167,7 +167,7 @@ export class AppView implements ChangeDispatcher, RenderEventDispatcher {
* @param {number} boundElementIndex
*/
triggerEventHandlers(eventName: string, eventObj: Event, boundElementIndex: number): void {
var locals = new Map();
var locals = new Map<string, any>();
locals.set('$event', eventObj);
this.dispatchEvent(boundElementIndex, eventName, locals);
}
@ -332,7 +332,7 @@ class EventEvaluationError extends WrappedException {
*/
export class AppProtoView {
elementBinders: ElementBinder[] = [];
protoLocals: Map<string, any> = new Map();
protoLocals = new Map<string, any>();
mergeMapping: AppProtoViewMergeMapping;
ref: ProtoViewRef;

View File

@ -10,7 +10,7 @@ export const APP_VIEW_POOL_CAPACITY = CONST_EXPR(new OpaqueToken('AppViewPool.vi
@Injectable()
export class AppViewPool {
_poolCapacityPerProtoView: number;
_pooledViewsPerProtoView: Map<viewModule.AppProtoView, Array<viewModule.AppView>> = new Map();
_pooledViewsPerProtoView = new Map<viewModule.AppProtoView, Array<viewModule.AppView>>();
constructor(@Inject(APP_VIEW_POOL_CAPACITY) poolCapacityPerProtoView) {
this._poolCapacityPerProtoView = poolCapacityPerProtoView;

View File

@ -10,7 +10,7 @@ import {reflector} from 'angular2/src/core/reflection/reflection';
@Injectable()
export class ViewResolver {
_cache: Map<Type, ViewMetadata> = new Map();
_cache = new Map<Type, ViewMetadata>();
resolve(component: Type): ViewMetadata {
var view = this._cache.get(component);