feat: add @effect/rpc
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
"exports": {
|
||||
".": "./src/index.ts",
|
||||
"./auth": "./src/auth.ts",
|
||||
"./rpc": "./src/rpc.ts",
|
||||
"./db": "./src/db/index.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
13
packages/shared/src/rpc.ts
Normal file
13
packages/shared/src/rpc.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { Schema } from "effect";
|
||||
import { Rpc, RpcGroup } from "@effect/rpc";
|
||||
|
||||
export class Link extends Schema.Class<Link>("Link")({
|
||||
href: Schema.String,
|
||||
}) {}
|
||||
|
||||
export class LinkRpcs extends RpcGroup.make(
|
||||
Rpc.make("CreateLink", {
|
||||
success: Link,
|
||||
error: Schema.String,
|
||||
}),
|
||||
) {}
|
||||
Reference in New Issue
Block a user