From dcf90983a565e585661b631b457a807eb4a4d874 Mon Sep 17 00:00:00 2001 From: Aria Minaei Date: Wed, 22 Sep 2021 09:30:28 +0200 Subject: [PATCH] Eased type constraints of `studio.selection*` --- theatre/studio/src/TheatreStudio.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/theatre/studio/src/TheatreStudio.ts b/theatre/studio/src/TheatreStudio.ts index 6f0db063e..d56dc27cb 100644 --- a/theatre/studio/src/TheatreStudio.ts +++ b/theatre/studio/src/TheatreStudio.ts @@ -256,12 +256,14 @@ export interface IStudio { * * You can read the current selection from studio.selection */ - setSelection(selection: Array): void + setSelection(selection: Array | ISheet>): void /** * Calls fn every time the current selection changes. */ - onSelectionChange(fn: (s: Array) => void): VoidFunction + onSelectionChange( + fn: (s: Array | ISheet>) => void, + ): VoidFunction /** * The current selection, consisting of Sheets and Sheet Objects @@ -271,7 +273,7 @@ export interface IStudio { * console.log(studio.selection) // => [ISheetObject, ISheet] * ``` */ - readonly selection: Array + readonly selection: Array | ISheet> /** * Registers an extension