MCPcopy Index your code
hub / github.com/monkeytypegame/monkeytype / responseWithNullableData

Function responseWithNullableData

packages/contracts/src/util/api.ts:88–101  ·  view source on GitHub ↗
(
  dataSchema: T,
)

Source from the content-addressed store, hash-verified

86export type MonkeyServerErrorType = z.infer<typeof MonkeyServerError>;
87
88export function responseWithNullableData<T extends ZodSchema>(
89 dataSchema: T,
90): z.ZodObject<
91 z.objectUtil.extendShape<
92 typeof MonkeyResponseSchema.shape,
93 {
94 data: z.ZodNullable<T>;
95 }
96 >
97> {
98 return MonkeyResponseSchema.extend({
99 data: dataSchema.nullable(),
100 });
101}
102
103export function responseWithData<T extends ZodSchema>(
104 dataSchema: T,

Callers 4

configs.tsFile · 0.90
quotes.tsFile · 0.90
users.tsFile · 0.90
leaderboards.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected