refactor: rename annotations to metadata
BREAKING CHANGE (maybe) Well as long as our customers use public API this should not be a breaking change, but we have changed import structure as well as internal names, so it could be breaking. import: angular2/annotations => angular2/metadata Classes: *Annotations => *Metadata renderer.DirectiveMetadata => renderer.RendererDirectiveMetadata renderer.ElementBinder => renderer.RendererElementBinder impl.Directive => impl.DirectiveMetadata impl.Component => impl.ComponentMetadata impl.View => impl.ViewMetadata Closes #3660
This commit is contained in:

committed by
Miško Hevery

parent
5e6317fecc
commit
ea6673947c
@ -1,15 +1,15 @@
|
||||
import {Type} from 'angular2/src/facade/lang';
|
||||
import {Key, Dependency, ResolvedBinding, Binding} from 'angular2/di';
|
||||
import {Pipe} from 'angular2/src/core/annotations_impl/annotations';
|
||||
import {PipeMetadata} from '../metadata/directives';
|
||||
|
||||
export class PipeBinding extends ResolvedBinding {
|
||||
constructor(public name: string, key: Key, factory: Function, dependencies: Dependency[]) {
|
||||
super(key, factory, dependencies);
|
||||
}
|
||||
|
||||
static createFromType(type: Type, metadata: Pipe): PipeBinding {
|
||||
static createFromType(type: Type, metadata: PipeMetadata): PipeBinding {
|
||||
var binding = new Binding(type, {toClass: type});
|
||||
var rb = binding.resolve();
|
||||
return new PipeBinding(metadata.name, rb.key, rb.factory, rb.dependencies);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ import * as cd from 'angular2/src/change_detection/pipes';
|
||||
|
||||
export class ProtoPipes {
|
||||
/**
|
||||
* Map of {@link Pipe} names to {@link Pipe} implementations.
|
||||
* Map of {@link PipeMetadata} names to {@link PipeMetadata} implementations.
|
||||
*/
|
||||
config: StringMap<string, PipeBinding> = {};
|
||||
|
||||
|
Reference in New Issue
Block a user