import { Schema as S, Types } from 'effect'; /** A `TaggedStruct` schema that can be called directly as a constructor: `Foo({ count: 1 })` instead of `Foo.make({ count: 1 })`. */ export type CallableTaggedStruct = S.TaggedStruct & (keyof Fields extends never ? (value?: Parameters['make']>[0] | void) => Types.Simplify; } & Fields>> : (value: Parameters['make']>[0]) => Types.Simplify; } & Fields>>); /** * Wraps `Schema.TaggedStruct` to create a message variant you can call directly as a constructor. * Use `m` for message types — enabling `ClickedReset()` instead of `ClickedReset.make()`. * * @example * ```typescript * const ClickedReset = m('ClickedReset') * ClickedReset() // { _tag: 'ClickedReset' } * * const ChangedCount = m('ChangedCount', { count: S.Number }) * ChangedCount({ count: 1 }) // { _tag: 'ChangedCount', count: 1 } * ``` */ export declare function m(tag: Tag): CallableTaggedStruct; export declare function m(tag: Tag, fields: Fields): CallableTaggedStruct; /** * Wraps `Schema.TaggedStruct` to create a route variant you can call directly as a constructor. * Use `r` for route types — enabling `Home()` instead of `Home.make()`. * * @example * ```typescript * const Home = r('Home') * Home() // { _tag: 'Home' } * * const UserProfile = r('UserProfile', { id: S.String }) * UserProfile({ id: 'abc' }) // { _tag: 'UserProfile', id: 'abc' } * ``` */ export declare function r(tag: Tag): CallableTaggedStruct; export declare function r(tag: Tag, fields: Fields): CallableTaggedStruct; /** * Wraps `Schema.TaggedStruct` to create a callable tagged struct you can call directly as a constructor. * Use `ts` for non-message, non-route tagged structs — enabling `Loading()` * instead of `Loading.make()`. * * @example * ```typescript * const Loading = ts('Loading') * Loading() // { _tag: 'Loading' } * * const Ok = ts('Ok', { data: S.String }) * Ok({ data: 'hello' }) // { _tag: 'Ok', data: 'hello' } * ``` */ export declare function ts(tag: Tag): CallableTaggedStruct; export declare function ts(tag: Tag, fields: Fields): CallableTaggedStruct; //# sourceMappingURL=index.d.ts.map