NestarZ
Explore posts from serversWhy JSX is not working ?
// @deno-types="@types/react"
import React from "react";
const A = (): React.ReactElement => <div />;
const B = (): React.ReactElement => <A />;
TS2786 [ERROR]: 'A' cannot be used as a JSX component.
Its type '() => React.ReactElement' is not a valid JSX element type.
Type '() => React.ReactElement' is not assignable to type '(props: any, deprecatedLegacyContext?: any) => ReactNode'.
Type 'ReactElement<any, string | JSXElementConstructor<any>>' is not assignable to type 'ReactNode'.
Property 'children' is missing in type 'ReactElement<any, string | JSXElementConstructor<any>>' but required in type 'ReactPortal'.
const B = (): React.ReactElement => <A />;
^
at file:///Users/elias/code/bureaudouble/bureau/src/routes/Home.tsx:23:38
'children' is declared here.
children: ReactNode;
~~~~
at file:///Users/Library/Caches/deno/npm/registry.npmjs.org/@types/react/18.2.57/index.d.ts:326:9
3 replies
How to apply @deno-types on a dynamic import
Is not working, how to apply @Deno-types on a dynamic import ?
I get this error:
Check file:///Users/code/bureau/mod.ts
error: Uncaught Error: Failed resolving package subpath './client' for '/Users/Library/Caches/deno/npm/registry.npmjs.org/react-dom/18.2.0/package.json': [ERR_PACKAGE_PATH_NOT_EXPORTED] Package subpath './client' is not defined for types by "exports" in '/Users/Library/Caches/deno/npm/registry.npmjs.org/react-dom/18.2.0/package.json' imported from '/Users/code/bureau/src/lib.ts'
4 replies
Preact Hello World is not working
/** @jsxImportSource https://esm.sh/preact */
import { useState } from "https://esm.sh/preact/hooks";
export const A = () => {
const [d] = useState(1);
return (
<div>
{d}
</div>
);
};
const v = A();
I'm trying to start this simple program but it leads to
error: Uncaught TypeError: Cannot read properties of undefined (reading '__H')
Can you help me please ?
I'm running it using deno run -A test.tsx
3 replies
CDCloudflare Developers
•Created by NestarZ on 11/10/2023 in #general-help
CLI command to assign a custom domain to a R2 bucket
Question: Is there any way to assign a custom domain to a R2 bucket using the wrangler command line tool ?
Or some script that doesnt involve the web dashboard ?
2 replies
Deno.readDir on current script even if used like an http package.
Hello !! I would like to do Deno.readDir and readFiles on files relative to the script that execute Deno.readDir even if the script lives in deno.land/x. How should I do it ? Any help is welcomed thank you.
2 replies
Python alternative to ctypes, can't figure how to convert a code
Hello,
I am trying to convert a Python ctypes code to Deno using FFI, but can't know why its not working
I am looking for a bit of help, any would be gladly welcomed !
For now the code just hang when calling
whisper.whisper_full_default_params
3 replies