Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F3010171
form-types.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
972 B
Referenced Files
None
Subscribers
None
form-types.ts
View Options
import
{
FilePointer
}
from
"@sealcode/file-manager"
;
import
type
{
FlatTemplatable
}
from
"tempstream"
;
import
type
{
FormField
}
from
"./fields/field.js"
;
export
type
FormDataPrimitive
=
|
string
|
string
[]
|
number
|
undefined
|
FilePointer
;
export
type
FormDataValue
=
|
FormDataPrimitive
|
Record
<
string
,
FormDataPrimitive
>
;
export
type
FieldValueType
<
F
extends
FormField
>
=
F
extends
FormField
<
infer
R
>
?
R
:
never
;
export
type
FormFieldsToValues
<
F
extends
Record
<
string
,
FormField
<
boolean
,
keyof
F
>>
>
=
{
[
Property
in
keyof
F
]
:
FieldValueType
<
F
[
Property
]
>
;
};
export
type
FormMessage
=
{
type
:
"info"
|
"success"
|
"error"
;
text
:
string
};
export
type
FormData
<
Fieldnames
extends
string
=
string
>
=
{
raw_values
:
Record
<
Fieldnames
,
FormDataValue
>
;
messages
:
FormMessage
[];
};
export
type
FormReaction
=
|
{
action
:
"stay"
;
content
:
FlatTemplatable
;
messages
?:
FormMessage
[]
}
|
{
action
:
"redirect"
;
url
:
string
;
messages
?:
FormMessage
[]
};
File Metadata
Details
Attached
Mime Type
text/x-java
Expires
Wed, May 7, 19:37 (1 d, 18 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
625481
Default Alt Text
form-types.ts (972 B)
Attached To
Mode
rSGEN sealgen
Attached
Detach File
Event Timeline
Log In to Comment