praskoo
praskoo
TTCTheo's Typesafe Cult
Created by praskoo on 8/15/2023 in #questions
When using pnpm instead of npm, my .d.ts declaration files don't work.
I'm using this .d.ts file:
import type * as CSS from "csstype";

declare module "csstype" {
interface Properties {
// Allow any CSS Custom Properties
[index: `--${string}`]: any;
}
}
import type * as CSS from "csstype";

declare module "csstype" {
interface Properties {
// Allow any CSS Custom Properties
[index: `--${string}`]: any;
}
}
to allow me to easily use CSS custom properties in style={{}} tags. I tried creating a new next.js project with pnpm (pnpm create next-app) and adding this declaration at the root of the project and it doesn't work, the editor is reporting errors and my build fails. If I move the project over to npm (remove node modules, remove pnpm-lock.yaml, run npm i), it starts working and my build succeeds. Any ideas?
3 replies
TTCTheo's Typesafe Cult
Created by praskoo on 4/18/2023 in #questions
Webhooks correct terminology
Context: I am working on an app, I need to be able to explain this to the rest of the team and not get myself/others confused. Scenario: I registered a "thing" on a service that sends POST requests to an API endpoint on my server when certain things happen (a webhook?). When my server receives this request, I write the data from it to my database and respond with 200. Question: What's THE webhook in this scenario? Is the webhook the endpoint on my server that's receiving these events, or is the webhook the service itself that's sending these events? Or is it somehow the whole thing together?
7 replies