Skip to content

Commit

Permalink
use types instead of interfaces for service ids
Browse files Browse the repository at this point in the history
  • Loading branch information
mccraigmccraig committed Nov 16, 2023
1 parent fa411c5 commit 4e98b27
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/test_services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export type Org = {
id: string
name: string
}
interface OrgService { readonly _: unique symbol }
type OrgService = { readonly _: unique symbol }
export interface OrgServiceI {
readonly getById: (id: string) => Effect.Effect<never, never, Org>
readonly getByNick: (nick: string) => Effect.Effect<never, never, Org>
Expand All @@ -24,7 +24,7 @@ export type User = {
id: string
name: string
}
interface UserService { readonly _: unique symbol }
type UserService = { readonly _: unique symbol }
// the service interface
export interface UserServiceI {
readonly getByIds: (d: { org_id: string, user_id: string }) => Effect.Effect<never, never, User>
Expand All @@ -37,7 +37,7 @@ export const getUserByIds = invokeServiceFxFn(UserService, "getByIds")

/////////////////// PushNotification ///////////////////////

interface PushNotificationService { readonly _: unique symbol }
type PushNotificationService = { readonly _: unique symbol }
export interface PushNotificationServiceI {
readonly sendPush: (d: { user_id: string, message: string }) => Effect.Effect<never, never, string>
}
Expand Down

0 comments on commit 4e98b27

Please sign in to comment.