In this case, it was done by code generation using: https://github.com/bcherny/json-schema-to-typescript
Personally, I'd prefer a way that doesn't involve another build step.
A popular library I've often seen mentioned is io-ts: https://github.com/gcanti/io-ts
One that I've taken a liking to, backed by ajv for JSON schema validation, is: https://github.com/andnp/ValidTyped
In this case, it was done by code generation using: https://github.com/bcherny/json-schema-to-typescript
Personally, I'd prefer a way that doesn't involve another build step.
A popular library I've often seen mentioned is io-ts: https://github.com/gcanti/io-ts
One that I've taken a liking to, backed by ajv for JSON schema validation, is: https://github.com/andnp/ValidTyped