From d5ff8bec82620f897588d1dc46c668e8a7afc150 Mon Sep 17 00:00:00 2001 From: karashiiro <49822414+karashiiro@users.noreply.github.com> Date: Mon, 31 May 2021 11:47:24 -0700 Subject: [PATCH] Move CanvasDimensions typedef closer to the getter --- create-card.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/create-card.js b/create-card.js index 18fddbc..49de0c8 100644 --- a/create-card.js +++ b/create-card.js @@ -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}