liminal 0.17.1 → 0.17.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Accumulator.ts +16 -10
- package/Actor.ts +35 -29
- package/Audition.ts +17 -12
- package/CHANGELOG.md +6 -0
- package/Client.ts +260 -295
- package/ClientHandle.ts +17 -6
- package/F.ts +3 -9
- package/LICENSE +202 -0
- package/Method.ts +11 -13
- package/Protocol.ts +104 -126
- package/Send.ts +9 -5
- package/_util/Diagnostic.ts +16 -0
- package/_util/Mutex.ts +5 -5
- package/dist/Accumulator.d.ts +2 -2
- package/dist/Accumulator.js +12 -8
- package/dist/Accumulator.js.map +1 -1
- package/dist/Actor.d.ts +9 -10
- package/dist/Actor.js +6 -15
- package/dist/Actor.js.map +1 -1
- package/dist/Audition.d.ts +3 -4
- package/dist/Audition.js +7 -5
- package/dist/Audition.js.map +1 -1
- package/dist/Client.d.ts +20 -39
- package/dist/Client.js +119 -139
- package/dist/Client.js.map +1 -1
- package/dist/ClientHandle.d.ts +5 -6
- package/dist/ClientHandle.js +1 -1
- package/dist/ClientHandle.js.map +1 -1
- package/dist/F.d.ts +3 -12
- package/dist/F.js +1 -3
- package/dist/F.js.map +1 -1
- package/dist/Method.d.ts +11 -12
- package/dist/Method.js.map +1 -1
- package/dist/Protocol.d.ts +46 -89
- package/dist/Protocol.js +35 -11
- package/dist/Protocol.js.map +1 -1
- package/dist/Send.d.ts +2 -3
- package/dist/Send.js +1 -1
- package/dist/Send.js.map +1 -1
- package/dist/_util/Diagnostic.d.ts +5 -0
- package/dist/_util/Diagnostic.js +10 -0
- package/dist/_util/Diagnostic.js.map +1 -0
- package/dist/_util/Mutex.d.ts +2 -2
- package/dist/_util/Mutex.js +4 -4
- package/dist/_util/Mutex.js.map +1 -1
- package/dist/errors.d.ts +15 -12
- package/dist/errors.js +6 -4
- package/dist/errors.js.map +1 -1
- package/dist/experimental/BranchLive.d.ts +1 -1
- package/dist/experimental/BranchLive.js +1 -1
- package/dist/experimental/BranchLive.js.map +1 -1
- package/dist/experimental/L/append.d.ts +1 -1
- package/dist/experimental/L/append.js +2 -2
- package/dist/experimental/L/append.js.map +1 -1
- package/dist/experimental/L/assistant.d.ts +2 -2
- package/dist/experimental/L/assistant.js +1 -1
- package/dist/experimental/L/assistant.js.map +1 -1
- package/dist/experimental/L/assistantSchema.d.ts +2 -2
- package/dist/experimental/L/assistantSchema.js +1 -1
- package/dist/experimental/L/assistantSchema.js.map +1 -1
- package/dist/experimental/L/assistantStream.d.ts +2 -2
- package/dist/experimental/L/assistantStream.js +1 -1
- package/dist/experimental/L/assistantStream.js.map +1 -1
- package/dist/experimental/L/branch.d.ts +1 -1
- package/dist/experimental/L/clear.d.ts +1 -1
- package/dist/experimental/L/clear.js +1 -1
- package/dist/experimental/L/clear.js.map +1 -1
- package/dist/experimental/L/history.d.ts +2 -2
- package/dist/experimental/L/history.js +2 -2
- package/dist/experimental/L/history.js.map +1 -1
- package/dist/experimental/L/init.d.ts +1 -1
- package/dist/experimental/L/init.js +1 -1
- package/dist/experimental/L/init.js.map +1 -1
- package/dist/experimental/L/matrix.d.ts +2 -2
- package/dist/experimental/L/system.d.ts +1 -1
- package/dist/experimental/L/system.js +1 -1
- package/dist/experimental/L/system.js.map +1 -1
- package/dist/experimental/L/user.d.ts +1 -1
- package/dist/experimental/L/user.js +1 -1
- package/dist/experimental/L/user.js.map +1 -1
- package/dist/experimental/Loader.d.ts +3 -3
- package/dist/experimental/Loader.js +2 -2
- package/dist/experimental/Loader.js.map +1 -1
- package/dist/experimental/TaggedTemplateFunction.d.ts +2 -2
- package/dist/experimental/Template.d.ts +8 -12
- package/dist/experimental/Template.js +53 -51
- package/dist/experimental/Template.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/errors.ts +12 -4
- package/experimental/BranchLive.ts +1 -1
- package/experimental/L/append.ts +2 -2
- package/experimental/L/assistant.ts +1 -1
- package/experimental/L/assistantSchema.ts +3 -3
- package/experimental/L/assistantStream.ts +1 -1
- package/experimental/L/clear.ts +1 -1
- package/experimental/L/history.ts +2 -2
- package/experimental/L/init.ts +1 -1
- package/experimental/L/matrix.ts +3 -3
- package/experimental/L/system.ts +1 -1
- package/experimental/L/user.ts +1 -1
- package/experimental/Loader.ts +3 -3
- package/experimental/TaggedTemplateFunction.ts +2 -2
- package/experimental/Template.ts +62 -70
- package/package.json +2 -6
- package/tsconfig.json +1 -1
- package/_types.ts +0 -27
- package/dist/_types.d.ts +0 -22
- package/dist/_types.js +0 -2
- package/dist/_types.js.map +0 -1
package/errors.ts
CHANGED
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
import { Schema as S } from "effect"
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
import type { MethodDefinition } from "./Method.ts"
|
|
4
|
+
|
|
5
|
+
export class AuditionError extends S.TaggedErrorClass<AuditionError>()("AuditionError", {
|
|
4
6
|
value: S.Struct({
|
|
5
|
-
|
|
6
|
-
|
|
7
|
+
client: S.String,
|
|
8
|
+
routed: S.String,
|
|
7
9
|
}).pipe(S.optional),
|
|
8
10
|
}) {}
|
|
9
11
|
|
|
10
|
-
export class ConnectionError extends S.
|
|
12
|
+
export class ConnectionError extends S.TaggedErrorClass<ConnectionError>()("ConnectionError", {
|
|
11
13
|
cause: S.Unknown,
|
|
12
14
|
}) {}
|
|
13
15
|
|
|
14
16
|
export type ClientError = AuditionError | ConnectionError
|
|
17
|
+
|
|
18
|
+
export class UnresolvedError extends S.TaggedErrorClass<UnresolvedError>()("UnresolvedError", {}) {}
|
|
19
|
+
|
|
20
|
+
export type FError<MethodDefinitions extends Record<string, MethodDefinition.Any>> = [
|
|
21
|
+
MethodDefinitions[keyof MethodDefinitions]["failure"]["Type"] | ClientError | UnresolvedError,
|
|
22
|
+
][0]
|
package/experimental/L/append.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Prompt, Chat } from "@effect/ai"
|
|
2
1
|
import { Effect, flow, Ref } from "effect"
|
|
2
|
+
import { Prompt, Chat } from "effect/unstable/ai"
|
|
3
3
|
|
|
4
4
|
export const append = (message: Prompt.Message) =>
|
|
5
|
-
Chat.Chat.pipe(
|
|
5
|
+
Chat.Chat.asEffect().pipe(
|
|
6
6
|
Effect.flatMap(
|
|
7
7
|
flow(
|
|
8
8
|
({ history }) => history,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Prompt, LanguageModel } from "@effect/ai"
|
|
2
1
|
import { Effect, Schema as S } from "effect"
|
|
2
|
+
import { Prompt, LanguageModel } from "effect/unstable/ai"
|
|
3
3
|
|
|
4
4
|
import { append } from "./append.ts"
|
|
5
5
|
import { history } from "./history.ts"
|
|
6
6
|
|
|
7
|
-
export const assistantSchema = Effect.fnUntraced(function* <A, I extends Record<string, unknown
|
|
8
|
-
schema: S.
|
|
7
|
+
export const assistantSchema = Effect.fnUntraced(function* <A, I extends Record<string, unknown>>(
|
|
8
|
+
schema: S.Codec<A, I>,
|
|
9
9
|
) {
|
|
10
10
|
const prompt = yield* history
|
|
11
11
|
const { text, value } = yield* LanguageModel.generateObject({ prompt, schema })
|
package/experimental/L/clear.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Chat } from "@effect/ai"
|
|
2
1
|
import { flow, Effect, Ref } from "effect"
|
|
2
|
+
import { Chat } from "effect/unstable/ai"
|
|
3
3
|
|
|
4
|
-
export const history = Chat.Chat.pipe(Effect.flatMap(flow(({ history }) => history, Ref.get)))
|
|
4
|
+
export const history = Chat.Chat.asEffect().pipe(Effect.flatMap(flow(({ history }) => history, Ref.get)))
|
package/experimental/L/init.ts
CHANGED
package/experimental/L/matrix.ts
CHANGED
|
@@ -2,14 +2,14 @@ import { Effect, Function, Layer } from "effect"
|
|
|
2
2
|
|
|
3
3
|
import { branch } from "./branch.ts"
|
|
4
4
|
|
|
5
|
-
type LayerRecord = Record<string, Layer.
|
|
5
|
+
type LayerRecord = Record<string, Layer.Any>
|
|
6
6
|
|
|
7
7
|
export type MatrixEffect<A, E, R, Layers extends LayerRecord> = Effect.Effect<
|
|
8
8
|
{
|
|
9
9
|
readonly [K in keyof Layers]: A
|
|
10
10
|
},
|
|
11
|
-
E | Layer.
|
|
12
|
-
R | Layer.
|
|
11
|
+
E | Layer.Error<Layers[keyof Layers]>,
|
|
12
|
+
R | Layer.Services<Layers[keyof Layers]>
|
|
13
13
|
>
|
|
14
14
|
|
|
15
15
|
export const matrix: {
|
package/experimental/L/system.ts
CHANGED
package/experimental/L/user.ts
CHANGED
package/experimental/Loader.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { Path, FileSystem } from "
|
|
1
|
+
import { Path, FileSystem } from "effect"
|
|
2
2
|
import { Option, Layer, Effect, Data, Context } from "effect"
|
|
3
3
|
|
|
4
4
|
export class LoaderError extends Data.TaggedError("LoaderError")<{
|
|
5
5
|
readonly url: string
|
|
6
6
|
}> {}
|
|
7
7
|
|
|
8
|
-
export class Loader extends Context.
|
|
8
|
+
export class Loader extends Context.Service<
|
|
9
9
|
Loader,
|
|
10
10
|
{
|
|
11
11
|
readonly load: (key: string) => Effect.Effect<Option.Option<string>, LoaderError>
|
|
12
12
|
}
|
|
13
|
-
>() {}
|
|
13
|
+
>()("liminal/Loader") {}
|
|
14
14
|
|
|
15
15
|
export const layerFs = Layer.effect(
|
|
16
16
|
Loader,
|
|
@@ -6,11 +6,11 @@ export type TemplateStringsArrayLike = {
|
|
|
6
6
|
|
|
7
7
|
type ExtractE<T> = [Extract<T, Effect.Effect<any, any, any>>] extends [never]
|
|
8
8
|
? never
|
|
9
|
-
: Effect.
|
|
9
|
+
: Effect.Error<Extract<T, Effect.Effect<any, any, any>>>
|
|
10
10
|
|
|
11
11
|
type ExtractR<T> = [Extract<T, Effect.Effect<any, any, any>>] extends [never]
|
|
12
12
|
? never
|
|
13
|
-
: Effect.
|
|
13
|
+
: Effect.Services<Extract<T, Effect.Effect<any, any, any>>>
|
|
14
14
|
|
|
15
15
|
export const raw = Effect.fnUntraced(function* <Substitutions extends Array<unknown>>(
|
|
16
16
|
template: TemplateStringsArrayLike,
|
package/experimental/Template.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Layer, Effect, Schema as S, Data, Context } from "effect"
|
|
2
2
|
|
|
3
3
|
import * as Loader from "./Loader.ts"
|
|
4
4
|
|
|
@@ -11,83 +11,75 @@ export class TemplateMisalignedError extends Data.TaggedError("TemplateMisaligne
|
|
|
11
11
|
|
|
12
12
|
export class NoSuchTemplateError extends Data.TaggedError("NoSuchTemplateError")<{ url: string }> {}
|
|
13
13
|
|
|
14
|
-
export interface TemplateClass<Self, Id extends string, A> extends Context.
|
|
15
|
-
new (_: never): Context.
|
|
14
|
+
export interface TemplateClass<Self, Id extends string, A> extends Context.Service<Self, Template<A>> {
|
|
15
|
+
new (_: never): Context.ServiceClass.Shape<Id, Template<A>>
|
|
16
16
|
|
|
17
17
|
readonly layer: Layer.Layer<Self, NoSuchTemplateError | TemplateMisalignedError | Loader.LoaderError, Loader.Loader>
|
|
18
18
|
|
|
19
19
|
readonly synthesize: (...[value]: A extends undefined ? [] : [value: A]) => Effect.Effect<string, never, Self>
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
export type Payload = Record<string, S.Schema<any, string> | S.optional<S.Schema<any, string>>>
|
|
23
|
-
|
|
24
|
-
export declare namespace Payload {
|
|
25
|
-
export type FromDefinition<P extends Payload | undefined> = P extends infer Q extends Payload
|
|
26
|
-
? S.Struct<Q>["Type"]
|
|
27
|
-
: {}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
22
|
export const Service =
|
|
31
23
|
<Self>() =>
|
|
32
|
-
<const Id extends string, const P extends
|
|
33
|
-
|
|
34
|
-
{
|
|
35
|
-
url,
|
|
36
|
-
payload,
|
|
37
|
-
}: {
|
|
24
|
+
<const Id extends string, const P extends S.Struct.Fields>(
|
|
25
|
+
_id: Id,
|
|
26
|
+
_config: {
|
|
38
27
|
readonly url: string
|
|
39
|
-
readonly payload
|
|
28
|
+
readonly payload: P
|
|
40
29
|
},
|
|
41
|
-
): TemplateClass<Self, Id,
|
|
42
|
-
|
|
43
|
-
type Self_ = TemplateClass<Self, Id, Payload.FromDefinition<P>>
|
|
44
|
-
const self = Context.Tag(`liminal/Template/${id}`)<Self, Make_>() as never as Types.Mutable<Self_>
|
|
45
|
-
self.layer = Effect.gen(function* () {
|
|
46
|
-
const loader = yield* Loader.Loader
|
|
47
|
-
const template = yield* loader.load(url).pipe(Effect.map(Option.getOrUndefined))
|
|
48
|
-
if (!template) {
|
|
49
|
-
return yield* new NoSuchTemplateError({ url })
|
|
50
|
-
}
|
|
51
|
-
const [head, ...rest] = pipe(template, String.trim, String.split("{{"))
|
|
52
|
-
if ((!payload || !Object.keys(payload).length) && !rest.length) {
|
|
53
|
-
return () => template
|
|
54
|
-
}
|
|
55
|
-
const segments = rest.flatMap((part) => {
|
|
56
|
-
const i = part.indexOf("}}")
|
|
57
|
-
if (i === -1) {
|
|
58
|
-
return []
|
|
59
|
-
}
|
|
60
|
-
return {
|
|
61
|
-
key: part.slice(0, i).trim(),
|
|
62
|
-
tail: part.slice(i + 2),
|
|
63
|
-
}
|
|
64
|
-
})
|
|
65
|
-
const keys = segments.map(({ key }) => key)
|
|
66
|
-
if (payload) {
|
|
67
|
-
const keys_ = new Set(keys)
|
|
68
|
-
const dne = new Set<string>()
|
|
69
|
-
const schema = S.Struct(payload)
|
|
70
|
-
const fields = SchemaAST.getPropertySignatures(SchemaAST.encodedBoundAST(schema.ast))
|
|
71
|
-
for (const field of fields) {
|
|
72
|
-
if (!field.isOptional && !keys_.has(field.name.toString())) {
|
|
73
|
-
dne.add(field.name.toString())
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
if (dne.size) {
|
|
77
|
-
return yield* new TemplateMisalignedError({
|
|
78
|
-
url,
|
|
79
|
-
keys: [...dne.values()],
|
|
80
|
-
})
|
|
81
|
-
}
|
|
82
|
-
} else if (segments.length) {
|
|
83
|
-
return yield* new TemplateMisalignedError({ url, keys })
|
|
84
|
-
}
|
|
85
|
-
const make: Make_ = (value?) =>
|
|
86
|
-
value
|
|
87
|
-
? head + segments.map(({ key, tail }) => `${(value as Record<typeof key, string>)[key]}${tail}`).join("")
|
|
88
|
-
: template
|
|
89
|
-
return make
|
|
90
|
-
}).pipe(Layer.effect(self))
|
|
91
|
-
self.synthesize = (...args) => self.pipe(Effect.map((make) => make(...args)))
|
|
92
|
-
return self as Self_
|
|
30
|
+
): TemplateClass<Self, Id, S.Struct<P>["Type"]> => {
|
|
31
|
+
throw 0
|
|
93
32
|
}
|
|
33
|
+
|
|
34
|
+
// type Make_ = Template<Payload.FromDefinition<P>>
|
|
35
|
+
// type Self_ = TemplateClass<Self, Id, Payload.FromDefinition<P>>
|
|
36
|
+
// const tag = Context.Service<Self, Make_>()(id)
|
|
37
|
+
// const layer = Effect.gen(function* () {
|
|
38
|
+
// const loader = yield* Loader.Loader
|
|
39
|
+
// const template = yield* loader.load(url).pipe(Effect.map(Option.getOrUndefined))
|
|
40
|
+
// if (!template) {
|
|
41
|
+
// return yield* new NoSuchTemplateError({ url })
|
|
42
|
+
// }
|
|
43
|
+
// const [head, ...rest] = pipe(template, String.trim, String.split("{{"))
|
|
44
|
+
// if ((!payload || !Object.keys(payload).length) && !rest.length) {
|
|
45
|
+
// return () => template
|
|
46
|
+
// }
|
|
47
|
+
// const segments = rest.flatMap((part) => {
|
|
48
|
+
// const i = part.indexOf("}}")
|
|
49
|
+
// if (i === -1) {
|
|
50
|
+
// return []
|
|
51
|
+
// }
|
|
52
|
+
// return {
|
|
53
|
+
// key: part.slice(0, i).trim(),
|
|
54
|
+
// tail: part.slice(i + 2),
|
|
55
|
+
// }
|
|
56
|
+
// })
|
|
57
|
+
// const keys = segments.map(({ key }) => key)
|
|
58
|
+
// if (payload) {
|
|
59
|
+
// const keys_ = new Set(keys)
|
|
60
|
+
// const dne = new Set<string>()
|
|
61
|
+
// const schema = S.Struct(payload)
|
|
62
|
+
// for (const field of schema.ast.propertySignatures) {
|
|
63
|
+
// if (!SchemaAST.isOptional(field.type) && !keys_.has(field.name.toString())) {
|
|
64
|
+
// dne.add(field.name.toString())
|
|
65
|
+
// }
|
|
66
|
+
// }
|
|
67
|
+
// if (dne.size) {
|
|
68
|
+
// return yield* new TemplateMisalignedError({
|
|
69
|
+
// url,
|
|
70
|
+
// keys: [...dne.values()],
|
|
71
|
+
// })
|
|
72
|
+
// }
|
|
73
|
+
// } else if (segments.length) {
|
|
74
|
+
// return yield* new TemplateMisalignedError({ url, keys })
|
|
75
|
+
// }
|
|
76
|
+
// const make: Make_ = (value?) =>
|
|
77
|
+
// value
|
|
78
|
+
// ? head + segments.map(({ key, tail }) => `${(value as Record<typeof key, string>)[key]}${tail}`).join("")
|
|
79
|
+
// : template
|
|
80
|
+
// return make
|
|
81
|
+
// }).pipe(Layer.effect(tag))
|
|
82
|
+
|
|
83
|
+
// const synthesize = (...args) => tag.pipe(Effect.map((make) => make(...args)))
|
|
84
|
+
|
|
85
|
+
// return Object.assign(tag, { synthesize })
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "liminal",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.2",
|
|
4
4
|
"description": "Actors x Effects",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/crosshatch/liminal/issues"
|
|
@@ -25,10 +25,6 @@
|
|
|
25
25
|
"./package.json": "./package.json"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
|
-
"
|
|
29
|
-
"@effect/ai": "^0.33.2",
|
|
30
|
-
"@effect/experimental": "^0.58.0",
|
|
31
|
-
"@effect/platform": "^0.94.5",
|
|
32
|
-
"effect": "^3.19.17"
|
|
28
|
+
"effect": "4.0.0-beta.50"
|
|
33
29
|
}
|
|
34
30
|
}
|
package/tsconfig.json
CHANGED
package/_types.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { Schema as S } from "effect"
|
|
2
|
-
|
|
3
|
-
export type SchemaAll = S.Schema<any, any> | S.Schema<any, never> | S.Schema<never, any> | S.Schema<never, never>
|
|
4
|
-
|
|
5
|
-
export type PropertySignatureAll<Key extends PropertyKey = PropertyKey> =
|
|
6
|
-
| S.PropertySignature<S.PropertySignature.Token, any, Key, S.PropertySignature.Token, any, boolean>
|
|
7
|
-
| S.PropertySignature<S.PropertySignature.Token, never, Key, S.PropertySignature.Token, any, boolean>
|
|
8
|
-
| S.PropertySignature<S.PropertySignature.Token, any, Key, S.PropertySignature.Token, never, boolean>
|
|
9
|
-
| S.PropertySignature<S.PropertySignature.Token, never, Key, S.PropertySignature.Token, never, boolean>
|
|
10
|
-
|
|
11
|
-
export type Field = SchemaAll | PropertySignatureAll
|
|
12
|
-
|
|
13
|
-
export type Fields = { readonly [x: keyof any]: Field }
|
|
14
|
-
|
|
15
|
-
export type FieldsRecord = Record<string, Fields>
|
|
16
|
-
|
|
17
|
-
export declare namespace FieldsRecord {
|
|
18
|
-
export namespace TaggedMember {
|
|
19
|
-
export type Type<T extends FieldsRecord, K extends keyof T = keyof T> = {
|
|
20
|
-
[K_ in K]: { readonly _tag: K_ } & S.Struct<T[K_]>["Type"]
|
|
21
|
-
}[K]
|
|
22
|
-
|
|
23
|
-
export type Encoded<T extends FieldsRecord, K extends keyof T = keyof T> = {
|
|
24
|
-
[K_ in K]: { readonly _tag: K_ } & S.Struct<T[K_]>["Encoded"]
|
|
25
|
-
}[K]
|
|
26
|
-
}
|
|
27
|
-
}
|
package/dist/_types.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { Schema as S } from "effect";
|
|
2
|
-
export type SchemaAll = S.Schema<any, any> | S.Schema<any, never> | S.Schema<never, any> | S.Schema<never, never>;
|
|
3
|
-
export type PropertySignatureAll<Key extends PropertyKey = PropertyKey> = S.PropertySignature<S.PropertySignature.Token, any, Key, S.PropertySignature.Token, any, boolean> | S.PropertySignature<S.PropertySignature.Token, never, Key, S.PropertySignature.Token, any, boolean> | S.PropertySignature<S.PropertySignature.Token, any, Key, S.PropertySignature.Token, never, boolean> | S.PropertySignature<S.PropertySignature.Token, never, Key, S.PropertySignature.Token, never, boolean>;
|
|
4
|
-
export type Field = SchemaAll | PropertySignatureAll;
|
|
5
|
-
export type Fields = {
|
|
6
|
-
readonly [x: keyof any]: Field;
|
|
7
|
-
};
|
|
8
|
-
export type FieldsRecord = Record<string, Fields>;
|
|
9
|
-
export declare namespace FieldsRecord {
|
|
10
|
-
namespace TaggedMember {
|
|
11
|
-
type Type<T extends FieldsRecord, K extends keyof T = keyof T> = {
|
|
12
|
-
[K_ in K]: {
|
|
13
|
-
readonly _tag: K_;
|
|
14
|
-
} & S.Struct<T[K_]>["Type"];
|
|
15
|
-
}[K];
|
|
16
|
-
type Encoded<T extends FieldsRecord, K extends keyof T = keyof T> = {
|
|
17
|
-
[K_ in K]: {
|
|
18
|
-
readonly _tag: K_;
|
|
19
|
-
} & S.Struct<T[K_]>["Encoded"];
|
|
20
|
-
}[K];
|
|
21
|
-
}
|
|
22
|
-
}
|
package/dist/_types.js
DELETED
package/dist/_types.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_types.js","sourceRoot":"","sources":["../_types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC,EAAE,MAAM,QAAQ,CAAA"}
|