refactor(core): remove …Metadata
for all decorators and use the decorator directly.
BREAKING CHANGE: - all `…Metadata` classes have been removed. Use the corresponding decorator as constructor or for `instanceof` checks instead. - Example: * Before: `new ComponentMetadata(…)` * After: `new Component(…)` - Note: `new Component(…)` worked before as well.
This commit is contained in:
@ -29,7 +29,7 @@ export function devModeEqual(a: any, b: any): boolean {
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates that the result of a {@link PipeMetadata} transformation has changed even though the
|
||||
* Indicates that the result of a {@link Pipe} transformation has changed even though the
|
||||
* reference
|
||||
* has not changed.
|
||||
*
|
||||
|
@ -6,7 +6,7 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {OptionalMetadata, Provider, SkipSelfMetadata} from '../../di';
|
||||
import {Optional, Provider, SkipSelf} from '../../di';
|
||||
import {ListWrapper} from '../../facade/collection';
|
||||
import {getTypeNameForDebugging, isBlank, isPresent} from '../../facade/lang';
|
||||
import {ChangeDetectorRef} from '../change_detector_ref';
|
||||
@ -91,7 +91,7 @@ export class IterableDiffers {
|
||||
return IterableDiffers.create(factories, parent);
|
||||
},
|
||||
// Dependency technically isn't optional, but we can provide a better error message this way.
|
||||
deps: [[IterableDiffers, new SkipSelfMetadata(), new OptionalMetadata()]]
|
||||
deps: [[IterableDiffers, new SkipSelf(), new Optional()]]
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {OptionalMetadata, Provider, SkipSelfMetadata} from '../../di';
|
||||
import {Optional, Provider, SkipSelf} from '../../di';
|
||||
import {ListWrapper} from '../../facade/collection';
|
||||
import {isBlank, isPresent} from '../../facade/lang';
|
||||
import {ChangeDetectorRef} from '../change_detector_ref';
|
||||
@ -81,7 +81,7 @@ export class KeyValueDiffers {
|
||||
return KeyValueDiffers.create(factories, parent);
|
||||
},
|
||||
// Dependency technically isn't optional, but we can provide a better error message this way.
|
||||
deps: [[KeyValueDiffers, new SkipSelfMetadata(), new OptionalMetadata()]]
|
||||
deps: [[KeyValueDiffers, new SkipSelf(), new Optional()]]
|
||||
};
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user