|
|
|
|
|
by randomdata
867 days ago
|
|
> People are asking to be able to prevent users of your library to provide illegal values. [...] and Typescript Typescript, you say? const bar: Foo = {} as Foo
Hmm. Oh, right, just don't hold it wrong. But "sometimes it's nice to work with a type system where designers of libraries can actually prevent you from writing bugs."Your example doesn’t even satisfy the base case, let alone the general case. Get back to us when you have actually read the thread and can provide something on topic. |
|