Skip to content

Content Tagged "assign"

Page 1 of 1

Content Tagged "assign"

Initialize a Typescript Interface with JSON

February 20, 2017Category: Software
TL;DR: You can initialise a typescript interface using JSON objects. On my quest to load and save objects as JSON, I found that you can convert a JSON object to an interface via something called type assertion . Basically, if you have an interface: you can load a JSON object via JSON.parse(json…

All tags