
committed by
Alex Rickabaugh

parent
0918adf39d
commit
3903e5ebe7
@ -22,6 +22,7 @@ import {ViewEncapsulation} from './view';
|
||||
|
||||
/**
|
||||
* Type of the Directive decorator / constructor function.
|
||||
* @publicApi
|
||||
*/
|
||||
export interface DirectiveDecorator {
|
||||
/**
|
||||
@ -349,6 +350,8 @@ export interface Directive {
|
||||
|
||||
/**
|
||||
* Type of the Directive metadata.
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export const Directive: DirectiveDecorator = makeDecorator(
|
||||
'Directive', (dir: Directive = {}) => dir, undefined, undefined,
|
||||
@ -357,6 +360,7 @@ export const Directive: DirectiveDecorator = makeDecorator(
|
||||
/**
|
||||
* Component decorator interface
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export interface ComponentDecorator {
|
||||
/**
|
||||
@ -633,6 +637,7 @@ export interface Component extends Directive {
|
||||
* `ngPreserveWhitespaces` attribute.
|
||||
*
|
||||
* @Annotation
|
||||
* @publicApi
|
||||
*/
|
||||
export const Component: ComponentDecorator = makeDecorator(
|
||||
'Component', (c: Component = {}) => ({changeDetection: ChangeDetectionStrategy.Default, ...c}),
|
||||
@ -641,6 +646,8 @@ export const Component: ComponentDecorator = makeDecorator(
|
||||
|
||||
/**
|
||||
* Type of the Pipe decorator / constructor function.
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export interface PipeDecorator {
|
||||
/**
|
||||
@ -679,9 +686,8 @@ export interface Pipe {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @Annotation
|
||||
* @publicApi
|
||||
*/
|
||||
export const Pipe: PipeDecorator = makeDecorator(
|
||||
'Pipe', (p: Pipe) => ({pure: true, ...p}), undefined, undefined,
|
||||
@ -689,7 +695,7 @@ export const Pipe: PipeDecorator = makeDecorator(
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export interface InputDecorator {
|
||||
/**
|
||||
@ -802,8 +808,8 @@ const updateBaseDefFromIOProp = (getProp: (baseDef: {inputs?: any, outputs?: any
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* @Annotation
|
||||
* @publicApi
|
||||
*/
|
||||
export const Input: InputDecorator = makePropDecorator(
|
||||
'Input', (bindingPropertyName?: string) => ({bindingPropertyName}), undefined,
|
||||
@ -811,6 +817,8 @@ export const Input: InputDecorator = makePropDecorator(
|
||||
|
||||
/**
|
||||
* Type of the Output decorator / constructor function.
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export interface OutputDecorator {
|
||||
/**
|
||||
@ -838,8 +846,8 @@ export interface OutputDecorator {
|
||||
export interface Output { bindingPropertyName?: string; }
|
||||
|
||||
/**
|
||||
*
|
||||
* @Annotation
|
||||
* @publicApi
|
||||
*/
|
||||
export const Output: OutputDecorator = makePropDecorator(
|
||||
'Output', (bindingPropertyName?: string) => ({bindingPropertyName}), undefined,
|
||||
@ -849,6 +857,8 @@ export const Output: OutputDecorator = makePropDecorator(
|
||||
|
||||
/**
|
||||
* Type of the HostBinding decorator / constructor function.
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export interface HostBindingDecorator {
|
||||
/**
|
||||
@ -890,8 +900,8 @@ export interface HostBindingDecorator {
|
||||
export interface HostBinding { hostPropertyName?: string; }
|
||||
|
||||
/**
|
||||
*
|
||||
* @Annotation
|
||||
* @publicApi
|
||||
*/
|
||||
export const HostBinding: HostBindingDecorator =
|
||||
makePropDecorator('HostBinding', (hostPropertyName?: string) => ({hostPropertyName}));
|
||||
@ -899,6 +909,8 @@ export const HostBinding: HostBindingDecorator =
|
||||
|
||||
/**
|
||||
* Type of the HostListener decorator / constructor function.
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export interface HostListenerDecorator {
|
||||
(eventName: string, args?: string[]): any;
|
||||
@ -949,6 +961,7 @@ export interface HostListener {
|
||||
* ```
|
||||
*
|
||||
* @Annotation
|
||||
* @publicApi
|
||||
*/
|
||||
export const HostListener: HostListenerDecorator =
|
||||
makePropDecorator('HostListener', (eventName?: string, args?: string[]) => ({eventName, args}));
|
||||
|
Reference in New Issue
Block a user