currenthandle
currenthandle
TTCTheo's Typesafe Cult
Created by currenthandle on 12/21/2023 in #questions
Blob doesn't work??
So I've tried this three times now, again just now: you can't upload an ONNX file as a Blob ERROR! Invalid config. Error: Could not determine type for relu1.onnx, presigned URL generation failed at getTypeFromFileName
3 replies
TTCTheo's Typesafe Cult
Created by currenthandle on 10/18/2023 in #questions
Can I Uploadthing to upload .onnx files?
Can I use uploadthing to upload .onnx (and custom file types) using uploadthing? I Had issues uploading .onnx files in the past, but I may have been using it wrong. It wasn't in the supported file types and I tried to use blob but I couldn't get it to work. Maybe I was doing something wrong? https://stackoverflow.com/questions/76105855/send-blob-image-from-frontend-to-backend-with-nextjs-and-trpc-t3-stack#comment136300369_76165918
4 replies
TTCTheo's Typesafe Cult
Created by currenthandle on 7/30/2023 in #questions
Looking for a dts-bundle that is maintained
Is there a more well maintained solution than dts-bundle for just getting a single index.d.ts out of webpack? Am I doing this wrong ?:) https://github.com/TypeStrong/dts-bundle
2 replies
TTCTheo's Typesafe Cult
Created by currenthandle on 7/29/2023 in #questions
ESlint: Require explicit return types on exported functions, yes or no??
Per Theo's video I'll post below and the well articulated logic within, it's best to avoid using explicit return types whenever possible. I just jumped in on a codebase that has eslint rules that yell at me when I don't explicitly type the return type of function's that are exported ie export function foo() and export default function. Should I (suggest we) disable this and let the return types be inferred as Theo suggested of functions in the below video? Specifically I am asking about this eslint rule: https://github.com/typescript-eslint/typescript-eslint/blob/v4.33.0/packages/eslint-plugin/docs/rules/explicit-module-boundary-types.md https://www.youtube.com/watch?v=I6V2FkW1ozQ&t=495s
33 replies
TTCTheo's Typesafe Cult
Created by currenthandle on 5/27/2023 in #questions
Switching to double quotes and adding semicolon on save
I just created a new project with pnpm create t3-app@latest. How do I change the project prettier config so that it uses single quotes and no terminating semicolons?
4 replies
TTCTheo's Typesafe Cult
Created by currenthandle on 1/9/2023 in #questions
Promise-returning function provided to attribute where a void return was expected.
On line 18 of https://pastebin.com/9EXv58Bn I am getting the error shown in the title. Should I just disable this eslint error with // eslint-disable-next-line @typescript-eslint/no-misused-promises as suggested in the "Quick Fix" ? Or update the default .eslintrc.json provided by create-t3-app?
4 replies
TTCTheo's Typesafe Cult
Created by currenthandle on 12/17/2022 in #questions
Zod inferred union type does not work properly; 'hackerProfile' does not exist on type...
Typescript is telling me that hackerProfile, partnerProfile, and mentorProfile don't exist on my UpdateUserInput, which I inferred from Zod. Even though I can see hackerProfile, partnerProfile, and mentorProfile in the type when I hoer my cursor over it in VS code. It doesn't seem to have a problem with userUpdate. What's going on here? https://github.com/currenthandle/next-apollo/blob/working-state/server/src/utils/validators.ts#L76 https://github.com/currenthandle/next-apollo/blob/working-state/server/src/graphql/resolvers/mutations.ts#L28
3 replies
TTCTheo's Typesafe Cult
Created by currenthandle on 12/12/2022 in #questions
Prisma Next-Auth PlanetScale foreign key constraints are not allowed
I am following the official docs to setup next-auth with prisma: https://next-auth.js.org/adapters/prisma. After copying these models (Session, Account, VerificationToken) into my schema.prisma I get the following error when I try to do a prisma db push. Am I missing something? How do I correct this issue? https://stackoverflow.com/questions/74769279/prisma-next-auth-planetscale-foreign-key-constraints-are-not-allowed
4 replies
TTCTheo's Typesafe Cult
Created by currenthandle on 11/19/2022 in #questions
Why is noUncheckedIndexedAccess enabled by default?
I started a project using create-t3-app and I was getting all these type checker errors throughout my code, which forced me to manually reassert types all over the place. Setting "noUncheckedIndexedAccess": false in tsconfig.json solved the problem with my type checker but I'm left wondering why this was enabled by default in the first place. Manually reassert types all over the place seems to run contrary to this discussion: https://www.youtube.com/watch?v=RmGHnYUqQ4k
47 replies
TTCTheo's Typesafe Cult
Created by currenthandle on 11/16/2022 in #questions
Reducer Sets Wrong State When React's Strict Mode is Enabled
1 replies
TTCTheo's Typesafe Cult
Created by currenthandle on 11/12/2022 in #questions
List In UI Not Showing New Data Until Refreshed tRPC React-Query
II am showing a shopping list of items. I can create new items from web form but they don't show in the page until I refresh or click off the page and then click back on the webpage. Am I using react-quest / tRPC queries properly? https://stackoverflow.com/questions/74411386/list-in-ui-not-showing-new-data-until-refreshed-trpc-react-query
10 replies
TTCTheo's Typesafe Cult
Created by currenthandle on 10/28/2022 in #questions
How to Auth with CredentialsProvider
Can someone link me to an article/build/tutorial/docs that show how to sign up new users and authenticate them in the T3 stack by using the CredentialsProvider from next-auth rather than OAuth-ing with 3rd party service? I've found lots that show how to OAuth but the CredentialsProvider seems a bit more involved and something I definitely want in my apps.
5 replies
TTCTheo's Typesafe Cult
Created by currenthandle on 10/27/2022 in #questions
Already in a git worktree
When using CTA, I select the "Initialize new git repo" option but after the npm install it says there is all ready a git worktree and ask me if I want to initialize a new one. What's going on here? Why is it trying to initialize a git repo twice? Warning: "my-project" is already in a git worktree. Would you still like to initialize a new git repository in this directory? (y/N)
1 replies
TTCTheo's Typesafe Cult
Created by currenthandle on 10/27/2022 in #questions
Create-T3-App tRPC 9
Can I create a project with tRPC 9 via CTA or do I have to use 10 beta? If so how?
41 replies