Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
6f3a741d
Commit
6f3a741d
authored
Apr 20, 2023
by
Alejandro Celaya
Committed by
Alejandro Celaya
Apr 20, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Migrate service-config module to TS
parent
bce4c251
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
9 deletions
+3
-9
build-settings.ts
src/sidebar/config/build-settings.ts
+1
-1
service-config.ts
src/sidebar/config/service-config.ts
+2
-8
No files found.
src/sidebar/config/build-settings.ts
View file @
6f3a741d
...
...
@@ -13,7 +13,7 @@ import { hostPageConfig } from './host-config';
/**
* Ascend `levels` from `window_` to find the designated embedder frame.
*
* @param levels - Number of ancestor
s
levels to ascend
* @param levels - Number of ancestor levels to ascend
*/
function
getEmbedderFrame
(
levels
:
number
,
window_
:
Window
=
window
):
Window
{
let
ancestorWindow
=
window_
;
...
...
src/sidebar/config/service-config.
j
s
→
src/sidebar/config/service-config.
t
s
View file @
6f3a741d
/**
* @typedef {import('../../types/config').SidebarSettings} SidebarSettings
* @typedef {import('../../types/config').Service} Service
*/
import
type
{
SidebarSettings
,
Service
}
from
'../../types/config'
;
/**
* Return the configuration for the annotation service which the client would retrieve
* annotations from which may contain the authority, grantToken and icon.
*
* @param {SidebarSettings} settings
* @return {Service|null}
*/
export
function
serviceConfig
({
services
}
)
{
export
function
serviceConfig
({
services
}
:
SidebarSettings
):
Service
|
null
{
if
(
Array
.
isArray
(
services
)
&&
services
[
0
])
{
return
services
[
0
];
}
...
...
Write
Preview
Markdown
is supported
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