Add proper type annotations for canvasSize
This commit is contained in:
parent
1e6aeda945
commit
d4969272cd
1 changed files with 7 additions and 0 deletions
|
@ -2,6 +2,12 @@ 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);
|
||||
}
|
||||
|
@ -90,6 +96,7 @@ class CardCreator {
|
|||
|
||||
/**
|
||||
* The canvas's dimensions.
|
||||
* @type {CardCreator~CanvasDimensions}
|
||||
*/
|
||||
get canvasSize() {
|
||||
return {
|
||||
|
|
Loading…
Reference in a new issue