pdf.js/external
Michael Wu c08b4ea30d Fix Viewer API definitions and include in CI
The Viewer API definitions do not compile because of missing imports and
anonymous objects are typed as `Object`. These issues were not caught
during CI because the test project was not compiling anything from the
Viewer API.

As an example of the first problem:

```
/**
 * @implements MyInterface
 */
export class MyClass {
    ...
}
```

will generate a broken definition that doesn’t import MyInterface:

```
/**
 * @implements MyInterface
 */
export class MyClass implements MyInterface {
    ...
}
```

This can be fixed by adding a typedef jsdoc to specify the import:

```
/** @typedef {import("./otherFile").MyInterface} MyInterface */
```

See https://github.com/jsdoc/jsdoc/issues/1537 and
https://github.com/microsoft/TypeScript/issues/22160 for more details.

As an example of the second problem:

```
/**
 * Gets the size of the specified page, converted from PDF units to inches.
 * @param {Object} An Object containing the properties: {Array} `view`,
 *   {number} `userUnit`, and {number} `rotate`.
 */
function getPageSizeInches({ view, userUnit, rotate }) {
    ...
}
```

generates the broken definition:

```
function getPageSizeInches({ view, userUnit, rotate }: Object) {
    ...
}
```

The jsdoc should specify the type of each nested property:

```
/**
 * Gets the size of the specified page, converted from PDF units to inches.
 * @param {Object} options An object containing the properties: {Array} `view`,
 *   {number} `userUnit`, and {number} `rotate`.
 * @param {number[]} options.view
 * @param {number} options.userUnit
 * @param {number} options.rotate
 */
```
2021-08-25 18:45:46 -04:00
..
bcmaps Removes external/cmaps; adds binary cmaps to the repo 2014-03-17 13:30:27 -05:00
builder Account for changes in eslint-plugin-import version 2.23.0 2021-05-16 11:50:55 +02:00
cmapscompress Fix inefficient regular expressions in external/cmapscompress/parse.js 2021-08-01 12:12:42 +02:00
dist Fix Viewer API definitions and include in CI 2021-08-25 18:45:46 -04:00
importL10n Enable the ESLint no-var rule in the external/ folder 2021-03-14 11:43:25 +01:00
quickjs [JS] Use heap allocation when initializing quickjs sandbox (#13286) 2021-04-23 12:04:14 +02:00
standard_fonts Bundle the license-file for the Liberation fonts in the builds (PR 13517 follow-up) 2021-06-10 00:11:47 +02:00
systemjs Cache babel source map. 2021-04-09 10:34:54 -07:00
webL10n Stop dispatching a "localized" event from the webL10n library, since it's unused and may clash with the default viewer 2019-09-13 12:38:36 +02:00
webpack Enable the ESLint no-var rule in the external/ folder 2021-03-14 11:43:25 +01:00
.eslintrc Enable the ESLint no-var rule in the external/ folder 2021-03-14 11:43:25 +01:00
.gitignore Removes external/cmaps; adds binary cmaps to the repo 2014-03-17 13:30:27 -05:00