Angular dynamic forms project migration - encountering Type T | undefined error
In my quest to find a sample project demonstrating the creation of Angular forms using JSON datasets, I stumbled upon this repository: https://github.com/dkreider/advanced-dynamic-angular-form
Upon successful setup and execution of the advanced-dynamic-angular-form project on my local machine, I decided to migrate the code to a new starter project in order to delve deeper into its workings. However, during the migration process, I encountered an error in one of the class files, form-field.ts.
The error message reads as follows: "src/app/model/form-field.ts:27:5 - error TS2322: Type 'T | undefined' is not assignable to type 'T'. 'T' could be instantiated with an arbitrary type which could be unrelated to 'T | undefined'. Line: 27 this.value = options.value;"
To access the specific file within the GitHub project, please follow this link: https://github.com/dkreider/advanced-dynamic-angular-form/blob/master/src/app/form-field.ts
I assumed that the code would seamlessly work in my new project without requiring any modifications. Could it be related to project configuration settings or compiler options?
After comparing the angular.json, tsconfig.json, package.json files between the two projects, I failed to identify any significant differences.
If you wish to download my starter project, feel free to visit this link: formTest. Additionally, here is a direct link to form-fields.js in my formTest project. Despite my efforts, I suspect that I might be overlooking something fundamental.
Any assistance or guidance provided will be greatly appreciated. Thank you!