crowlKats
crowlKats
DDeno
Created by Mr. Wayne πŸ‡΅πŸ‡Έ on 6/23/2024 in #help
Can I transpile TypeScript Code to JavaScript Code with Deno like Bun
no problem, and we do adhere to the rust code of conduct, so dont worry I know some other team members might have banned that person instantly, but i am of the opinion people should be given a second chance, even if very unlikely to be effective
14 replies
DDeno
Created by Mr. Wayne πŸ‡΅πŸ‡Έ on 6/23/2024 in #help
Can I transpile TypeScript Code to JavaScript Code with Deno like Bun
yes, apologies about that, tried to reach out directly via DMs but since you have DMs closed, I wasnt able to. A stern one-time warning was given, and if anything like that happens again, let me know instantly and I will take care of it.
14 replies
DDeno
Created by Mr. Wayne πŸ‡΅πŸ‡Έ on 6/23/2024 in #help
Can I transpile TypeScript Code to JavaScript Code with Deno like Bun
esbuild is a more expansive and fleshed out solution than deno bundle. Also deno bundle gave the impression to people that they could bundle for the web, which is not true, as it would just bundle all the files in module graph into a single file to be consumed, as mainly for distributive purpouses.
14 replies
DDeno
Created by frazzle on 6/16/2024 in #help
Deno BYOW help with macOS [Solved] and X11
once we have offscreencanvas, you could use that
12 replies
DDeno
Created by Brandon Kalinowski on 6/12/2024 in #help
Seeking help migrating from Deno.run to Deno.Command with spawn
p.stdout is a ReadableStream. your options are either using p.output() instead of p.status, or use streaming capabilities, but since you seem to want to collect the output to a single string, probably the first solution is the best for you
4 replies
DDeno
Created by Asaf on 5/23/2024 in #help
Deno write large file
hm, i am not entirely sure
8 replies
DDeno
Created by Asaf on 5/23/2024 in #help
Deno write large file
the generator generates numbers, so gotta turn it into strings, and since we want to add newlines, we add those as well
8 replies
DDeno
Created by Asaf on 5/23/2024 in #help
Deno write large file
2 ways i'd do it:
await Deno.writeTextFile(
"largeArray-node.txt",
ReadableStream.from(largeArrayGenerator()).pipeThrough(
new TransformStream({
transform(chunk, controller) {
controller.enqueue(`${chunk}\n`);
},
}),
),
);
await Deno.writeTextFile(
"largeArray-node.txt",
ReadableStream.from(largeArrayGenerator()).pipeThrough(
new TransformStream({
transform(chunk, controller) {
controller.enqueue(`${chunk}\n`);
},
}),
),
);
or if you have a open file already:
const file = await Deno.open("largeArray-node.txt", { write: true, create: true });

const readable = ReadableStream.from(largeArrayGenerator()).pipeThrough(
new TransformStream({
transform(chunk, controller) {
controller.enqueue(`${chunk}\n`);
},
}),
).pipeThrough(new TextEncoderStream());

await readable.pipeTo(file.writable);
const file = await Deno.open("largeArray-node.txt", { write: true, create: true });

const readable = ReadableStream.from(largeArrayGenerator()).pipeThrough(
new TransformStream({
transform(chunk, controller) {
controller.enqueue(`${chunk}\n`);
},
}),
).pipeThrough(new TextEncoderStream());

await readable.pipeTo(file.writable);
8 replies
DDeno
Created by πŸŽ€π”Έβ„•π”Ύπ”Όπ•ƒ π”»π•†π•ƒπ•ƒπ”½π”Έβ„‚π”ΌπŸŽ€πŸ‡΅πŸ‡Έ on 5/18/2024 in #help
Custom body
Because I want to supply html to the handler
not sure I understand; what would that do?
15 replies
DDeno
Created by Ed, Edd n Eddy on 4/28/2024 in #help
Migrating from Deno.run to Deno.command, how to readLines?
I’d assume there’s a promise not being resolved but wouldn’t deno throw an error message for this?
usually yes πŸ€” could you share it?
16 replies
DDeno
Created by alina 🌸 on 4/28/2024 in #help
get file path from FsFile
no, this sint possible; feel free to open an issue
2 replies
DDeno
Created by Ed, Edd n Eddy on 4/28/2024 in #help
Migrating from Deno.run to Deno.command, how to readLines?
yep, havent seen you around in a long time
16 replies
DDeno
Created by Ed, Edd n Eddy on 4/28/2024 in #help
Migrating from Deno.run to Deno.command, how to readLines?
yea, at some point we will make /x/ read-only, and expecting people to rather use JSR
16 replies
DDeno
Created by Ed, Edd n Eddy on 4/28/2024 in #help
Migrating from Deno.run to Deno.command, how to readLines?
its for https://jsr.io/ !
16 replies
DDeno
Created by Ed, Edd n Eddy on 4/28/2024 in #help
Migrating from Deno.run to Deno.command, how to readLines?
hey long time no see!
import { TextLineStream } from "jsr:@std/streams";

const command = new Deno.command('...');
const child = command.spawn();
for await (const line of command.stderr.pipeThrough(new TextDecoderStream()).pipeThrough(new TextLineStream())) {}
import { TextLineStream } from "jsr:@std/streams";

const command = new Deno.command('...');
const child = command.spawn();
for await (const line of command.stderr.pipeThrough(new TextDecoderStream()).pipeThrough(new TextLineStream())) {}
16 replies
DDeno
Created by Kay on 4/1/2024 in #help
Interface with unknown amount of keys but all the same type
Record<string, SomeType>
3 replies
DDeno
Created by DNA on 3/24/2024 in #help
Kill Deno.Command
ah, you are using .output(). to do more manual things, you need to use .child().
10 replies
DDeno
Created by DNA on 3/24/2024 in #help
Kill Deno.Command
command.kill
10 replies
DDeno
Created by Hong Minhee on 3/4/2024 in #help
Is there any reference manual for how doc comments are rendered on JSR or deno.land/x?
yes, jsr & deno doc --html share the same code for doc rendering
6 replies
DDeno
Created by Hong Minhee on 3/4/2024 in #help
Is there any reference manual for how doc comments are rendered on JSR or deno.land/x?
for jsr: link works, but not on methods & properties yet, since we dont have roperty drilldown yet. its a feature thats not implemented yet, but planned
6 replies