Commit 0420da27 authored by Eduardo Sanz García's avatar Eduardo Sanz García Committed by Eduardo

Manual fixes of type errors

parent e1bc90f1
...@@ -377,7 +377,7 @@ function Toolbar({ isPreviewing, onCommand, onTogglePreview }) { ...@@ -377,7 +377,7 @@ function Toolbar({ isPreviewing, onCommand, onTogglePreview }) {
* @prop {Record<string,string>} [textStyle] - * @prop {Record<string,string>} [textStyle] -
* Additional CSS properties to apply to the input field and rendered preview * Additional CSS properties to apply to the input field and rendered preview
* @prop {string} [text] - The markdown text to edit. * @prop {string} [text] - The markdown text to edit.
* @prop {(a?: Record<'text', string>) => void} [onEditText] * @prop {({text: string}) => void} [onEditText]
* - Callback invoked with `{ text }` object when user edits text. * - Callback invoked with `{ text }` object when user edits text.
* TODO: Simplify this callback to take just a string rather than an object once the * TODO: Simplify this callback to take just a string rather than an object once the
* parent component is converted to Preact. * parent component is converted to Preact.
......
...@@ -59,10 +59,10 @@ export function applyTheme(themeProperties, settings) { ...@@ -59,10 +59,10 @@ export function applyTheme(themeProperties, settings) {
if (!settings.branding) { if (!settings.branding) {
return style; return style;
} }
const { branding } = settings;
themeProperties.forEach(themeProp => { themeProperties.forEach(themeProp => {
const propertyName = supportedThemeProperties[themeProp]; const propertyName = supportedThemeProperties[themeProp];
const propertyValue = settings.branding[themeProp]; const propertyValue = branding[themeProp];
if (propertyName && propertyValue) { if (propertyName && propertyValue) {
style[propertyName] = propertyValue; style[propertyName] = propertyValue;
} }
......
...@@ -7,14 +7,14 @@ ...@@ -7,14 +7,14 @@
/** /**
* An object representing document metadata. * An object representing document metadata.
* *
* @typedef {object} DocMetadata * @typedef DocMetadata
* @prop {string=} documentFingerprint - Optional PDF fingerprint for current document * @prop {string=} documentFingerprint - Optional PDF fingerprint for current document
*/ */
/** /**
* An object representing document info. * An object representing document info.
* *
* @typedef {object} DocumentInfo * @typedef DocumentInfo
* @prop {string=} [uri] - Current document URL * @prop {string=} [uri] - Current document URL
* @prop {DocMetadata} [metadata] - Document metadata * @prop {DocMetadata} [metadata] - Document metadata
*/ */
......
...@@ -8,7 +8,7 @@ const MESSAGE_DISMISS_DELAY = 500; ...@@ -8,7 +8,7 @@ const MESSAGE_DISMISS_DELAY = 500;
/** /**
* Additional control over the display of a particular message. * Additional control over the display of a particular message.
* *
* @typedef {object} MessageOptions * @typedef MessageOptions
* @prop {boolean} [autoDismiss=true] - Whether the toast message automatically disappears. * @prop {boolean} [autoDismiss=true] - Whether the toast message automatically disappears.
* @prop {string} [moreInfoURL=''] - Optional URL for users to visit for "more info" * @prop {string} [moreInfoURL=''] - Optional URL for users to visit for "more info"
*/ */
......
...@@ -46,7 +46,7 @@ import { createStoreModule } from '../create-store'; ...@@ -46,7 +46,7 @@ import { createStoreModule } from '../create-store';
*/ */
/** /**
* @typedef {Record<FilterKey, FilterOption>} Filters * @typedef {Record<FilterKey, FilterOption>|{}} Filters
*/ */
/** /**
......
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