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:
Tobias Bosch
2016-09-12 19:14:17 -07:00
committed by Igor Minar
parent 1b15170c89
commit 63e15ffaec
40 changed files with 229 additions and 279 deletions

View File

@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.io/license
*/
import {Injector, Pipe, PipeMetadata} from '@angular/core';
import {Injector, Pipe} from '@angular/core';
import {beforeEach, ddescribe, describe, expect, iit, inject, it} from '@angular/core/testing/testing_internal';
import {isBlank, stringify} from '../src/facade/lang';
@ -26,7 +26,7 @@ export function main() {
});
it('should allow overriding the @Pipe', () => {
pipeResolver.setPipe(SomePipe, new PipeMetadata({name: 'someOtherName'}));
pipeResolver.setPipe(SomePipe, new Pipe({name: 'someOtherName'}));
var pipe = pipeResolver.resolve(SomePipe);
expect(pipe.name).toEqual('someOtherName');
});