annalasko
annalasko
Explore posts from servers
SIASapphire - Imagine a framework
Created by annalasko on 6/4/2024 in #sapphire-support
Equivalent of z.function from zod in shapeshift?
Understood, thank you!
6 replies
SIASapphire - Imagine a framework
Created by annalasko on 6/4/2024 in #sapphire-support
Equivalent of z.function from zod in shapeshift?
This is the code I am trying to convert to its shapeshift equivalent:
export const schema = z.object({
data: z.record(z.any()),
execute: z.function(),
});

export const predicate: StructurePredicate<Command> = (structure: unknown): structure is Command =>
schema.safeParse(structure).success;
export const schema = z.object({
data: z.record(z.any()),
execute: z.function(),
});

export const predicate: StructurePredicate<Command> = (structure: unknown): structure is Command =>
schema.safeParse(structure).success;
6 replies
SIASapphire - Imagine a framework
Created by annalasko on 6/4/2024 in #sapphire-support
Equivalent of z.function from zod in shapeshift?
Additionally, what is the equivalent of safeParse() and .success?
6 replies
DIAdiscord.js - Imagine a boo! 👻
Created by annalasko on 5/11/2024 in #djs-questions
Do I need to manually check if each message in an Array is bulkDeletable?
4 replies