Skip to content

Commit

Permalink
Eased type constraints of studio.selection*
Browse files Browse the repository at this point in the history
  • Loading branch information
AriaMinaei committed Sep 22, 2021
1 parent 3c00645 commit dcf9098
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions theatre/studio/src/TheatreStudio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,12 +256,14 @@ export interface IStudio {
*
* You can read the current selection from studio.selection
*/
setSelection(selection: Array<ISheetObject | ISheet>): void
setSelection(selection: Array<ISheetObject<any> | ISheet>): void

/**
* Calls fn every time the current selection changes.
*/
onSelectionChange(fn: (s: Array<ISheetObject | ISheet>) => void): VoidFunction
onSelectionChange(
fn: (s: Array<ISheetObject<{}> | ISheet>) => void,
): VoidFunction

/**
* The current selection, consisting of Sheets and Sheet Objects
Expand All @@ -271,7 +273,7 @@ export interface IStudio {
* console.log(studio.selection) // => [ISheetObject, ISheet]
* ```
*/
readonly selection: Array<ISheetObject | ISheet>
readonly selection: Array<ISheetObject<{}> | ISheet>

/**
* Registers an extension
Expand Down

0 comments on commit dcf9098

Please sign in to comment.