Add Effect-native core event system (#27415)
This commit is contained in:
parent
73cdba959b
commit
e11e089e42
43 changed files with 1509 additions and 526 deletions
13
packages/core/src/session.ts
Normal file
13
packages/core/src/session.ts
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
export * as Session from "./session"
|
||||
|
||||
import { Schema } from "effect"
|
||||
import { withStatics } from "./schema"
|
||||
import { Identifier } from "./util/identifier"
|
||||
|
||||
export const ID = Schema.String.check(Schema.isStartsWith("ses")).pipe(
|
||||
Schema.brand("SessionID"),
|
||||
withStatics((schema) => ({
|
||||
descending: (id?: string) => schema.make(id ?? "ses_" + Identifier.descending()),
|
||||
})),
|
||||
)
|
||||
export type ID = typeof ID.Type
|
||||
Loading…
Add table
Add a link
Reference in a new issue