I want to create a utility function which creates a checklist by adding an isChecked knockout observable property to each item in an array. This function should
isChecked
There isn't a way to express this in TypeScript.
You can obviously do this instead:
interface CheckListItem { isChecked: KnockoutObservable; item: T; }
This has the advantage of not breaking the object when it happens to have its own isChecked property.