Skip to content

Update getSequences to also return ranges with sequence behavior#84

Open
MImranAsghar wants to merge 1 commit into
IIIF-Commons:mainfrom
utlib:update-get-sequences-with-ranges
Open

Update getSequences to also return ranges with sequence behavior#84
MImranAsghar wants to merge 1 commit into
IIIF-Commons:mainfrom
utlib:update-get-sequences-with-ranges

Conversation

@MImranAsghar

Copy link
Copy Markdown

No description provided.

@stephenwf

Copy link
Copy Markdown
Member

Change looks good. This will be a breaking change for the UV as it sometimes casts the output of getSequences() like:

const sequences: Array<Sequence> = manifest.getSequences();

I know #79 brings the interfaces closer, but do you think we should align the interfaces so we have something like:

interface SequenceInterface {}

class Sequence implements SequenceInterface {}

class Range implements SequenceInterface /* other interfaces? [...] */  {}

class Manifest {
  // ...
  getSequences(): SequenceInterface[] { /* ... */ }
}

cc @edsilv @demiankatz

@MImranAsghar

MImranAsghar commented Jan 22, 2021

Copy link
Copy Markdown
Author

Hi @stephenwf , just to make sure i understand correctly, in this case sequence interface would list out the definitions for all functions and types needed for sequence and be implemented by the Sequence and Range classes, and the implementation of those functions like getCanvases would be within each range.ts (like #79) and sequence.ts. So in that case we can use the sequence interface as a type instead of Sequence | Range for getSequences()?

@jamesmisson jamesmisson changed the base branch from master to main July 8, 2025 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants