SyrupThinker
SyrupThinker
DDeno
Created by Mqx on 8/23/2023 in #help
Deno console.log() all items of array
To get the exact formatting you can use Deno.inspect with some options (https://deno.land/api@v1.36.2?s=Deno.InspectOptions)
console.log(
Deno.inspect(
longArray,
{ colors: true, iterableLimit: Infinity }
)
)
console.log(
Deno.inspect(
longArray,
{ colors: true, iterableLimit: Infinity }
)
)
7 replies
DDeno
Created by Pollo on 8/4/2023 in #help
I cant import the Zustand module from deno.
No problem, you don't have to, but you can add the "Solved" tag to the thread.
21 replies
DDeno
Created by Pollo on 8/4/2023 in #help
I cant import the Zustand module from deno.
Hmm ok, that file is not a proper ES module. Let's go with npm, does npm:zustand@4.4 and npm:zustand@4.4/vanilla work for you, or how does it fail?
What libraries do you guys use with preact to handle stores?
Can't help with that, gotta hope somebody else sees this or just ask in #fresh I guess 🤷‍♂️
21 replies
DDeno
Created by Pollo on 8/4/2023 in #help
I cant import the Zustand module from deno.
If you want to import the index.ts with plain zustand the import map should point to the https://deno.land/x/zustand@v4.4.0/src/index.ts file. For the vanilla import you also need to point to the actual file, so
import {} from "zustand/src/vanilla.ts";
import {} from "zustand/src/vanilla.ts";
21 replies
DDeno
Created by Ooker on 7/31/2023 in #help
How to ignore ts error when bundling?
You need to provided a specific file in the module to install, that's why it can't find it:
> deno install -A https://deno.land/x/esbuild@v0.18.17/mod.js
✅ Successfully installed esbuild
/Users/syrup/Library/Application Support/XDG/state/stav/deno/bin/esbuild

~/Downloads
> esbuild --version
0.18.17
> deno install -A https://deno.land/x/esbuild@v0.18.17/mod.js
✅ Successfully installed esbuild
/Users/syrup/Library/Application Support/XDG/state/stav/deno/bin/esbuild

~/Downloads
> esbuild --version
0.18.17
11 replies
DDeno
Created by Ooker on 7/31/2023 in #help
How to ignore ts error when bundling?
Have you already tried the --check=none flag?
11 replies
DDeno
Created by Kay on 7/28/2023 in #help
Dynamic interfaces
Something like this?
type XyzBase = { name: string; description: string };
type Xyz =
& XyzBase
& (
| { type: "string"; maxlength: number; minlength: number; default: string }
| { type: "number"; min: number; max: number }
| { type: "somethingElse" }
);
type XyzBase = { name: string; description: string };
type Xyz =
& XyzBase
& (
| { type: "string"; maxlength: number; minlength: number; default: string }
| { type: "number"; min: number; max: number }
| { type: "somethingElse" }
);
6 replies
DDeno
Created by Kay on 7/20/2023 in #help
Log Deno.command process output
You could use https://deno.land/std@0.195.0/streams/mod.ts?s=TextLineStream for directly using the ReadableStream. Alternatively you could use https://deno.land/std@0.195.0/streams/mod.ts?s=readerFromStreamReader to create a Reader compatible with readLines.
5 replies