Move CanvasDimensions typedef closer to the getter

This commit is contained in:
karashiiro 2021-05-31 11:47:24 -07:00
parent d4969272cd
commit d5ff8bec82

View file

@ -2,12 +2,6 @@ const fetch = require("node-fetch");
const path = require("path");
const { createCanvas, loadImage, registerFont } = require("canvas");
/**
* @typedef {Object} CardCreator~CanvasDimensions
* @property {number} width The width of the canvas.
* @property {number} height The height of the canvas.
*/
function absolute(relativePath) {
return path.join(__dirname, relativePath);
}
@ -94,6 +88,12 @@ class CardCreator {
this.isInit = false;
}
/**
* @typedef {Object} CardCreator~CanvasDimensions
* @property {number} width The width of the canvas.
* @property {number} height The height of the canvas.
*/
/**
* The canvas's dimensions.
* @type {CardCreator~CanvasDimensions}