Commit ab6be482 authored by Alejandro Celaya's avatar Alejandro Celaya Committed by Alejandro Celaya

Migrate app annotator config to TypeScript

parent b71396be
...@@ -2,15 +2,15 @@ ...@@ -2,15 +2,15 @@
* Create the JSON-serializable subset of annotator configuration that should * Create the JSON-serializable subset of annotator configuration that should
* be passed to the sidebar or notebook applications. * be passed to the sidebar or notebook applications.
* *
* @param {string} appURL - URL from which the application will be served * @param appURL - URL from which the application will be served
* @param {Record<string, unknown>} config
* @return {Record<string, unknown>}
*/ */
export function createAppConfig(appURL, config) { export function createAppConfig(
/** @type {Record<string, unknown>} */ appURL: string,
const appConfig = {}; config: Record<string, unknown>
): Record<string, unknown> {
const appConfig: Record<string, unknown> = {};
for (let [key, value] of Object.entries(config)) { for (const [key, value] of Object.entries(config)) {
// Remove several annotator-only properties. // Remove several annotator-only properties.
// //
// nb. We don't currently strip all the annotator-only properties here. // nb. We don't currently strip all the annotator-only properties here.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment