feat(core): make static query flag optional (#32986)
This is a re-submit of #32686. Switches back to having the static flag be optional on ViewChild and ContentChild queries, in preparation for changing its default value. PR Close #32986
This commit is contained in:
parent
7806596fba
commit
900d0055e0
|
@ -29,7 +29,7 @@ export interface Query {
|
|||
read: any;
|
||||
isViewQuery: boolean;
|
||||
selector: any;
|
||||
static: boolean;
|
||||
static?: boolean;
|
||||
}
|
||||
|
||||
export const createContentChildren = makeMetadataFactory<Query>(
|
||||
|
|
|
@ -101,7 +101,7 @@ export interface Query {
|
|||
read: any;
|
||||
isViewQuery: boolean;
|
||||
selector: any;
|
||||
static: boolean;
|
||||
static?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -222,8 +222,8 @@ export interface ContentChildDecorator {
|
|||
*
|
||||
* @Annotation
|
||||
*/
|
||||
(selector: Type<any>|Function|string, opts: {read?: any, static: boolean}): any;
|
||||
new (selector: Type<any>|Function|string, opts: {read?: any, static: boolean}): ContentChild;
|
||||
(selector: Type<any>|Function|string, opts?: {read?: any, static?: boolean}): any;
|
||||
new (selector: Type<any>|Function|string, opts?: {read?: any, static?: boolean}): ContentChild;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -348,8 +348,8 @@ export interface ViewChildDecorator {
|
|||
*
|
||||
* @Annotation
|
||||
*/
|
||||
(selector: Type<any>|Function|string, opts: {read?: any, static: boolean}): any;
|
||||
new (selector: Type<any>|Function|string, opts: {read?: any, static: boolean}): ViewChild;
|
||||
(selector: Type<any>|Function|string, opts?: {read?: any, static?: boolean}): any;
|
||||
new (selector: Type<any>|Function|string, opts?: {read?: any, static?: boolean}): ViewChild;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -177,13 +177,13 @@ export interface ConstructorSansProvider {
|
|||
export declare type ContentChild = Query;
|
||||
|
||||
export interface ContentChildDecorator {
|
||||
(selector: Type<any> | Function | string, opts: {
|
||||
(selector: Type<any> | Function | string, opts?: {
|
||||
read?: any;
|
||||
static: boolean;
|
||||
static?: boolean;
|
||||
}): any;
|
||||
new (selector: Type<any> | Function | string, opts: {
|
||||
new (selector: Type<any> | Function | string, opts?: {
|
||||
read?: any;
|
||||
static: boolean;
|
||||
static?: boolean;
|
||||
}): ContentChild;
|
||||
}
|
||||
|
||||
|
@ -1150,7 +1150,7 @@ export interface Query {
|
|||
isViewQuery: boolean;
|
||||
read: any;
|
||||
selector: any;
|
||||
static: boolean;
|
||||
static?: boolean;
|
||||
}
|
||||
|
||||
export declare abstract class Query {
|
||||
|
@ -1444,13 +1444,13 @@ export declare const VERSION: Version;
|
|||
export declare type ViewChild = Query;
|
||||
|
||||
export interface ViewChildDecorator {
|
||||
(selector: Type<any> | Function | string, opts: {
|
||||
(selector: Type<any> | Function | string, opts?: {
|
||||
read?: any;
|
||||
static: boolean;
|
||||
static?: boolean;
|
||||
}): any;
|
||||
new (selector: Type<any> | Function | string, opts: {
|
||||
new (selector: Type<any> | Function | string, opts?: {
|
||||
read?: any;
|
||||
static: boolean;
|
||||
static?: boolean;
|
||||
}): ViewChild;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue