Hacker News new | ask | show | jobs
by tlrobinson 1066 days ago

    const schema = fs.readFileSync(path.join(__dirname, "sentimentSchema.ts"), "utf8");
    const translator = typechat.createJsonTranslator<SentimentResponse>(model, schema, "SentimentResponse"); 
It would have been much nicer if they took this an an opportunity to build generic runtime type introspection into TypeScript.