Commit b7eec241 authored by Robert Knight's avatar Robert Knight

Enable typechecking of most JS files in src/annotator

Enable typechecking of most JS files in src/annotator except for:

 - The entrypoint index.js file. This cannot be usefully checked since
   it imports many CoffeeScript files
 - pdf-sidebar.js - This extends a class currently written in
   CoffeeScript
 - src/annotator/anchoring/pdf.js - This requires types for various
   PDF.js globals to be defined
 - The `annotator/plugin` directory
parent 926adfeb
// @ts-nocheck
/**
* Set of icons used by the annotator part of the application via the `SvgIcon`
* component.
......
......@@ -30,7 +30,7 @@ export default class PDFMetadata {
* Construct a `PDFMetadata` that returns URIs/metadata associated with a
* given PDF viewer.
*
* @param {PDFViewerApplication} app
* @param {Object} app - The `PDFViewerApplication` global from PDF.js
*/
constructor(app) {
this._loaded = new Promise(resolve => {
......
......@@ -11,8 +11,11 @@
"target": "ES2020"
},
"include": [
"annotator/*.js",
"annotator/anchoring/*.js",
"annotator/config/*.js",
"annotator/components/*.js",
"annotator/plugin/*.js",
"annotator/util/*.js",
"boot/*.js",
"shared/*.js",
......@@ -26,6 +29,14 @@
"sidebar/store/*.js"
],
"exclude": [
// Enable this once the rest of `src/annotator` is checked.
"annotator/index.js",
// Files in `src/annotator` that still have errors to be resolved.
"annotator/pdf-sidebar.js",
"annotator/anchoring/pdf.js",
"annotator/plugin/document.js",
// Enable this once the rest of `src/sidebar` is checked.
"sidebar/index.js",
......
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