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 committed Nov 6, 2023
1 parent 4e16f41 commit 5ea8c57
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 @@ -171,7 +171,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 {UiFeature[]} [options.disabledUiFeatures] - Cadenza UI features to disable
Expand Down Expand Up @@ -678,7 +678,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 @@ -691,7 +691,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 {TablePart[]} [params.parts]
* @param {boolean} [params.useMapSrs]
Expand Down

0 comments on commit 5ea8c57

Please sign in to comment.