From 15cc85c54a9146c6d502cffad52a3c1a41fe4dcb Mon Sep 17 00:00:00 2001 From: Pete Bacon Darwin Date: Thu, 3 May 2018 09:53:12 +0100 Subject: [PATCH] style(common): fix short param names (#23667) PR Close #23667 --- packages/common/http/src/params.ts | 8 ++++---- packages/common/src/directives/ng_class.ts | 8 ++++---- packages/common/src/directives/ng_style.ts | 8 ++++---- packages/common/src/location/platform_location.ts | 2 +- tools/public_api_guard/common/common.d.ts | 2 +- tools/public_api_guard/common/http.d.ts | 8 ++++---- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/packages/common/http/src/params.ts b/packages/common/http/src/params.ts index 3d93890285..09c9cf4239 100755 --- a/packages/common/http/src/params.ts +++ b/packages/common/http/src/params.ts @@ -28,13 +28,13 @@ export interface HttpParameterCodec { * */ export class HttpUrlEncodingCodec implements HttpParameterCodec { - encodeKey(k: string): string { return standardEncoding(k); } + encodeKey(key: string): string { return standardEncoding(key); } - encodeValue(v: string): string { return standardEncoding(v); } + encodeValue(value: string): string { return standardEncoding(value); } - decodeKey(k: string): string { return decodeURIComponent(k); } + decodeKey(key: string): string { return decodeURIComponent(key); } - decodeValue(v: string) { return decodeURIComponent(v); } + decodeValue(value: string) { return decodeURIComponent(value); } } diff --git a/packages/common/src/directives/ng_class.ts b/packages/common/src/directives/ng_class.ts index a8260a7f5d..3c1e38a188 100644 --- a/packages/common/src/directives/ng_class.ts +++ b/packages/common/src/directives/ng_class.ts @@ -51,22 +51,22 @@ export class NgClass implements DoCheck { private _ngEl: ElementRef, private _renderer: Renderer2) {} @Input('class') - set klass(v: string) { + set klass(value: string) { this._removeClasses(this._initialClasses); - this._initialClasses = typeof v === 'string' ? v.split(/\s+/) : []; + this._initialClasses = typeof value === 'string' ? value.split(/\s+/) : []; this._applyClasses(this._initialClasses); this._applyClasses(this._rawClass); } @Input() - set ngClass(v: string|string[]|Set|{[klass: string]: any}) { + set ngClass(value: string|string[]|Set|{[klass: string]: any}) { this._removeClasses(this._rawClass); this._applyClasses(this._initialClasses); this._iterableDiffer = null; this._keyValueDiffer = null; - this._rawClass = typeof v === 'string' ? v.split(/\s+/) : v; + this._rawClass = typeof value === 'string' ? value.split(/\s+/) : value; if (this._rawClass) { if (isListLikeIterable(this._rawClass)) { diff --git a/packages/common/src/directives/ng_style.ts b/packages/common/src/directives/ng_style.ts index 9062f05b0f..612bb358a0 100644 --- a/packages/common/src/directives/ng_style.ts +++ b/packages/common/src/directives/ng_style.ts @@ -41,10 +41,10 @@ export class NgStyle implements DoCheck { private _differs: KeyValueDiffers, private _ngEl: ElementRef, private _renderer: Renderer2) {} @Input() - set ngStyle(v: {[key: string]: string}) { - this._ngStyle = v; - if (!this._differ && v) { - this._differ = this._differs.find(v).create(); + set ngStyle(values: {[key: string]: string}) { + this._ngStyle = values; + if (!this._differ && values) { + this._differ = this._differs.find(values).create(); } } diff --git a/packages/common/src/location/platform_location.ts b/packages/common/src/location/platform_location.ts index 7d1e245698..9770017b90 100644 --- a/packages/common/src/location/platform_location.ts +++ b/packages/common/src/location/platform_location.ts @@ -67,4 +67,4 @@ export interface LocationChangeEvent { /** * @experimental */ -export interface LocationChangeListener { (e: LocationChangeEvent): any; } +export interface LocationChangeListener { (event: LocationChangeEvent): any; } diff --git a/tools/public_api_guard/common/common.d.ts b/tools/public_api_guard/common/common.d.ts index 7d2c87b652..d5a18fd997 100644 --- a/tools/public_api_guard/common/common.d.ts +++ b/tools/public_api_guard/common/common.d.ts @@ -219,7 +219,7 @@ export interface LocationChangeEvent { /** @experimental */ export interface LocationChangeListener { - (e: LocationChangeEvent): any; + (event: LocationChangeEvent): any; } export declare abstract class LocationStrategy { diff --git a/tools/public_api_guard/common/http.d.ts b/tools/public_api_guard/common/http.d.ts index fc444dfab6..370d020052 100644 --- a/tools/public_api_guard/common/http.d.ts +++ b/tools/public_api_guard/common/http.d.ts @@ -1695,10 +1695,10 @@ export interface HttpSentEvent { } export declare class HttpUrlEncodingCodec implements HttpParameterCodec { - decodeKey(k: string): string; - decodeValue(v: string): string; - encodeKey(k: string): string; - encodeValue(v: string): string; + decodeKey(key: string): string; + decodeValue(value: string): string; + encodeKey(key: string): string; + encodeValue(value: string): string; } export interface HttpUserEvent {