Typescript number array accepted string value
<p>I have this angular2 typescript array</p>

<p>part of my angular file</p>

<pre><code>export class ParametersForm {
  myForm: ControlGroup;
  systemParameters: AbstractControl;
  arr: number[];

  constructor(fb: FormBuilder) {
    this.myForm = fb.group({
      "realisations" : [""],
      "numConstSteps" : [""],
      "timeHorizon": [""],
      "continuationStep" : [""],
      "continuationStepSign" : [""],
      "numberOfModelParameters" : [""],
      "systemParameters" : [],
      "param" : [""],
      "netLogoFile" : [""],
      "numberOfModelVariables" : [""],
      "restrictOperator" : [""],
      "liftOperator" : [""],
      "xInitial" : [""]

    });
    this.arr = [];
    this.systemParameters = this.myForm.controls["systemParameters"];
  }
  addToArray(event, value: any): void {
    if (event.which === 13) {
      this.arr.push(value);
      (&lt;Control&gt;this.systemParameters).updateValue("");
    }
  }

  deleteItem(value: any): void {
    let pos = this.arr.indexOf(value);
    this.arr.splice(pos, 1);
    console.log(this.arr);
  }
  onSubmit(form: any): void {
    console.log(this.arr);
    form.systemParameters = this.arr;
    console.log("your submitted value:", form);
  }

}
</code></pre>

<p>you can see <code>arr:number[]</code></p>

<p>the way i read it, it says, this arr is an array of type number - expects numbers in it</p>

<p>then how come i can enter a string in it?</p>

<p>here is a plunker showing this (check in console after you press enter in input field)</p>

<p><a href="https://plnkr.co/edit/dHJf8QEhhvU5LupdDcmX?p=preview" rel="nofollow">plunkr</a></p>

<p>is that normal or?</p>