aboutsummaryrefslogtreecommitdiffstats
path: root/packages/service-shared/src
diff options
context:
space:
mode:
Diffstat (limited to 'packages/service-shared/src')
-rw-r--r--packages/service-shared/src/index.ts3
-rw-r--r--packages/service-shared/src/schemas.ts16
2 files changed, 13 insertions, 6 deletions
diff --git a/packages/service-shared/src/index.ts b/packages/service-shared/src/index.ts
index 94be734..a2e5ee5 100644
--- a/packages/service-shared/src/index.ts
+++ b/packages/service-shared/src/index.ts
@@ -20,5 +20,4 @@
20 20
21export { MainToServiceIpcMessage, ServiceToMainIpcMessage } from './ipc'; 21export { MainToServiceIpcMessage, ServiceToMainIpcMessage } from './ipc';
22 22
23export type { UnreadCount, WebSource } from './schemas'; 23export { UnreadCount, WebSource } from './schemas';
24export { unreadCount, webSource } from './schemas';
diff --git a/packages/service-shared/src/schemas.ts b/packages/service-shared/src/schemas.ts
index 586750c..0b31eb7 100644
--- a/packages/service-shared/src/schemas.ts
+++ b/packages/service-shared/src/schemas.ts
@@ -20,16 +20,24 @@
20 20
21import { z } from 'zod'; 21import { z } from 'zod';
22 22
23export const unreadCount = z.object({ 23export const UnreadCount = z.object({
24 direct: z.number().nonnegative().optional(), 24 direct: z.number().nonnegative().optional(),
25 indirect: z.number().nonnegative().optional(), 25 indirect: z.number().nonnegative().optional(),
26}); 26});
27 27
28export type UnreadCount = z.infer<typeof unreadCount>; 28/*
29 eslint-disable-next-line @typescript-eslint/no-redeclare --
30 Intentionally naming the type the same as the schema definition.
31*/
32export type UnreadCount = z.infer<typeof UnreadCount>;
29 33
30export const webSource = z.object({ 34export const WebSource = z.object({
31 code: z.string(), 35 code: z.string(),
32 url: z.string().nonempty(), 36 url: z.string().nonempty(),
33}); 37});
34 38
35export type WebSource = z.infer<typeof webSource>; 39/*
40 eslint-disable-next-line @typescript-eslint/no-redeclare --
41 Intentionally naming the type the same as the schema definition.
42*/
43export type WebSource = z.infer<typeof WebSource>;