-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
refactor(ivy): remove pipe references from the template #23032
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small nit
* @param type Pipe class reference. Needed to extract pipe lifecycle hooks. | ||
* @param factory A factory for creating a pipe instance. | ||
* @param pure Whether the pipe is pure. | ||
*/ | ||
export function definePipe<T>( | ||
{type, factory, pure}: {type: Type<T>, factory: () => T, pure?: boolean}): PipeDef<T> { | ||
{name, type, factory, pure}: {name: string, type: Type<T>, factory: () => T, pure?: boolean}): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you add docs here (same as componentDef
)
*/ | ||
export function renderTemplate<T>( | ||
hostNode: RElement, template: ComponentTemplate<T>, context: T, | ||
providedRendererFactory: RendererFactory3, host: LElementNode | null, | ||
directiveRegistry: DirectiveDefListOrFactory | null = null): LElementNode { | ||
{directives, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's not use {}
in args since they are not efficient and require object creation. I think sticking to positional args is safer.
You can preview df6def1 at https://pr23032-df6def1.ngbuilds.io/. |
You can preview 0849e21 at https://pr23032-0849e21.ngbuilds.io/. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
This PR removes all pipe references from the template. This improves locality because host components won't need to know what their pipes are at compile-time.
Template:
Generated (before):
Generated (after):