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:
@ -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))) {
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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[] = [];
|
||||
|
Reference in New Issue
Block a user