Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F10352586
proxy-field.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
640 B
Referenced Files
None
Subscribers
None
proxy-field.ts
View Options
import
{
FormControl
}
from
"../controls/form-control.js"
;
import
{
FormField
}
from
"./field.js"
;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export
class
ProxyFormField
<
T
>
extends
FormField
<
boolean
,
T
,
any
>
{
constructor
(
required
:
boolean
,
public
name
:
string
,
public
empty_value
:
T
,
public
parsed_value
:
T
)
{
super
(
required
);
}
getEmptyValue
()
{
return
this
.
empty_value
;
}
async
parse
()
{
return
<
const
>
{
parsable
:
true
,
error
:
null
,
parsed_value
:
this
.
parsed_value
,
};
}
getControl
()
:
FormControl
{
throw
new
Error
(
"This field does not have a default control assigned"
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-java
Expires
Sun, Nov 2, 17:08 (13 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1029103
Default Alt Text
proxy-field.ts (640 B)
Attached To
Mode
rSGEN sealgen
Attached
Detach File
Event Timeline
Log In to Comment