diff --git a/src/graphic/helper/parseText.ts b/src/graphic/helper/parseText.ts index 201d8fc00..275e36b0d 100644 --- a/src/graphic/helper/parseText.ts +++ b/src/graphic/helper/parseText.ts @@ -41,8 +41,8 @@ export function truncateText( text: string, containerWidth: number, font: string, - ellipsis: string, - options: InnerTruncateOption + ellipsis?: string, + options?: InnerTruncateOption ): string { if (!containerWidth) { return ''; @@ -63,8 +63,8 @@ export function truncateText( function prepareTruncateOptions( containerWidth: number, font: string, - ellipsis: string, - options: InnerTruncateOption + ellipsis?: string, + options?: InnerTruncateOption ): InnerPreparedTruncateOption { options = options || {}; let preparedOpts = extend({}, options) as InnerPreparedTruncateOption;