refactor(ivy): remove obsolete types (#25767)

In the past factories could return an array with content queries
but we no longer manage queries in factory functions.

PR Close #25767
This commit is contained in:
Pawel Kozlowski
2018-08-31 16:52:13 +02:00
committed by Misko Hevery
parent 31349fde90
commit 1e3460be0b
2 changed files with 2 additions and 5 deletions

View File

@ -515,7 +515,7 @@ export const defineDirective = defineComponent as any as<T>(directiveDefinition:
/** /**
* Factory method used to create an instance of directive. * Factory method used to create an instance of directive.
*/ */
factory: () => T | ({0: T} & any[]); /* trying to say T | [T, ...any] */ factory: () => T;
/** /**
* Static attributes to set on host element. * Static attributes to set on host element.

View File

@ -127,11 +127,8 @@ export interface DirectiveDef<T, Selector extends string> extends BaseDef<T> {
/** /**
* Factory function used to create a new directive instance. * Factory function used to create a new directive instance.
*
* Usually returns the directive instance, but if the directive has a content query,
* it instead returns an array that contains the instance as well as content query data.
*/ */
factory(): T|[T]; factory(): T;
/** /**
* Function to create instances of content queries associated with a given directive. * Function to create instances of content queries associated with a given directive.