From 279e083baa2168b014fb8612a86f2f32a7b73776 Mon Sep 17 00:00:00 2001 From: Davide Tantillo Date: Wed, 5 Nov 2025 15:27:28 +0100 Subject: [PATCH] [ts] Allow skeleton.setAttachment to accept null as attachmentName. --- spine-ts/spine-core/src/Skeleton.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spine-ts/spine-core/src/Skeleton.ts b/spine-ts/spine-core/src/Skeleton.ts index 0ba5c4167..02acbd9d7 100644 --- a/spine-ts/spine-core/src/Skeleton.ts +++ b/spine-ts/spine-core/src/Skeleton.ts @@ -407,7 +407,7 @@ export class Skeleton { /** A convenience method to set an attachment by finding the slot with {@link findSlot()}, finding the attachment with * {@link getAttachment()}, then setting the slot's {@link Slot.attachment}. * @param attachmentName May be null to clear the slot's attachment. */ - setAttachment (slotName: string, attachmentName: string) { + setAttachment (slotName: string, attachmentName: string | null) { if (!slotName) throw new Error("slotName cannot be null."); const slot = this.findSlot(slotName); if (!slot) throw new Error(`Slot not found: ${slotName}`);