Skip to content

Commit da0d048

Browse files
Merge pull request #298 from MichaelBuhler/fix-docs
A solution for the docs generation error
2 parents 849111a + 33a3815 commit da0d048

File tree

4 files changed

+38
-3
lines changed

4 files changed

+38
-3
lines changed

.jsdoc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"plugins": ["plugins/markdown", "jsdoc-plugin-typescript"],
2+
"plugins": ["plugins/markdown", "jsdoc-plugin-typescript", "jsdoc-plugin-intersection"],
33
"typescript": {
44
"moduleRoot": "src"
55
}

package-lock.json

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
"fs-extra": "^7.0.1",
5757
"isomorphic-fetch": "^2.2.1",
5858
"jsdoc": "^3.6.4",
59+
"jsdoc-plugin-intersection": "^1.0.4",
5960
"jsdoc-plugin-typescript": "^2.0.6",
6061
"jshint-stylish": "^2.2.1",
6162
"mocha": "^7.1.0",

src/geotiff.js

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,28 @@ export { setLogger };
2828
*/
2929

3030
/**
31-
* @typedef { (TypedArray | TypedArray[]) & { height: number; width: number } } ReadRasterResult
31+
* @typedef {{ height:number, width: number }} Dimensions
32+
*/
33+
34+
/**
35+
* The autogenerated docs are a little confusing here. The effective type is:
36+
*
37+
* `TypedArray & { height: number; width: number}`
38+
* @typedef {TypedArray & Dimensions} TypedArrayWithDimensions
39+
*/
40+
41+
/**
42+
* The autogenerated docs are a little confusing here. The effective type is:
43+
*
44+
* `TypedArray[] & { height: number; width: number}`
45+
* @typedef {TypedArray[] & Dimensions} TypedArrayArrayWithDimensions
46+
*/
47+
48+
/**
49+
* The autogenerated docs are a little confusing here. The effective type is:
50+
*
51+
* `(TypedArray | TypedArray[]) & { height: number; width: number}`
52+
* @typedef {TypedArrayWithDimensions | TypedArrayArrayWithDimensions} ReadRasterResult
3253
*/
3354

3455
function getFieldTypeLength(fieldType) {
@@ -186,7 +207,7 @@ class GeoTIFFBase {
186207
* image is called and the result returned.
187208
* @see GeoTIFFImage.readRasters
188209
* @param {import('./geotiffimage').ReadRasterOptions} [options={}] optional parameters
189-
* @returns {Promise<ReadRasterResult>} the decoded arrays as a promise
210+
* @returns {Promise<ReadRasterResult>} the decoded array(s), with `height` and `width`, as a promise
190211
*/
191212
async readRasters(options = {}) {
192213
const { window: imageWindow, width, height } = options;

0 commit comments

Comments
 (0)