Typescript team has explicitly stated that they don’t intend to extend typescript’s static type checking to the runtime.
Typescript Design Goals lists the following in the section on Non-goals:
Add or rely on run-time type information in programs, or emit different code based on the results of the type system. Instead, encourage programming patterns that do not require run-time metadata.
However, this also implies that for cases when static typing cannot help us we need to separately write validators using a validation library (eg. Joi) which has to be kept in sync with the typescript types.
This post outlines an approach to eliminate this redundancy using the io-ts library by Giulio Canti. This approach has also been adopted by some other libraries like MobX State Tree.
Continue reading Typescript and validations at runtime boundaries
An introductory tutorial on making event scheduling management more accessible and configurable to administrators through database driven admin interfaces in Rails.
Annotate is a very useful utility for annotating schema information in Rails models. The gem prepends (or appends, as per your configuration) a summarized information about the table schema in each model file as comments) – saving multiple roundtrips to the schema.rb file during coding.
A small demonstration to show that solutions attempting to protect against scraping through obfuscated fonts are not full proof.
Devise is an incredibly popular authorization gem for Rails. Unfortunately allowing a user to log in through multiple emails is not as straightforward as one might expect. This post outlines a way to do just that.
While emacs is well known to be a very productive editor, there are a few additional steps one must take to set it up as a development environment for Ruby on Rails. This post outlines my current setup.