FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
TypeScriptSamples/systemjs/greeter.ts at master · Yonet/TypeScriptSamples · GitHub
Yonet
TypeScriptSamples
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
TypeScriptSamples
/
systemjs
/
greeter.ts
Copy path
More file actions
More file actions
Latest commit
History
History
History
25 lines (22 loc) · 572 Bytes
Breadcrumbs
TypeScriptSamples
/
systemjs
/
greeter.ts
Copy path
File metadata and controls
25 lines (22 loc) · 572 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
export
class
Greeter
{
element
:
HTMLElement
;
span
:
HTMLElement
;
timerToken
:
number
;
constructor
(
element
:
HTMLElement
)
{
this
.
element
=
element
;
this
.
element
.
innerText
+=
"The time is: "
;
this
.
span
=
document
.
createElement
(
'span'
)
;
this
.
element
.
appendChild
(
this
.
span
)
;
this
.
span
.
innerText
=
new
Date
(
)
.
toUTCString
(
)
;
}
start
(
)
{
this
.
timerToken
=
setInterval
(
(
)
=>
this
.
span
.
innerText
=
new
Date
(
)
.
toUTCString
(
)
,
500
)
;
}
stop
(
)
{
clearTimeout
(
this
.
timerToken
)
;
}
}
Back
|
FazBrowse Home
|
New Git URL