πŸŒΊπŸ‡«πŸ‡· Shigu :3 🌺
πŸŒΊπŸ‡«πŸ‡· Shigu :3 🌺
Aarktype
Created by ciscoheat on 4/8/2025 in #questions
Empty string or number
if you want you could put the code adding the pipe into a function and use that instead
16 replies
Aarktype
Created by ciscoheat on 4/8/2025 in #questions
Empty string or number
why not apply the number type through another pipe? ie:
type("string").pipe((s) => s.length !== 0 ? number(s) : "");
type("string").pipe((s) => s.length !== 0 ? number(s) : "");
16 replies
Aarktype
Created by dion on 4/5/2025 in #questions
Need help understanding this error
It would be helpful to also provide the code which is causing this. If you can't find it using the stack trace, try setting Error.stackTraceLimit to Infinity before running the code.
7 replies
Aarktype
Created by TaQuanMinhLong on 4/2/2025 in #questions
Loose string schema
nice
20 replies
Aarktype
Created by TaQuanMinhLong on 4/2/2025 in #questions
Loose string schema
I tried a bunch of weird workarounds and the only one I got working was by making union with "string" (type.or("string")) and wrap that is a function that casts the return type. so
function Autocomplete<T extends string, U>(type: Type<T, U>): Type<T | (string & {}), U> {
return <any>type.or("string");
}
function Autocomplete<T extends string, U>(type: Type<T, U>): Type<T | (string & {}), U> {
return <any>type.or("string");
}
though it is kinda sketchy
20 replies
Aarktype
Created by TaQuanMinhLong on 4/2/2025 in #questions
Loose string schema
When you do (string & {}) in a union of string literals it allows autocomplete while not rejecting other strings.
20 replies
Aarktype
Created by L0xus on 3/16/2025 in #questions
Narrow type based on another property's value
what you are describing sounds more suited for a discriminated union and wouldn't need all this code
10 replies
NNuxt
Created by πŸŒΊπŸ‡«πŸ‡· Shigu :3 🌺 on 4/24/2024 in #❓・help
"Cannot write file '...' because it would overwrite input file" error in tsconfig.json
Thanks, I'll try when I get home
6 replies
NNuxt
Created by πŸŒΊπŸ‡«πŸ‡· Shigu :3 🌺 on 4/24/2024 in #❓・help
"Cannot write file '...' because it would overwrite input file" error in tsconfig.json
No
6 replies
NNuxt
Created by πŸŒΊπŸ‡«πŸ‡· Shigu :3 🌺 on 4/24/2024 in #❓・help
"Cannot write file '...' because it would overwrite input file" error in tsconfig.json
Reproducing the error - Run bunx nuxi@latest init nuxt-tsconfig-bug - Which package manager would you like to use? bun - Initialize git repository? No - Run cd nuxt-tsconfig-bug - Run bun add -D tailwindcss postcss autoprefixer && bunx tailwindcss init - Write nuxt.config.ts
export default defineNuxtConfig({
devtools: { enabled: true },
postcss: {
plugins: {
tailwindcss: {},
autoprefixer: {}
}
}
});
export default defineNuxtConfig({
devtools: { enabled: true },
postcss: {
plugins: {
tailwindcss: {},
autoprefixer: {}
}
}
});
- Write tailwind.config.js
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
"./components/**/*.{js,vue,ts}",
"./layouts/**/*.vue",
"./pages/**/*.vue",
"./plugins/**/*.{js,ts}",
"./app.vue",
"./error.vue"
],
theme: {
extend: {}
},
plugins: []
};
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
"./components/**/*.{js,vue,ts}",
"./layouts/**/*.vue",
"./pages/**/*.vue",
"./plugins/**/*.{js,ts}",
"./app.vue",
"./error.vue"
],
theme: {
extend: {}
},
plugins: []
};
- Observe error in server/tsconfig.json
6 replies
DIAdiscord.js - Imagine an app
Created by adam πŸ‡¦πŸ‡± on 10/27/2023 in #djs-questions
Mass adding of roles
Also your command just sounds like API spam tbh
9 replies
DIAdiscord.js - Imagine an app
Created by adam πŸ‡¦πŸ‡± on 10/27/2023 in #djs-questions
Mass adding of roles
Wdym by "Discord take care of the rate limit"? They enforce it. djs handles rate limits by queing requests.
9 replies
DIAdiscord.js - Imagine an app
Created by jr on 10/25/2023 in #djs-questions
Prevent link embeds while sending a message
This seems to be possible by adding the SuppressEmbeds flag to the message payload (so you have to define the message payload, add the flag explicitely before sending it).
7 replies
DIAdiscord.js - Imagine an app
Created by πŸ₯€ Nα₯²tsα₯²rყs on 10/14/2023 in #djs-questions
My code looks correct, but my bot is no longer detecting messages.
And you don't have the required intents to get guildMemberUpdate
9 replies
DIAdiscord.js - Imagine an app
Created by πŸ₯€ Nα₯²tsα₯²rყs on 10/14/2023 in #djs-questions
My code looks correct, but my bot is no longer detecting messages.
The event for a new message has been changed to messageCreate in v14
9 replies