refactor(core): refactor WrappedValue (#20997)

- Improve `WrappedValue` by adding `unwrap` symetrical to `wrap`.
- remove dead code - `ValueUnwrapper`

The property `wrapped` is an implementation details and should never be accessed
directly - use `unwrap(wrappedValue)`. Will change to protected in Angular 7.

PR Close #20997
This commit is contained in:
Victor Berchet
2017-12-13 15:54:43 -08:00
committed by Alex Eagle
parent 54bf179888
commit 3bcc0e6f76
6 changed files with 26 additions and 34 deletions

View File

@ -1093,8 +1093,10 @@ export declare abstract class ViewRef extends ChangeDetectorRef {
/** @stable */
export declare class WrappedValue {
wrapped: any;
constructor(wrapped: any);
/** @deprecated */ wrapped: any;
constructor(value: any);
static isWrapped(value: any): value is WrappedValue;
static unwrap(value: any): any;
static wrap(value: any): WrappedValue;
}