From ffc58d248bbb9351066546d15e703f64b274ac2a Mon Sep 17 00:00:00 2001 From: kyechan99 Date: Thu, 18 Jul 2024 18:46:56 +0900 Subject: [PATCH] fix: specify type Text.measureSize --- src/shapes/Text.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/shapes/Text.ts b/src/shapes/Text.ts index 07418fa0..ddd65559 100644 --- a/src/shapes/Text.ts +++ b/src/shapes/Text.ts @@ -392,13 +392,13 @@ export class Text extends Shape { * That method can't handle multiline text. * @method * @name Konva.Text#measureSize - * @param {String} [text] text to measure - * @returns {Object} { width , height} of measured text + * @param {String} text text to measure + * @returns {Object} { width , height } of measured text */ - measureSize(text) { + measureSize(text: string) { var _context = getDummyContext(), fontSize = this.fontSize(), - metrics; + metrics: TextMetrics; _context.save(); _context.font = this._getContextFont();