From 63dd5990890e84e0010ac915870ccae9fc9ab6a6 Mon Sep 17 00:00:00 2001 From: Ryan Di Date: Fri, 25 Apr 2025 09:44:39 +1000 Subject: [PATCH] rename type --- packages/excalidraw/components/ShapeSwitch.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/excalidraw/components/ShapeSwitch.tsx b/packages/excalidraw/components/ShapeSwitch.tsx index d50176aae..1976e7a35 100644 --- a/packages/excalidraw/components/ShapeSwitch.tsx +++ b/packages/excalidraw/components/ShapeSwitch.tsx @@ -832,7 +832,7 @@ const CONVERTIBLE_LINEAR_TYPES: readonly ConvertibleLinearTypes[] = [ "elbowArrow", ]; -type NewElementType = ConvertibleGenericTypes | ConvertibleLinearTypes; +type ConvertibleType = ConvertibleGenericTypes | ConvertibleLinearTypes; const isConvertibleGenericType = ( elementType: string, @@ -861,7 +861,7 @@ export const convertElementType = < >, >( element: TElement, - newType: NewElementType, + newType: ConvertibleType, app: AppClassProperties, ): ExcalidrawElement => { if (!isValidConversion(element.type, newType)) { @@ -969,8 +969,8 @@ export const convertElementType = < const isValidConversion = ( startType: string, - targetType: NewElementType, -): startType is NewElementType => { + targetType: ConvertibleType, +): startType is ConvertibleType => { if ( isConvertibleGenericType(startType) && isConvertibleGenericType(targetType)