Kodjo.ai
Kodjo.ai
Explore posts from servers
DDeno
Created by Kodjo.ai on 8/30/2024 in #help
@deno/emit's transpile with JSR
Thank you, I don't know why I didnt answered back then. And why it resurface now
15 replies
HHono
Created by Kodjo.ai on 8/29/2024 in #help
Combine SSR and Client Components without HonoX
Deno is node compatible now
11 replies
DDeno
Created by Kodjo.ai on 2/27/2024 in #help
Deno LSP + React + TypeScript + Vite (--node-modules-dir)
Do you have a package.json or deno.json at the root of your project? Did you generate your vite project with the npm package create-vite?
22 replies
DDeno
Created by Kodjo.ai on 2/27/2024 in #help
Deno LSP + React + TypeScript + Vite (--node-modules-dir)
I don’t understand why you need to use Deno check if you use VS Code with the Deno extension for LSP
22 replies
DDeno
Created by Kodjo.ai on 2/27/2024 in #help
Deno LSP + React + TypeScript + Vite (--node-modules-dir)
22 replies
DDeno
Created by Kodjo.ai on 2/27/2024 in #help
Deno LSP + React + TypeScript + Vite (--node-modules-dir)
in fact all this was painfully useless ❌ Don't deno run -A npm:create-vite-extra ✅ Do deno run -A npm:create-vite Extra have deno.json, but with Deno now, especially with Existing templates out there and Deno2 RCs, it better have a package.json, then you install with deno install and run your package.json task with deno run taskName
22 replies
DDeno
Created by Kodjo.ai on 2/27/2024 in #help
Deno LSP + React + TypeScript + Vite (--node-modules-dir)
So basically you were right, also it needed to do: deno add npm:@types/react npm:@types/react-dom
22 replies
DDeno
Created by Kodjo.ai on 2/27/2024 in #help
Deno LSP + React + TypeScript + Vite (--node-modules-dir)
Exactly. They probably use vim too much. At least it don’t work on Visual Studio Code. Because yea the project works and reload nicely but LSP is blind to the setup
22 replies
DDeno
Created by Kodjo.ai on 2/27/2024 in #help
Deno LSP + React + TypeScript + Vite (--node-modules-dir)
Thank you! I’ll check that as soon as possible 🙏
22 replies
DDeno
Created by Kodjo.ai on 2/27/2024 in #help
Deno LSP + React + TypeScript + Vite (--node-modules-dir)
That's pretty bad isn't it?
22 replies
DDeno
Created by Kodjo.ai on 2/27/2024 in #help
Deno LSP + React + TypeScript + Vite (--node-modules-dir)
I've managed to solve quite a bit of errors. Don't know if its the right way tho. deno.json I've added
"imports": {
"react": "npm:react@^18.2.0",
"react-dom": "npm:react-dom@^18.2.0"
},
"compilerOptions": {
"lib": [
"dom"
],
"jsx": "react-jsx",
"jsxImportSource": "react",
"types": [
"npm:@types/react",
"npm:@types/react-dom"
]
}
"imports": {
"react": "npm:react@^18.2.0",
"react-dom": "npm:react-dom@^18.2.0"
},
"compilerOptions": {
"lib": [
"dom"
],
"jsx": "react-jsx",
"jsxImportSource": "react",
"types": [
"npm:@types/react",
"npm:@types/react-dom"
]
}
But TypeScript don't give me Type inferrance this way App.tsx
const [count, setCount] = useState(0);
// ...
<button onClick={() => setCount((count) => count + 1)}>
const [count, setCount] = useState(0);
// ...
<button onClick={() => setCount((count) => count + 1)}>
error/lint to: Parameter 'count' implicitly has an 'any' type.deno-ts(7006) Because count is not inferred, the only way I managed to solve this is by annotating the type
<button onClick={() => setCount((count: number) => count + 1)}>
<button onClick={() => setCount((count: number) => count + 1)}>
22 replies
HHono
Created by Kodjo.ai on 8/29/2024 in #help
Combine SSR and Client Components without HonoX
Thank you solved!
11 replies
DDeno
Created by Kodjo.ai on 8/30/2024 in #help
@deno/emit's transpile with JSR
I really don’t know how to do it with hono. My index.html is loaded from / from static, then it ask for client.js, and this is why I tried to use the @deno/emit’s transpile call. Even better can I just strip the ts stuff without types check
15 replies
DDeno
Created by Kodjo.ai on 8/30/2024 in #help
@deno/emit's transpile with JSR
Yes I want it in RAM man please 🙏🏾
15 replies
DDeno
Created by Kodjo.ai on 8/30/2024 in #help
@deno/emit's transpile with JSR
Do you know how can I manage to do it?
15 replies
DDeno
Created by Kodjo.ai on 8/30/2024 in #help
@deno/emit's transpile with JSR
I really don’t care it’s slower, 99.99% of application don’t need speed. The only reason I’m on Deno is for no build
15 replies
DDeno
Created by Kodjo.ai on 8/30/2024 in #help
@deno/emit's transpile with JSR
No build steps
15 replies
DDeno
Created by Kodjo.ai on 8/30/2024 in #help
@deno/emit's transpile with JSR
⬆️
15 replies
DDeno
Created by Kodjo.ai on 8/30/2024 in #help
@deno/emit's transpile with JSR
I would love something on the fly like Fresh used to be, isn’t with the past Deno.emit() call now replaced with package @deno/emit
15 replies
HHono
Created by Kodjo.ai on 8/29/2024 in #help
Combine SSR and Client Components without HonoX
Yes, there’s no example how to do it
11 replies