Skip to content

build project with ivy enabled #14

@SourceCodeBot

Description

@SourceCodeBot

help wanted, question

using ivy enabled and form typed
export type RecipeForm = Omit<Recipe, 'id'>;
cause in prod build the following error

ERROR in .../component.html(1,7): Type 'FormGroup<Pick<Recipe, "title" | "parts" | "description" | "duration">>' is missing the following properties from type 'FormGroup': _parent, _asyncValidationSubscription, _updateAncestors, _setInitialStatus, and 4 more.

source line is <form [formGroup]="form">

and the necessary code parts are
public form: FormGroup<RecipeForm>;
and
this.form = new FormGroup({ title: new FormControl<string>('', [ Validators.required, Validators.maxLength(100) ]), description: new FormControl<string>('', Validators.required), duration: new FormControl(null) });

is this error in ivy or this project?
without ivy enabled in tsconfig.app.json it build fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions