Skip to content

Can the FormGroup.controls property be typed ?  #37

@Xample

Description

@Xample

Hello, I am just wondering if there is a technical or strategic reason for:

https://github.com/dirkluijk/ngx-typesafe-forms/blob/master/projects/ngx-typesafe-forms/src/lib/form-group.ts#L33

  public controls!: {
    [key: string]: AngularAbstractControl;
  };

no to be typed as

   public controls!: {
        [K in keyof T]: AbstractControl<T[K]>;
    };

?

This would strongly make sense

BTW: thank you for this lib, I am still wondering why angular does not have this by default ;-)

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