location.ts 507 B

1234567891011121314
  1. export * as Location from "./location"
  2. import { Effect, Schema } from "effect"
  3. import { AbsolutePath } from "./schema"
  4. import { Workspace } from "./workspace"
  5. export interface Ref extends Schema.Schema.Type<typeof Ref> {}
  6. export const Ref = Schema.Struct({
  7. directory: AbsolutePath,
  8. workspaceID: Schema.optional(Workspace.ID).pipe(
  9. Schema.withDecodingDefault(Effect.succeed(undefined)),
  10. Schema.withConstructorDefault(Effect.succeed(undefined)),
  11. ),
  12. }).annotate({ identifier: "Location.Ref" })