scatter
scatter
Explore posts from servers
TTCTheo's Typesafe Cult
Created by Luc Ledo on 5/30/2023 in #questions
T3 env lint error on Github CI
just had this myself and found a much better solution was to copy my .env.example to .env on the ci side, then the vars get pulled in and validated
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@0609f0983b7a228f052f81ef4c3d6510cae254ad
with:
version: 7.5.2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"
- run: cp .env.example .env # this right here - make sure it goes after checkout
- run: pnpm install
- run: pnpm lint
- run: pnpm build
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@0609f0983b7a228f052f81ef4c3d6510cae254ad
with:
version: 7.5.2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"
- run: cp .env.example .env # this right here - make sure it goes after checkout
- run: pnpm install
- run: pnpm lint
- run: pnpm build
5 replies
TTCTheo's Typesafe Cult
Created by Tolek Bajer on 9/30/2022 in #questions
Requirements to start with t3
paraphrasing theo but it's a belief i've held since before i heard him say it: don't "learn" tech, use tech. dive in, and when you hit a problem you don't know how to solve, look up how to solve that problem. before long you'll be very confident in using it
6 replies
TTCTheo's Typesafe Cult
Created by venego on 9/29/2022 in #questions
why don't we have a compiled version of css and html?
even if this proposal worked i don't know if there would be any benefit
18 replies
TTCTheo's Typesafe Cult
Created by venego on 9/29/2022 in #questions
why don't we have a compiled version of css and html?
to what end? as i understand browser performance is mostly due to client side js
18 replies
TTCTheo's Typesafe Cult
Created by benten on 9/29/2022 in #questions
Most performant way to check props against a massive list?
how many is "a large amount"? if iterating your props is causing perf issues i imagine there's a better way to handle those props
14 replies
TTCTheo's Typesafe Cult
Created by neochrome on 9/29/2022 in #questions
Whats the correct way to wait for `trpc.useQuery` to finish and then update state?
use the onSuccess callback of useQuery's opts
7 replies
TTCTheo's Typesafe Cult
Created by venego on 9/29/2022 in #questions
why don't we have a compiled version of css and html?
html is markup. browsers would have to parse it regardless, "compiling" wouldn't be any faster unless you change how browsers work, and even then you'd have to compile for each browser separately
18 replies
TTCTheo's Typesafe Cult
Created by Grey on 9/28/2022 in #questions
React Icon situation
+1 react-icons, very easy to use and the library is obviously huge since it has so many different ones. maybe not the best if you care about consistent design language to be fair
11 replies
TTCTheo's Typesafe Cult
Created by plyglt on 9/28/2022 in #questions
Accessing req & res in Trpc + Next.js
yeah, tRPC is a different paradigm from REST, if you think you need req/res you're probably doing something wrong
13 replies
TTCTheo's Typesafe Cult
Created by JulieCezar on 9/28/2022 in #questions
[TypeScript] How would you go about creating an Array that can have different types of objects?
there’s no way for it to know what’s what when looping unless there’s something concretely different about the elements, something you can test for with JS
25 replies
TTCTheo's Typesafe Cult
Created by JulieCezar on 9/28/2022 in #questions
[TypeScript] How would you go about creating an Array that can have different types of objects?
so just because typescript knows at compile time that it added some numbers, strings, Circles, Squares, whatever, to an array
25 replies
TTCTheo's Typesafe Cult
Created by JulieCezar on 9/28/2022 in #questions
[TypeScript] How would you go about creating an Array that can have different types of objects?
the reason, btw, that you have to add (or use an existing) a discriminating property is that typescript is compile time ONLY
25 replies