Skip to content

Commit

Permalink
Drive-by fix: use MediaType instead of string in parameter type decl.
Browse files Browse the repository at this point in the history
  • Loading branch information
adrian.nistor authored and anistor committed Nov 10, 2023
1 parent 9255c6c commit 0fd4bcf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/cadenza.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ export class CadenzaClient {
* @param {boolean} [options.hideMainHeaderAndFooter] - Whether to hide the main Cadenza header and footer
* @param {boolean} [options.hideWorkbookToolBar] - Whether to hide the workbook toolbar
* @param {GlobalId} [options.highlightGlobalId] - The ID of an item to highlight / expand in the navigator
* @param {string} [options.mediaType] - Set to 'application/pdf' for views of type "JasperReports report"
* @param {MediaType} [options.mediaType] - Set to 'application/pdf' for views of type "JasperReports report"
* to show the report PDF directly, without any Cadenza headers or footers.
* @param {OperationMode} [options.operationMode] - The mode in which a workbook should be operated
* @param {AbortSignal} [options.signal] - A signal to abort the iframe loading
Expand Down Expand Up @@ -675,7 +675,7 @@ function assertSupportedMediaType(
/** @type MediaType */ type,
/** @type MediaType[] */ supportedTypes = Object.values(MediaType),
) {
return assert(supportedTypes.includes(type), `Invalid media type: ${type}`);
assert(supportedTypes.includes(type), `Invalid media type: ${type}`);
}

/**
Expand All @@ -689,7 +689,7 @@ function assertSupportedMediaType(
* @param {GlobalId} [params.highlightGlobalId]
* @param {string} [params.locationFinder]
* @param {Extent} [params.mapExtent]
* @param {string} [params.mediaType]
* @param {MediaType} [params.mediaType]
* @param {number} [params.minScale]
* @param {OperationMode} [params.operationMode]
* @param {TablePart[]} [params.parts]
Expand Down

0 comments on commit 0fd4bcf

Please sign in to comment.