dopeinc
dopeinc
TTCTheo's Typesafe Cult
Created by dopeinc on 6/20/2023 in #questions
Infer type of object values in array
I have some playground if ever you want them
9 replies
TTCTheo's Typesafe Cult
Created by dopeinc on 6/20/2023 in #questions
Infer type of object values in array
the former didn't understand that my array of managedProperties could have multple values of different type it would always match the first one
9 replies
TTCTheo's Typesafe Cult
Created by dopeinc on 6/20/2023 in #questions
Infer type of object values in array
Yeah I went this way but it was more complicated ended up doing this , its safe but unsafe but works 🙂 :
type ManagedProperty<T> = {
id: string
type: 'location' | 'status' | 'users' | 'fileType'
order: number
value: T
onSubmit?: (data: LocationData) => void
}

interface Props<T extends readonly ManagedProperty<unknown>[]> {
managedProperties: T
}
type ManagedProperty<T> = {
id: string
type: 'location' | 'status' | 'users' | 'fileType'
order: number
value: T
onSubmit?: (data: LocationData) => void
}

interface Props<T extends readonly ManagedProperty<unknown>[]> {
managedProperties: T
}
9 replies
TTCTheo's Typesafe Cult
Created by dopeinc on 6/20/2023 in #questions
Infer type of object values in array
Question is in comment at the bottom
9 replies
TTCTheo's Typesafe Cult
Created by Perfect on 4/30/2023 in #questions
UI for updating role
I would prevent the list from reordering after the update but thats only me 🤷🏽‍♂️
22 replies
TTCTheo's Typesafe Cult
Created by Lopen on 4/30/2023 in #questions
which code is best to create a class for an express app
Why use a class ?
2 replies
TTCTheo's Typesafe Cult
Created by Greg on 4/30/2023 in #questions
Is there a way to force data to update on a new page with t3 without having to click the page
Prefetch ?
9 replies
TTCTheo's Typesafe Cult
Created by Perfect on 4/30/2023 in #questions
UI for updating role
Was looking for something like optimistic update to prevent some flashing rendering thanks !
22 replies
TTCTheo's Typesafe Cult
Created by kanekikun9962 on 4/29/2023 in #questions
I install t3 app but idk why editor is not detecting modules
Did you npm install ?
7 replies
TTCTheo's Typesafe Cult
Created by meow on 4/28/2023 in #questions
Prisma `delete` a row with composite keys
Yes or the relation need to be unique I think I ran in the issue and used delete many i’ll look into uniques tomorrow.
3 replies
TTCTheo's Typesafe Cult
Created by deforestor on 4/28/2023 in #questions
PlanetScale workflow confuses me
Not sure I just comment to follow the discussions for further knowledge
28 replies
TTCTheo's Typesafe Cult
Created by nickparks on 4/28/2023 in #questions
Any ideas why TRPC doesnt find the mutation?
Oh interesting…. I wonder why ill look into it thanks for clarifying
16 replies
TTCTheo's Typesafe Cult
Created by nickparks on 4/28/2023 in #questions
Any ideas why TRPC doesnt find the mutation?
did you restart you server ? just in case and or update the libs if there are update.
16 replies
TTCTheo's Typesafe Cult
Created by nickparks on 4/28/2023 in #questions
Any ideas why TRPC doesnt find the mutation?
console.log*
16 replies
TTCTheo's Typesafe Cult
Created by nickparks on 4/28/2023 in #questions
Any ideas why TRPC doesnt find the mutation?
you can just call a clog mutation
16 replies
TTCTheo's Typesafe Cult
Created by nickparks on 4/28/2023 in #questions
Any ideas why TRPC doesnt find the mutation?
I would go step by step and comment out stuff inside the mutation. make it simple just logging input data and from there expand. I have no clue. everything seems fine at first glance
16 replies
TTCTheo's Typesafe Cult
Created by nickparks on 4/28/2023 in #questions
Any ideas why TRPC doesnt find the mutation?
prisma says you cant use skipduplicate on sqlserver but I don't think its that since pscale is mysql . But you could try without it
16 replies
TTCTheo's Typesafe Cult
Created by nickparks on 4/28/2023 in #questions
Any ideas why TRPC doesnt find the mutation?
Okay pscale is mysql i dont think its sql server , but all of this seems fine let me keep digging
16 replies
TTCTheo's Typesafe Cult
Created by ehrenhafterhase on 4/27/2023 in #questions
Why do my static files not load on first load and my links not work on first click?
You can also set priority to some image if im not mistaken
4 replies