Malte Legenhausen

Results 151 comments of Malte Legenhausen

The problem is that in an `intersection` every type need to be valid for the given object. My recommendation for this case would be to parse the object in several...

@etiennebatise feel free to provide a PR. That would make it a lot easier to review the code and give you feedback.

```ts export interface Metadata extends Record {} export interface MetadataC extends t.Type {} export function Metadata(T: t.Type): MetadataC { return t.record(t.string, T) } ```

Just repeat the pattern for all parent types. ```ts export interface HealthInfo { date: Date metadata?: Metadata } export interface HealthInfoOutput { date: string metadata?: Metadata } export interface HealthInfoC...

Could you please provide a reproducible example?

Just for clarification in your `assertIs` function you use `Type` which is equivalent to `Type` but `NumberFromString` is `Type`. So you shouldn't be able to use it in your `assertIs`...

Why not simply use decode as your assert function. I normally have a `cast` function defined for unsafe casting where I know it is ok to throw. ```ts import *...

When it comes to `assert` functions I am not the right person to argue about with them cause I never used them or ever had the need to use them....

Do you have an example for your problem?

`intersection` has a `types` array were you can access the inner types. Then you can use `props` again.