Korilakkuma / XSound

XSound gives Web Developers Powerful Audio Features Easily !
https://xsound.jp
MIT License
208 stars 17 forks source link

The `module` method cannot get installed `Effector` #99

Closed Korilakkuma closed 9 months ago

Korilakkuma commented 1 year ago

Maybe, it is required that fix to return installed Effector, if have installed effector name in default label.


// ...
public module(moduleName: 'wah'): Wah;
public module(moduleName: string): Effector;
public module(moduleName: ModuleName | string): Module | null {
  switch (moduleName) {
    // ...
    case 'wah':
      return this.wah;
    default:
      if (installed(moduleName)) {
        return installedModule;
      }

      return null;
  }
}