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
476859f89633
Commit
2d1f8bfa
authored
Sep 10, 2020
by
Fabien Amarger
Browse files
feat: [fetchData] Add the fetchDataFromURI function to the simplerender signature
parent
1381aa8099bc
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/view-impl.ts
View file @
476859f8
...
...
@@ -53,6 +53,11 @@ export interface ViewRendering {
suggestedResources
?:
Resource
[];
}
export
type
FetchDataFromURIFunction
=
(
uri
:
string
,
respFormat
?:
{[
key
:
string
]:
string
}
)
=>
Promise
<
{[
key
:
string
]:
string
}
>
;
/**
* The implementation of a view
*/
...
...
@@ -82,7 +87,11 @@ export interface ViewImplementation {
target
:
Resource
):
ViewRendering
;
simpleRender
?:
(
context
:
$rdf
.
Formula
,
target
:
string
)
=>
Element
;
simpleRender
?:
(
context
:
$rdf
.
Formula
,
target
:
string
,
fetchDataFromURI
?:
FetchDataFromURIFunction
)
=>
Element
;
}
/**
...
...
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