Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(core): export the ...Decorator interfaces to ensure they are documented #28836

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/core/src/metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {ViewEncapsulation} from './metadata/view';
export {Attribute} from './di';
export {AfterContentChecked, AfterContentInit, AfterViewChecked, AfterViewInit, DoCheck, OnChanges, OnDestroy, OnInit} from './interface/lifecycle_hooks';
export {ANALYZE_FOR_ENTRY_COMPONENTS, ContentChild, ContentChildDecorator, ContentChildren, ContentChildrenDecorator, Query, ViewChild, ViewChildDecorator, ViewChildren, ViewChildrenDecorator} from './metadata/di';
export {Component, ComponentDecorator, Directive, DirectiveDecorator, HostBinding, HostListener, Input, Output, Pipe} from './metadata/directives';
export {Component, ComponentDecorator, Directive, DirectiveDecorator, HostBinding, HostBindingDecorator, HostListener, HostListenerDecorator, Input, InputDecorator, Output, OutputDecorator, Pipe, PipeDecorator} from './metadata/directives';
export {DoBootstrap, ModuleWithProviders, NgModule} from './metadata/ng_module';
export {CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA, SchemaMetadata} from './metadata/schema';
export {ViewEncapsulation} from './metadata/view';
25 changes: 25 additions & 0 deletions tools/public_api_guard/core/core.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,11 @@ export interface HostBinding {

export declare const HostBinding: HostBindingDecorator;

export interface HostBindingDecorator {
(hostPropertyName?: string): any;
new (hostPropertyName?: string): any;
}

export interface HostDecorator {
(): any;
new (): Host;
Expand All @@ -369,6 +374,11 @@ export interface HostListener {

export declare const HostListener: HostListenerDecorator;

export interface HostListenerDecorator {
(eventName: string, args?: string[]): any;
new (eventName: string, args?: string[]): any;
}

export declare function inject<T>(token: Type<T> | InjectionToken<T>): T;
export declare function inject<T>(token: Type<T> | InjectionToken<T>, flags?: InjectFlags): T | null;

Expand Down Expand Up @@ -450,6 +460,11 @@ export interface Input {

export declare const Input: InputDecorator;

export interface InputDecorator {
(bindingPropertyName?: string): any;
new (bindingPropertyName?: string): any;
}

export declare function isDevMode(): boolean;

export interface IterableChangeRecord<V> {
Expand Down Expand Up @@ -630,6 +645,11 @@ export interface Output {

export declare const Output: OutputDecorator;

export interface OutputDecorator {
(bindingPropertyName?: string): any;
new (bindingPropertyName?: string): any;
}

export declare const PACKAGE_ROOT_URL: InjectionToken<string>;

export interface Pipe {
Expand All @@ -639,6 +659,11 @@ export interface Pipe {

export declare const Pipe: PipeDecorator;

export interface PipeDecorator {
(obj: Pipe): TypeDecorator;
new (obj: Pipe): Pipe;
}

export interface PipeTransform {
transform(value: any, ...args: any[]): any;
}
Expand Down