Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
haoqu.ma
/
gotty
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 2b4eb55d
authored
Aug 22, 2017
by
Iwasaki Yudai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add typing for libapps
1 parent
a8bb23f5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
58 additions
and
5 deletions
js/dist/gotty-bundle.js.map
js/dist/hterm.d.ts
js/src/hterm.ts
js/typings/libapps/index.d.ts
server/asset.go
js/dist/gotty-bundle.js.map
View file @
2b4eb55
This diff could not be displayed because it is too large.
js/dist/hterm.d.ts
View file @
2b4eb55
import
*
as
bare
from
"libapps"
;
import
*
as
bare
from
"libapps"
;
export
declare
class
Hterm
{
export
declare
class
Hterm
{
elem
:
HTMLElement
;
elem
:
HTMLElement
;
term
:
bare
.
Terminal
;
term
:
bare
.
hterm
.
Terminal
;
io
:
bare
.
IO
;
io
:
bare
.
hterm
.
IO
;
columns
:
number
;
columns
:
number
;
rows
:
number
;
rows
:
number
;
message
:
string
;
message
:
string
;
...
...
js/src/hterm.ts
View file @
2b4eb55
...
@@ -3,8 +3,8 @@ import * as bare from "libapps";
...
@@ -3,8 +3,8 @@ import * as bare from "libapps";
export
class
Hterm
{
export
class
Hterm
{
elem
:
HTMLElement
;
elem
:
HTMLElement
;
term
:
bare
.
Terminal
;
term
:
bare
.
hterm
.
Terminal
;
io
:
bare
.
IO
;
io
:
bare
.
hterm
.
IO
;
columns
:
number
;
columns
:
number
;
rows
:
number
;
rows
:
number
;
...
...
js/typings/libapps/index.d.ts
0 → 100644
View file @
2b4eb55
export
namespace
hterm
{
export
interface
Terminal
{
io
:
IO
;
onTerminalReady
:
()
=>
void
;
getPrefs
():
Prefs
;
decorate
(
HTMLElement
);
installKeyboard
():
void
;
uninstallKeyboard
():
void
;
setWindowTitle
(
title
:
string
):
void
;
reset
():
void
;
softReset
():
void
;
}
export
interface
TerminalConstructor
{
new
():
Terminal
;
():
Terminal
;
}
export
interface
IO
{
writeUTF8
:
((
data
:
string
)
=>
void
);
writeUTF16
:
((
data
:
string
)
=>
void
);
onVTKeystroke
:
((
data
:
string
)
=>
void
)
|
null
;
sendString
:
((
data
:
string
)
=>
void
)
|
null
;
onTerminalResize
:
((
columns
:
number
,
rows
:
number
)
=>
void
)
|
null
;
push
():
IO
;
writeUTF
(
data
:
string
);
showOverlay
(
message
:
string
,
timeout
:
number
|
null
);
}
export
interface
Prefs
{
set
(
key
:
string
,
value
:
string
):
void
;
}
export
var
Terminal
:
TerminalConstructor
;
export
var
defaultStorage
:
lib
.
Storage
;
}
export
namespace
lib
{
export
interface
Storage
{
}
export
interface
Memory
{
new
():
Storage
;
Memory
():
Storage
}
export
var
Storage
:
{
Memory
:
Memory
}
}
server/asset.go
View file @
2b4eb55
...
@@ -209,7 +209,7 @@ func staticJsGottyBundleJs() (*asset, error) {
...
@@ -209,7 +209,7 @@ func staticJsGottyBundleJs() (*asset, error) {
return
nil
,
err
return
nil
,
err
}
}
info
:=
bindataFileInfo
{
name
:
"static/js/gotty-bundle.js"
,
size
:
773299
,
mode
:
os
.
FileMode
(
436
),
modTime
:
time
.
Unix
(
150338
5387
,
0
)}
info
:=
bindataFileInfo
{
name
:
"static/js/gotty-bundle.js"
,
size
:
773299
,
mode
:
os
.
FileMode
(
436
),
modTime
:
time
.
Unix
(
150338
6172
,
0
)}
a
:=
&
asset
{
bytes
:
bytes
,
info
:
info
}
a
:=
&
asset
{
bytes
:
bytes
,
info
:
info
}
return
a
,
nil
return
a
,
nil
}
}
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment