Commit 3b6697e8 authored by Alejandro Celaya's avatar Alejandro Celaya Committed by Alejandro Celaya

Migrate integrations index module to TS

parent 04cc7f9a
import type { Annotator, Integration } from '../../types/annotator';
import { HTMLIntegration } from './html';
import { PDFIntegration, isPDF } from './pdf';
import {
......@@ -5,20 +6,11 @@ import {
vitalSourceFrameRole,
} from './vitalsource';
/**
* @typedef {import('../../types/annotator').Annotator} Annotator
* @typedef {import('../../types/annotator').ContentInfoConfig} ContentInfoBanner
* @typedef {import('../../types/annotator').Integration} Integration
*/
/**
* Create the integration that handles document-type specific aspects of
* guest functionality.
*
* @param {Annotator} annotator
* @return {Integration}
*/
export function createIntegration(annotator) {
export function createIntegration(annotator: Annotator): Integration {
if (isPDF()) {
return new PDFIntegration(annotator);
}
......
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