tarlatan
Preparing search index...
format/codex
decodeCodexEvent
Variable decodeCodexEvent
Const
decodeCodexEvent
:
(
input
:
unknown
,
options
?:
ParseOptions
,
)
=>
Result
<
|
{
type
:
"thread.started"
}
|
{
type
:
"turn.started"
}
|
{
type
:
"turn.completed"
;
usage
?:
{
readonly
[
key
:
string
]:
unknown
}
}
|
{
error
?:
{
readonly
[
key
:
string
]:
unknown
}
;
type
:
"turn.failed"
}
|
{
message
?:
string
;
type
:
"error"
}
,
SchemaError
,
>
= ...
Decodes an unknown value as any
CodexEvent
; other event types fail.
Type Declaration
(
input
:
unknown
,
options
?:
ParseOptions
,
)
:
Result
<
|
{
type
:
"thread.started"
}
|
{
type
:
"turn.started"
}
|
{
type
:
"turn.completed"
;
usage
?:
{
readonly
[
key
:
string
]:
unknown
}
}
|
{
error
?:
{
readonly
[
key
:
string
]:
unknown
}
;
type
:
"turn.failed"
}
|
{
message
?:
string
;
type
:
"error"
}
,
SchemaError
,
>
Parameters
input
:
unknown
Optional
options
:
ParseOptions
Returns
Result
<
|
{
type
:
"thread.started"
}
|
{
type
:
"turn.started"
}
|
{
type
:
"turn.completed"
;
usage
?:
{
readonly
[
key
:
string
]:
unknown
}
}
|
{
error
?:
{
readonly
[
key
:
string
]:
unknown
}
;
type
:
"turn.failed"
}
|
{
message
?:
string
;
type
:
"error"
}
,
SchemaError
,
>
Settings
Member Visibility
Protected
Private
Inherited
Theme
OS
Light
Dark
tarlatan
Loading...
Decodes an unknown value as any CodexEvent; other event types fail.