Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
5
stevekrouse avatar

This is AWESOME! I hate having to do it with with the ?s

nbbaier avatar

@postpostscript, would there be a way to make Statement type safe in a way where we could do something like this:

interface User {
  name: string;
  age: number;
}

Statement<User>`insert into user values(${name}, ${age})`

Where it would type check if the write types were provided in replacements?

postpostscript avatar
nbbaier avatar

@postpostscript Awesome! Really cool, thanks for implementing this

postpostscript avatar

@nbbaier thanks, and no problem!

Updated: March 17, 2024