How I use an LLM to write and execute TypeScript "just-in-time" in my app
pscanf.com·7h·
Discuss: r/typescript
Flag this post

November 11, 2025

Summary

In this article, I explore an approach made possible by integrating code-writing LLMs into our apps: if you need to solve a problem whose complete scope is not known beforehand, give your users a way to run task-specific code snippets and ask the LLM to write a solution when the scope becomes known.

I give three examples of how I use this approach in my app—from answering questions about personal data to generating schema conversion functions and custom UIs. I then discuss the key challenge of correctness: how to make LLM-generated code reliable using strategies like type-checking and feedback loops, and how to handle inevitable mistakes when they occur.

Self-Promotion Disclosure

I wrote this article to promote myself as a consultant and the products I …

Similar Posts

Loading similar posts...