Theo's Typesafe Cult

TTC

Theo's Typesafe Cult

Join the community to ask questions about Theo's Typesafe Cult and get answers from other members.

Join

Theme naming

Hey so I'm looking to build a little ui kit / design system for my personal projects and I'm wondering what approach I should take re. colors I was thinking something like daisyui https://github.com/saadeghi/daisyui/blob/master/src/colors/colorNames.js with a primary, primary-focus etc...

inheritance with prisma

I had a question similar to https://discord.com/channels/966627436387266600/966786610362474576/1017109977036492930 , except mine is at the model level and not table. that is, if I want to retrieve a list of items from the Apple table and Orange table which has shared properties like "id" and "type" although type would be unique to each respective table like granny smith and red delicious for apple and navel and tangerine for orange, I was wondering if there's model-level support for this. I can...

Per-Page Layouts in T3

Hey guys I was attempting to implement per page layouts on the t3 starter template as shown here: https://nextjs.org/docs/basic-features/layouts#with-typescript I kept running into Typescript issues. Any way I could go about this in a way I could make Typescript happy?...

500 error on api call RAILWAY

the frontend app starts but it doesn't connect to the right url of the api it gives me 500 error.. the url of the call on the right is not right.... thats the url of the same site, like it's calling it's self but i setted up the env var for the api calls right...

Implement Recurring Meetings

I am working on a (slightly more than) meeting management app. I want to implement recurring meetings (as in every week, every day, etc). I am not quite sure how to go about it though. Should I just store a start time, duration, and the interval and simply derive it when I need to? Or should I store a start time, end time, and duration and have some form of scheduled event that actually updates the DB? Maybe something else entirely? I do also need some other actions to be done after a meeting finishes. ...

tailwind intellisense

Have not been able to get this working for the last day on any project using any config. I feel like the issue has to be with my vsc or some other extension causing it to crash

Application Error, app not listening on $PORT?

i uploaded an app with the railway cli and setted the env variable called PORT, but it's still broken..

Sign out (redirect true) in Docker

So I have this problem where I want to use
signOut({redirect:true})
signOut({redirect:true})
and let's say that NEXT_AUTH_URL=localhost:3000...

alternatives to ag-grid

Does anyone have any recommendations for an alternative to ag-grid, this is for work and we really need a nice data grid solution and want to know if poeple have had experience with robust alternatives We are using vue3 so looking for multiplatform grids ideally...

Will Copilot or other AI Code-Gen solutions *ruin* Advent of Code this year?

^ If not, how far away do you predict that point to be? ...

check if a key is required on a zod object

is there a way to tell if a key on a zod object is required edit: is there a way to tell if a key on a zod object is required in typescript programmatically...

For low computational work should I do it on server or client ?

It probably won't make a difference at low scale. So I probably shouldn't worry too much about this but still. Here is an example to make my question clearer. I want to implement a translated input on my client....

Is there a scaleable realtime type safe message broker?

Im currently using pusher. But it is not type safe. Or at least i havent found a way to make it type safe. Anyone have a better alternative?...

TRPC use api externally

Hi, i want to use my trpc api externally, as understand it because trpc uses superjson i cant just pass info to the backend doing something like in the screenshot. Would it be better to just have a regular api route not using trpc?

React Typescript useContext( ) generic type

Please who's got a better ideal on how to solve this problem with React && Typescript useContext() ?

Python DX

Hey guys! I recently had to code python service and noticed that DX is extremely poor compared to something like Typescript. The question is, what are the best tools to improve python DX (transpilers, type hints, etc.)?

any ideas on how to model this in prisma?

creating 2 tables and referencing them seems like a good approach but i am kinda confused

Modifying inferred type of deeply nested object

Hi folks, Say I have a deeply nested object that I'm inferring types of. type MyObj = typeof myObj ...

Hoisting in nextJs

Wondering if this can somehow be enabled? ``` const logHandler = () => handleFoo(); // 'handleFoo' was used before it was defined const handleFoo = () => console.log('foo');...