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
+3 -3
View File
@@ -238,9 +238,9 @@ export class RenderDirectiveMetadata {
exportAs?: string,
queries?: StringMap<string, any>
}): RenderDirectiveMetadata {
let hostListeners = new Map();
let hostProperties = new Map();
let hostAttributes = new Map();
let hostListeners = new Map<string, string>();
let hostProperties = new Map<string, string>();
let hostAttributes = new Map<string, string>();
if (isPresent(host)) {
MapWrapper.forEach(host, (value: string, key: string) => {
@@ -12,7 +12,7 @@ export class CompileStepFactory {
}
export class DefaultStepFactory extends CompileStepFactory {
private _componentUIDsCache: Map<string, string> = new Map();
private _componentUIDsCache = new Map<string, string>();
constructor(private _parser: Parser, private _appId: string) { super(); }
createSteps(view: ViewDefinition): CompileStep[] {
@@ -156,12 +156,12 @@ export class SelectorMatcher {
return notMatcher;
}
private _elementMap: Map<string, SelectorContext[]> = new Map();
private _elementPartialMap: Map<string, SelectorMatcher> = new Map();
private _classMap: Map<string, SelectorContext[]> = new Map();
private _classPartialMap: Map<string, SelectorMatcher> = new Map();
private _attrValueMap: Map<string, Map<string, SelectorContext[]>> = new Map();
private _attrValuePartialMap: Map<string, Map<string, SelectorMatcher>> = new Map();
private _elementMap = new Map<string, SelectorContext[]>();
private _elementPartialMap = new Map<string, SelectorMatcher>();
private _classMap = new Map<string, SelectorContext[]>();
private _classPartialMap = new Map<string, SelectorMatcher>();
private _attrValueMap = new Map<string, Map<string, SelectorContext[]>>();
private _attrValuePartialMap = new Map<string, Map<string, SelectorMatcher>>();
private _listContexts: SelectorListContext[] = [];
addSelectables(cssSelectors: CssSelector[], callbackCtxt?: any) {
@@ -218,7 +218,7 @@ export class SelectorMatcher {
var terminalMap = matcher._attrValueMap;
var terminalValuesMap = terminalMap.get(attrName);
if (isBlank(terminalValuesMap)) {
terminalValuesMap = new Map();
terminalValuesMap = new Map<string, SelectorContext[]>();
terminalMap.set(attrName, terminalValuesMap);
}
this._addTerminal(terminalValuesMap, attrValue, selectable);
@@ -226,7 +226,7 @@ export class SelectorMatcher {
var parttialMap = matcher._attrValuePartialMap;
var partialValuesMap = parttialMap.get(attrName);
if (isBlank(partialValuesMap)) {
partialValuesMap = new Map();
partialValuesMap = new Map<string, SelectorMatcher>();
parttialMap.set(attrName, partialValuesMap);
}
matcher = this._addPartial(partialValuesMap, attrValue);
@@ -28,7 +28,7 @@ export class TemplateAndStyles {
*/
@Injectable()
export class ViewLoader {
_cache: Map<string, Promise<string>> = new Map();
_cache = new Map<string, Promise<string>>();
constructor(private _xhr: XHR, private _styleInliner: StyleInliner,
private _styleUrlResolver: StyleUrlResolver) {}
@@ -5,7 +5,7 @@ import {DOM} from 'angular2/src/core/dom/dom_adapter';
import {ElementSchemaRegistry} from './element_schema_registry';
export class DomElementSchemaRegistry extends ElementSchemaRegistry {
private _protoElements: Map<string, Element> = new Map();
private _protoElements = new Map<string, Element>();
private _getProtoElement(tagName: string): Element {
var element = this._protoElements.get(tagName);
@@ -38,11 +38,11 @@ import {NG_BINDING_CLASS, queryBoundTextNodeIndices, camelCaseToDashCase} from '
import {EVENT_TARGET_SEPARATOR} from "../../event_config";
export class ProtoViewBuilder {
variableBindings: Map<string, string> = new Map();
variableBindings = new Map<string, string>();
elements: ElementBinderBuilder[] = [];
rootTextBindings: Map<Node, ASTWithSource> = new Map();
rootTextBindings = new Map<Node, ASTWithSource>();
ngContentCount: number = 0;
hostAttributes: Map<string, string> = new Map();
hostAttributes = new Map<string, string>();
constructor(public rootElement, public type: ViewType,
public viewEncapsulation: ViewEncapsulation) {}
@@ -89,7 +89,7 @@ export class ProtoViewBuilder {
});
ListWrapper.forEach(this.elements, (ebb: ElementBinderBuilder) => {
var directiveTemplatePropertyNames = new Set();
var directiveTemplatePropertyNames = new Set<string>();
var apiDirectiveBinders = ListWrapper.map(ebb.directives, (dbb: DirectiveBuilder) => {
ebb.eventBuilder.merge(dbb.eventBuilder);
ListWrapper.forEach(dbb.templatePropertyNames,
@@ -155,12 +155,12 @@ export class ElementBinderBuilder {
distanceToParent: number = 0;
directives: DirectiveBuilder[] = [];
nestedProtoView: ProtoViewBuilder = null;
propertyBindings: Map<string, ASTWithSource> = new Map();
variableBindings: Map<string, string> = new Map();
propertyBindings = new Map<string, ASTWithSource>();
variableBindings = new Map<string, string>();
eventBindings: EventBinding[] = [];
eventBuilder: EventBuilder = new EventBuilder();
textBindings: Map<Node, ASTWithSource> = new Map();
readAttributes: Map<string, string> = new Map();
textBindings = new Map<Node, ASTWithSource>();
readAttributes = new Map<string, string>();
componentId: string = null;
constructor(public index: number, public element, description: string) {}
@@ -231,10 +231,10 @@ export class ElementBinderBuilder {
export class DirectiveBuilder {
// mapping from directive property name to AST for that directive
propertyBindings: Map<string, ASTWithSource> = new Map();
propertyBindings = new Map<string, ASTWithSource>();
// property names used in the template
templatePropertyNames: string[] = [];
hostPropertyBindings: Map<string, ASTWithSource> = new Map();
hostPropertyBindings = new Map<string, ASTWithSource>();
eventBindings: EventBinding[] = [];
eventBuilder: EventBuilder = new EventBuilder();
@@ -36,7 +36,7 @@ export function mergeProtoViewsRecursively(templateCloner: TemplateCloner,
// modify the DOM
mergeEmbeddedPvsIntoComponentOrRootPv(clonedProtoViews, hostViewAndBinderIndices);
var fragments = [];
var elementsWithNativeShadowRoot: Set<Element> = new Set();
var elementsWithNativeShadowRoot = new Set<Element>();
mergeComponents(clonedProtoViews, hostViewAndBinderIndices, fragments,
elementsWithNativeShadowRoot);
// Note: Need to remark parent elements of bound text nodes
@@ -50,7 +50,7 @@ export function mergeProtoViewsRecursively(templateCloner: TemplateCloner,
// read out the new element / text node / ElementBinder order
var mergedBoundElements = queryBoundElements(rootNode, false);
var mergedBoundTextIndices: Map<Node, number> = new Map();
var mergedBoundTextIndices = new Map<Node, number>();
var boundTextNodeMap: Map<Node, any> = indexBoundTextNodes(clonedProtoViews);
var rootTextNodeIndices =
calcRootTextNodeIndices(rootNode, boundTextNodeMap, mergedBoundTextIndices);
@@ -69,7 +69,7 @@ export function mergeProtoViewsRecursively(templateCloner: TemplateCloner,
var mergedProtoView =
DomProtoView.create(templateCloner, mainProtoView.original.type, rootElement,
mainProtoView.original.encapsulation, fragmentsRootNodeCount,
rootTextNodeIndices, mergedElementBinders, new Map());
rootTextNodeIndices, mergedElementBinders, new Map<string, string>());
return new RenderProtoViewMergeMapping(new DomProtoViewRef(mergedProtoView),
fragmentsRootNodeCount.length, mappedElementIndices,
mergedBoundElements.length, mappedTextIndices,
@@ -116,7 +116,7 @@ function markBoundTextNodeParentsAsBoundElements(mergableProtoViews: ClonedProto
}
function indexBoundTextNodes(mergableProtoViews: ClonedProtoView[]): Map<Node, any> {
var boundTextNodeMap = new Map();
var boundTextNodeMap = new Map<Node, any>();
for (var pvIndex = 0; pvIndex < mergableProtoViews.length; pvIndex++) {
var mergableProtoView = mergableProtoViews[pvIndex];
mergableProtoView.boundTextNodes.forEach(
@@ -352,7 +352,7 @@ function calcElementBinders(clonedProtoViews: ClonedProtoView[], mergedBoundElem
function indexElementBindersByElement(mergableProtoViews: ClonedProtoView[]):
Map<Element, DomElementBinder> {
var elementBinderByElement = new Map();
var elementBinderByElement = new Map<Element, DomElementBinder>();
mergableProtoViews.forEach((mergableProtoView) => {
for (var i = 0; i < mergableProtoView.boundElements.length; i++) {
var el = mergableProtoView.boundElements[i];
@@ -442,7 +442,7 @@ function calcNestedViewCounts(hostViewAndBinderIndices: number[][]): number[] {
}
function indexArray(arr: any[]): Map<any, number> {
var map = new Map();
var map = new Map<any, number>();
for (var i = 0; i < arr.length; i++) {
map.set(arr[i], i);
}
@@ -6,7 +6,7 @@ import {DOCUMENT} from '../dom_tokens';
@Injectable()
export class SharedStylesHost {
_styles: string[] = [];
_stylesSet: Set<string> = new Set();
_stylesSet = new Set<string>();
constructor() {}
@@ -29,7 +29,7 @@ export class SharedStylesHost {
@Injectable()
export class DomSharedStylesHost extends SharedStylesHost {
private _hostNodes: Set<Node> = new Set();
private _hostNodes = new Set<Node>();
constructor(@Inject(DOCUMENT) doc: any) {
super();
this._hostNodes.add(doc.head);
@@ -69,7 +69,7 @@ export class DomView {
dispatchEvent(elementIndex: number, eventName: string, event: Event): boolean {
var allowDefaultBehavior = true;
if (isPresent(this.eventDispatcher)) {
var evalLocals = new Map();
var evalLocals = new Map<string, any>();
evalLocals.set('$event', event);
// TODO(tbosch): reenable this when we are parsing element properties
// out of action expressions
+1 -1
View File
@@ -52,7 +52,7 @@ export class DefaultRenderView<N> extends RenderViewRef {
dispatchRenderEvent(boundElementIndex: number, eventName: string, event: any): boolean {
var allowDefaultBehavior = true;
if (isPresent(this.eventDispatcher)) {
var locals = new Map();
var locals = new Map<string, any>();
locals.set('$event', event);
allowDefaultBehavior =
this.eventDispatcher.dispatchRenderEvent(boundElementIndex, eventName, locals);
+1 -2
View File
@@ -6,13 +6,12 @@ import {PromiseCompleter, PromiseWrapper, Promise} from 'angular2/src/core/facad
export class MockXHR extends XHR {
private _expectations: _Expectation[];
private _definitions: Map<string, string>;
private _definitions = new Map<string, string>();
private _requests: _PendingRequest[];
constructor() {
super();
this._expectations = [];
this._definitions = new Map();
this._requests = [];
}