Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
open-source
SemWeb
libview
Commits
6b7cdc8c4a85
Commit
84817d53
authored
Dec 21, 2018
by
Laurent Wouters
Browse files
[clean] Cleanup unnecessary typing
parent
dfe37c413b73
Changes
1
Hide whitespace changes
Inline
Side-by-side
libview/src/view-def.ts
View file @
6b7cdc8c
...
...
@@ -149,7 +149,7 @@ function fetchDescriptors(
if
(
source
.
kind
===
ViewRegistrySourceKind
.
inline
)
{
return
new
Promise
<
ViewDescriptor
[]
>
(
(
resolve
:
(
result
:
ViewDescriptor
[]
|
Promise
<
ViewDescriptor
[]
>
)
=>
void
,
resolve
:
(
result
:
ViewDescriptor
[])
=>
void
,
reject
:
(
reason
:
string
)
=>
void
)
=>
{
resolve
((
source
as
ViewRegistrySourceInline
).
descriptors
);
...
...
@@ -158,7 +158,7 @@ function fetchDescriptors(
}
else
if
(
source
.
kind
===
ViewRegistrySourceKind
.
remote
)
{
return
new
Promise
<
ViewDescriptor
[]
>
(
(
resolve
:
(
result
:
ViewDescriptor
[]
|
Promise
<
ViewDescriptor
[]
>
)
=>
void
,
resolve
:
(
result
:
ViewDescriptor
[])
=>
void
,
reject
:
(
reason
:
string
)
=>
void
)
=>
{
let
xmlHttp
=
new
XMLHttpRequest
();
...
...
@@ -183,7 +183,7 @@ function fetchDescriptors(
}
else
{
return
new
Promise
<
ViewDescriptor
[]
>
(
(
resolve
:
(
result
:
ViewDescriptor
[]
|
Promise
<
ViewDescriptor
[]
>
)
=>
void
,
resolve
:
(
result
:
ViewDescriptor
[])
=>
void
,
reject
:
(
reason
:
string
)
=>
void
)
=>
{
reject
(
"
Invalid source
"
);
...
...
@@ -222,9 +222,9 @@ function loadDescriptors(
.
catch
((
reason
:
string
)
=>
{
console
.
log
(
"
Failed to fetch descriptor from source
"
+
source
.
name
+
"
:
"
+
reason
source
.
name
+
"
:
"
+
reason
);
onPartFinished
();
});
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
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 comment