RolandJansen / intermix

Typescript/Javascript framework for building sequencer-based audio apps
GNU Lesser General Public License v3.0
6 stars 0 forks source link

Define a type that represents a plugin class #138

Closed RolandJansen closed 3 years ago

RolandJansen commented 4 years ago

At several locations in the code there is this typedef for plugin classes:

new (itemId: string, ac: AudioContext) => IPlugin

this could be refactored as a type or interface for better readability.

RolandJansen commented 3 years ago

Added this as an interface because then we can define static members like metaData:

export interface IPluginConstructor {
    readonly metaData: IPluginMetaData;
    new (itemId: string, ac: AudioContext): IPlugin;
}