manifesto
manifesto copied to clipboard
Update getSequences to also return ranges with sequence behavior
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
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()?