Skip to content

Instantly share code, notes, and snippets.

View shaungrady's full-sized avatar
👋
I ❤️ TypeScript

Shaun Grady shaungrady

👋
I ❤️ TypeScript
View GitHub Profile
@dmorosinotto
dmorosinotto / TestTypedForms.ts
Last active July 7, 2023 05:09
Typed @angular/forms FIXED set/patchValue - strict all the way down ^_^
import { FormGroup, FormControl, FormArray, Validators } from "@angular/forms";
function testFormGroupTyped() {
var frm = new FormGroup({
a: new FormArray([new FormControl(0)]),
b: new FormControl(true),
c: new FormGroup({
s: new FormControl("abc"),
n: new FormControl(123)
})