feat(core): renames Property into Input and Event into Output
BREACKING CHANGE: Before: @Directive({properties: ['one'], events: ['two']}) After: @Directive({inputs: ['one'], outputs: ['two']}) Before: @Component({properties: ['one'], events: ['two']}) After: @Componet({inputs: ['one'], outputs: ['two']}) Before: class A {@Property() one; @Event() two;} After: class A {@Input() one; @Output() two;}
This commit is contained in:
@ -17,8 +17,8 @@ export {
|
||||
ComponentMetadata,
|
||||
DirectiveMetadata,
|
||||
PipeMetadata,
|
||||
PropertyMetadata,
|
||||
EventMetadata,
|
||||
InputMetadata,
|
||||
OutputMetadata,
|
||||
HostBindingMetadata,
|
||||
HostListenerMetadata
|
||||
} from './metadata/directives';
|
||||
@ -39,8 +39,8 @@ import {
|
||||
ComponentMetadata,
|
||||
DirectiveMetadata,
|
||||
PipeMetadata,
|
||||
PropertyMetadata,
|
||||
EventMetadata,
|
||||
InputMetadata,
|
||||
OutputMetadata,
|
||||
HostBindingMetadata,
|
||||
HostListenerMetadata
|
||||
} from './metadata/directives';
|
||||
@ -147,8 +147,8 @@ export interface ViewDecorator extends TypeDecorator {
|
||||
export interface DirectiveFactory {
|
||||
(obj: {
|
||||
selector?: string,
|
||||
properties?: string[],
|
||||
events?: string[],
|
||||
inputs?: string[],
|
||||
outputs?: string[],
|
||||
host?: StringMap<string, string>,
|
||||
bindings?: any[],
|
||||
exportAs?: string,
|
||||
@ -158,8 +158,8 @@ export interface DirectiveFactory {
|
||||
}): DirectiveDecorator;
|
||||
new (obj: {
|
||||
selector?: string,
|
||||
properties?: string[],
|
||||
events?: string[],
|
||||
inputs?: string[],
|
||||
outputs?: string[],
|
||||
host?: StringMap<string, string>,
|
||||
bindings?: any[],
|
||||
exportAs?: string,
|
||||
@ -215,8 +215,8 @@ export interface DirectiveFactory {
|
||||
export interface ComponentFactory {
|
||||
(obj: {
|
||||
selector?: string,
|
||||
properties?: string[],
|
||||
events?: string[],
|
||||
inputs?: string[],
|
||||
outputs?: string[],
|
||||
host?: StringMap<string, string>,
|
||||
bindings?: any[],
|
||||
exportAs?: string,
|
||||
@ -228,8 +228,8 @@ export interface ComponentFactory {
|
||||
}): ComponentDecorator;
|
||||
new (obj: {
|
||||
selector?: string,
|
||||
properties?: string[],
|
||||
events?: string[],
|
||||
inputs?: string[],
|
||||
outputs?: string[],
|
||||
host?: StringMap<string, string>,
|
||||
bindings?: any[],
|
||||
exportAs?: string,
|
||||
@ -452,21 +452,21 @@ export interface PipeFactory {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@link PropertyMetadata} factory for creating decorators.
|
||||
* {@link InputMetadata} factory for creating decorators.
|
||||
*
|
||||
* See {@link PropertyMetadata}.
|
||||
* See {@link InputMetadata}.
|
||||
*/
|
||||
export interface PropertyFactory {
|
||||
export interface InputFactory {
|
||||
(bindingPropertyName?: string): any;
|
||||
new (bindingPropertyName?: string): any;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@link EventMetadata} factory for creating decorators.
|
||||
* {@link OutputMetadata} factory for creating decorators.
|
||||
*
|
||||
* See {@link EventMetadata}.
|
||||
* See {@link OutputMetadata}.
|
||||
*/
|
||||
export interface EventFactory {
|
||||
export interface OutputFactory {
|
||||
(bindingPropertyName?: string): any;
|
||||
new (bindingPropertyName?: string): any;
|
||||
}
|
||||
@ -567,18 +567,18 @@ export var ViewQuery: QueryFactory = makeParamDecorator(ViewQueryMetadata);
|
||||
export var Pipe: PipeFactory = <PipeFactory>makeDecorator(PipeMetadata);
|
||||
|
||||
/**
|
||||
* {@link PropertyMetadata} factory function.
|
||||
* {@link InputMetadata} factory function.
|
||||
*
|
||||
* See {@link PropertyMetadata}.
|
||||
* See {@link InputMetadata}.
|
||||
*/
|
||||
export var Property: PropertyFactory = makePropDecorator(PropertyMetadata);
|
||||
export var Input: InputFactory = makePropDecorator(InputMetadata);
|
||||
|
||||
/**
|
||||
* {@link EventMetadata} factory function.
|
||||
* {@link OutputMetadata} factory function.
|
||||
*
|
||||
* See {@link EventMetadata}.
|
||||
* See {@link OutputMetadatas}.
|
||||
*/
|
||||
export var Event: EventFactory = makePropDecorator(EventMetadata);
|
||||
export var Output: OutputFactory = makePropDecorator(OutputMetadata);
|
||||
|
||||
/**
|
||||
* {@link HostBindingMetadata} factory function.
|
||||
|
Reference in New Issue
Block a user