Kawaxte
Explore posts from serversHow to define local import maps?
I got these things in the tests above:
Notice how I have to do a lot of
./
js to get to the next? I understand there'st the "imports": {}"
support in deno.json(c)
, and I do remember using smth like Bun's package.json
's "workspace": []
system to create localised @one/two
, complete with index.ts
in their respective folders for exports.
Are there are examples on defining local import maps?35 replies
DIAdiscord.js - Imagine an app
•Created by Kawaxte on 5/21/2024 in #djs-questions
Unwrapping `Promise<x>` where `void` expected?
Hi.
It's my first time moving to TypeScript from Rust (
serenity+poise
->discord.js
) and I am trying to handle a GuildUpdate
event where ownership has been transferred to another.
It seems that doing this gives me a Promise<string>
which I can't seem to unwrap.
When attempting to do so, it asks me to async
the part after the event, like so:
...but then, it tells me that it expects a void
return? In serenity
, I just made a function async
and handled everything else by calling .await
or .await?
at the end, depending on whether or not something was a Result<x, y>
or not.
How exactly am I able to handle the case here?51 replies