diff --git a/modules/@angular/core/src/change_detection/change_detection_util.ts b/modules/@angular/core/src/change_detection/change_detection_util.ts index 8196c1539c730..98ba03245c066 100644 --- a/modules/@angular/core/src/change_detection/change_detection_util.ts +++ b/modules/@angular/core/src/change_detection/change_detection_util.ts @@ -71,15 +71,10 @@ export class ValueUnwrapper { * @stable */ export class SimpleChange { - constructor( - public previousValue: any, public currentValue: any, _isFirstChange: boolean = false) { - // Store this in a non declared field - // to prevent a breaking change (users might have `implement`ed SimpleChange before) - (this)._firstChange = _isFirstChange; - } + constructor(public previousValue: any, public currentValue: any, public firstChange: boolean) {} /** * Check whether the new value is the first value assigned. */ - isFirstChange(): boolean { return (this)._firstChange; } + isFirstChange(): boolean { return this.firstChange; } } diff --git a/tools/public_api_guard/core/index.d.ts b/tools/public_api_guard/core/index.d.ts index 8cf62cabb2313..b1d0a9da3163f 100644 --- a/tools/public_api_guard/core/index.d.ts +++ b/tools/public_api_guard/core/index.d.ts @@ -842,8 +842,9 @@ export declare function setTestabilityGetter(getter: GetTestability): void; /** @stable */ export declare class SimpleChange { currentValue: any; + firstChange: boolean; previousValue: any; - constructor(previousValue: any, currentValue: any, _isFirstChange?: boolean); + constructor(previousValue: any, currentValue: any, firstChange: boolean); isFirstChange(): boolean; }