Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F1262573
registry.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
565 B
Referenced Files
None
Subscribers
None
registry.ts
View Options
import
{
Component
,
ComponentConstructor
}
from
"./component.js"
;
export
class
Registry
{
map
:
Map
<
string
,
Component
>
=
new
Map
();
// eslint-disable-next-line @typescript-eslint/no-explicit-any
add
(
type
:
string
,
component
:
ComponentConstructor
<
any
>
)
{
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
this
.
map
.
set
(
type
,
new
component
());
}
get
(
type
:
string
)
:
Component
|
null
{
const
ret
=
this
.
map
.
get
(
type
);
return
ret
?
ret
:
null
;
}
getAll
()
:
Record
<
string
,
Component
>
{
return
Object
.
fromEntries
(
this
.
map
.
entries
());
}
}
File Metadata
Details
Attached
Mime Type
text/x-java
Expires
Fri, Jan 24, 15:15 (1 d, 15 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
599872
Default Alt Text
registry.ts (565 B)
Attached To
Mode
rJDD jdd
Attached
Detach File
Event Timeline
Log In to Comment