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:
Alex Eagle
2015-10-02 16:47:54 -07:00
committed by Alex Eagle
parent 2ebc74ddcc
commit 7c4199cd1c
76 changed files with 231 additions and 291 deletions

View File

@ -96,7 +96,7 @@ export class Animation {
* Applies the provided styles to the element
* @param styles
*/
applyStyles(styles: StringMap<string, any>): void {
applyStyles(styles: {[key: string]: any}): void {
StringMapWrapper.forEach(styles, (value, key) => {
var dashCaseKey = camelCaseToDashCase(key);
if (isPresent(DOM.getStyle(this.element, dashCaseKey))) {

View File

@ -61,7 +61,7 @@ export class CssAnimationBuilder {
* @param from
* @param to
*/
setStyles(from: StringMap<string, any>, to: StringMap<string, any>): CssAnimationBuilder {
setStyles(from: {[key: string]: any}, to: {[key: string]: any}): CssAnimationBuilder {
return this.setFromStyles(from).setToStyles(to);
}
@ -69,7 +69,7 @@ export class CssAnimationBuilder {
* Sets the initial styles for the animation
* @param from
*/
setFromStyles(from: StringMap<string, any>): CssAnimationBuilder {
setFromStyles(from: {[key: string]: any}): CssAnimationBuilder {
this.data.fromStyles = from;
return this;
}
@ -78,7 +78,7 @@ export class CssAnimationBuilder {
* Sets the destination styles for the animation
* @param to
*/
setToStyles(to: StringMap<string, any>): CssAnimationBuilder {
setToStyles(to: {[key: string]: any}): CssAnimationBuilder {
this.data.toStyles = to;
return this;
}

View File

@ -1,9 +1,9 @@
export class CssAnimationOptions {
/** initial styles for the element */
fromStyles: StringMap<string, any>;
fromStyles: {[key: string]: any};
/** destination styles for the element */
toStyles: StringMap<string, any>;
toStyles: {[key: string]: any};
/** classes to be added to the element */
classesToAdd: string[] = [];