TypeScript has no runtime check to ensure that loaded data matches the types. We currently use JSON schemas that we generate from our types with typescript-json-schema via a CLI and then validate in runtime with ajv. A great solution we thought until we found that it didn't play well with JS dates since dates are not part of JSON.
Does anyone have a solution for this? We use types not classes.