view src/app/waveform/waves-ui.d.ts @ 123:efd72dc8337c

Start writing type definitions for waves-ui - this may eventually belong in waves-ui itself.
author Lucas Thompson <dev@lucas.im>
date Wed, 15 Mar 2017 12:09:50 +0000
parents e58fb181a11d
children e40a39acec25
line wrap: on
line source
/**
 * Created by lucas on 01/12/2016.
 */
declare const AmbientInstance: WavesUserInterface;

declare module 'waves-ui' {
  export default AmbientInstance;
}

interface WavesUserInterface {
  core: any;
  helpers: any;
  states: any;
  utils: Utilities;
}

interface MatrixEntity {
  getColumnCount: () => number;
  getColumnHeight: () => number;
  getColumn: (n: number) => number[];
  getStepDuration: () => number;
  getStartTime: () => number;
}

interface MatrixEntityConstructor {
  new(): MatrixEntity;
}

interface PrefilledMatrixEntityConstructor {
  new(data: Float32Array[] | number[][],
      startTime: number,
      stepDuration: number): MatrixEntity;
}

interface Utilities {
  MatrixEntity: MatrixEntityConstructor;
  PrefilledMatrixEntity: PrefilledMatrixEntityConstructor;
  scales: any;
}