Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F3893685
html.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1014 B
Referenced Files
None
Subscribers
None
html.ts
View Options
import
{
Context
}
from
"koa"
;
import
{
FlatTemplatable
}
from
"tempstream"
;
import
{
FormControl
}
from
"./controls"
;
type
Renderer
=
((
ctx
:
Context
)
=>
FlatTemplatable
)
|
FlatTemplatable
;
export
class
HTML
extends
FormControl
{
role
=
(
<
const
>
"decoration"
)
as
"decoration"
|
"submit"
;
public
renderer
:
Renderer
;
constructor
(
role
:
"decoration"
|
"submit"
,
renderer
:
Renderer
);
constructor
(
renderer
:
Renderer
);
constructor
(
role_or_renderer
:
"decoration"
|
"submit"
|
Renderer
,
renderer_or_undefined
?:
|
((
ctx
:
Context
)
=>
FlatTemplatable
)
|
FlatTemplatable
)
{
super
();
if
(
arguments
.
length
==
2
)
{
this
.
role
=
role_or_renderer
as
"decoration"
|
"submit"
;
this
.
renderer
=
renderer_or_undefined
as
Renderer
;
}
else
{
this
.
renderer
=
role_or_renderer
;
}
}
async
render
(
ctx
:
Context
)
:
Promise
<
FlatTemplatable
>
{
if
(
typeof
this
.
renderer
===
"string"
)
{
return
this
.
renderer
;
}
return
typeof
this
.
renderer
==
"function"
?
this
.
renderer
(
ctx
)
:
this
.
renderer
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-java
Expires
Mon, May 19, 00:51 (1 d, 1 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
661410
Default Alt Text
html.ts (1014 B)
Attached To
Mode
rSGEN sealgen
Attached
Detach File
Event Timeline
Log In to Comment