chore(typings): remove StringMap
This was a poorly typed attempt to mimic TypeScript's index signatures, which we can use instead. This eliminates a very strange type that we were exposing to users, but not re-exporting through our public API. Fixes #4483
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
import {resolveForwardRef, Injectable} from 'angular2/src/core/di';
|
||||
import {Type, isPresent, isBlank, stringify} from 'angular2/src/core/facade/lang';
|
||||
import {BaseException} from 'angular2/src/core/facade/exceptions';
|
||||
import {ListWrapper, StringMap, StringMapWrapper} from 'angular2/src/core/facade/collection';
|
||||
import {ListWrapper, StringMapWrapper} from 'angular2/src/core/facade/collection';
|
||||
import {
|
||||
DirectiveMetadata,
|
||||
ComponentMetadata,
|
||||
@ -43,8 +43,7 @@ export class DirectiveResolver {
|
||||
}
|
||||
|
||||
private _mergeWithPropertyMetadata(dm: DirectiveMetadata,
|
||||
propertyMetadata:
|
||||
StringMap<string, any[]>): DirectiveMetadata {
|
||||
propertyMetadata: {[key: string]: any[]}): DirectiveMetadata {
|
||||
var inputs = [];
|
||||
var outputs = [];
|
||||
var host = {};
|
||||
@ -102,8 +101,7 @@ export class DirectiveResolver {
|
||||
}
|
||||
|
||||
private _merge(dm: DirectiveMetadata, inputs: string[], outputs: string[],
|
||||
host: StringMap<string, string>,
|
||||
queries: StringMap<string, any>): DirectiveMetadata {
|
||||
host: {[key: string]: string}, queries: {[key: string]: any}): DirectiveMetadata {
|
||||
var mergedInputs = isPresent(dm.inputs) ? ListWrapper.concat(dm.inputs, inputs) : inputs;
|
||||
var mergedOutputs = isPresent(dm.outputs) ? ListWrapper.concat(dm.outputs, outputs) : outputs;
|
||||
var mergedHost = isPresent(dm.host) ? StringMapWrapper.merge(dm.host, host) : host;
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {StringMap, MapWrapper} from 'angular2/src/core/facade/collection';
|
||||
import {MapWrapper} from 'angular2/src/core/facade/collection';
|
||||
import {SimpleChange} from 'angular2/src/core/change_detection/change_detection_util';
|
||||
|
||||
/**
|
||||
@ -77,7 +77,7 @@ export var LIFECYCLE_HOOKS_VALUES = [
|
||||
* bootstrap(App).catch(err => console.error(err));
|
||||
* ```
|
||||
*/
|
||||
export interface OnChanges { onChanges(changes: StringMap<string, SimpleChange>); }
|
||||
export interface OnChanges { onChanges(changes: {[key: string]: SimpleChange}); }
|
||||
|
||||
/**
|
||||
* Implement this interface to execute custom initialization logic after your directive's
|
||||
|
@ -3,7 +3,6 @@ import {
|
||||
MapWrapper,
|
||||
Map,
|
||||
StringMapWrapper,
|
||||
StringMap
|
||||
} from 'angular2/src/core/facade/collection';
|
||||
import {
|
||||
AST,
|
||||
@ -263,7 +262,7 @@ export class AppView implements ChangeDispatcher, RenderEventDispatcher {
|
||||
get ownBindersCount(): number { return this.proto.elementBinders.length; }
|
||||
}
|
||||
|
||||
function _localsToStringMap(locals: Locals): StringMap<string, any> {
|
||||
function _localsToStringMap(locals: Locals): {[key: string]: any} {
|
||||
var res = {};
|
||||
var c = locals;
|
||||
while (isPresent(c)) {
|
||||
@ -339,4 +338,4 @@ export class AppProtoView {
|
||||
}
|
||||
|
||||
isInitialized(): boolean { return isPresent(this.elementBinders); }
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user