refactor(di): removed @Parent
BREAKING CHANGE The @Parent annotation has been removed. Use @Ancestor instead. @Parent was used to enforce a particular DOM structure (e.g., a pane component is a direct child of the tabs component). DI is not the right mechanism to do it. We should enforce it using schema instead.
This commit is contained in:
@ -4,7 +4,6 @@ import {
|
||||
InjectableMetadata,
|
||||
SelfMetadata,
|
||||
VisibilityMetadata,
|
||||
ParentMetadata,
|
||||
AncestorMetadata,
|
||||
UnboundedMetadata
|
||||
} from './metadata';
|
||||
@ -42,14 +41,6 @@ export interface SelfFactory {
|
||||
new (): SelfMetadata;
|
||||
}
|
||||
|
||||
/**
|
||||
* Factory for creating {@link ParentMetadata}.
|
||||
*/
|
||||
export interface ParentFactory {
|
||||
(visibility?: {self: boolean}): any;
|
||||
new (visibility?: {self: boolean}): ParentMetadata;
|
||||
}
|
||||
|
||||
/**
|
||||
* Factory for creating {@link AncestorMetadata}.
|
||||
*/
|
||||
@ -86,11 +77,6 @@ export var Injectable: InjectableFactory = <InjectableFactory>makeDecorator(Inje
|
||||
*/
|
||||
export var Self: SelfFactory = makeParamDecorator(SelfMetadata);
|
||||
|
||||
/**
|
||||
* Factory for creating {@link ParentMetadata}.
|
||||
*/
|
||||
export var Parent: ParentFactory = makeParamDecorator(ParentMetadata);
|
||||
|
||||
/**
|
||||
* Factory for creating {@link AncestorMetadata}.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user