Skip to content

Commit

Permalink
fix enums
Browse files Browse the repository at this point in the history
  • Loading branch information
chee committed Feb 22, 2020
1 parent fb174b9 commit 830767d
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 41 deletions.
70 changes: 35 additions & 35 deletions bitwig.d.ts
@@ -1,6 +1,6 @@
/** Something that can be bound to an {@link AbsoluteHardwareControl} and can respond to the user input (such
as user moving a slider up or down) in a meaningful way. */
declare interface AbsoluteHardwarControlBindable {
declare interface AbsoluteHardwarControlBindable extends HardwareBindable {

/** Binds this target to the supplied hardware control so that when the user moves the hardware control this
target will respond in a meaningful way.
Expand All @@ -20,7 +20,7 @@ it. */

/** Represents a hardware control that can input and absolute value (for example, a slider, knob or foot
pedal). */
declare interface AbsoluteHardwareControl {
declare interface AbsoluteHardwareControl extends ContinuousHardwareControl<AbsoluteHardwarControlBinding> {

/** Sets the {@link AbsoluteHardwareValueMatcher} that can be used to detect when the user adjusts the
hardware control's value. */
Expand Down Expand Up @@ -4102,54 +4102,54 @@ declare interface Value {
}

declare enum CursorDeviceFollowMode {
0,
1,
2,
3,
4,
5,
FOLLOW_SELECTION,
FIRST_DEVICE,
FIRST_INSTRUMENT,
FIRST_AUDIO_EFFECT,
FIRST_INSTRUMENT_OR_DEVICE,
LAST_DEVICE,
}

declare enum CursorNavigationMode {
0,
1,
2,
NESTED,
FLAT,
GUI,
}

declare enum NoteExpression {
0,
1,
2,
3,
4,
5,
6,
7,
8,
NONE,
PITCH_DOWN,
PITCH_UP,
GAIN_DOWN,
GAIN_UP,
PAN_LEFT,
PAN_RIGHT,
TIMBRE_DOWN,
TIMBRE_UP,
}

declare enum State {
0,
1,
2,
Empty,
NoteOn,
NoteSustain,
}

declare enum RelativePosition {
0,
1,
2,
3,
4,
ABOVE,
BELOW,
LEFT,
RIGHT,
INSIDE,
}

declare enum UsbTransferStatus {
0,
1,
2,
3,
4,
5,
6,
Completed,
Error,
TimedOut,
Cancelled,
Stall,
NoDevice,
Overflow,
}

declare var host: ControllerHost
7 changes: 1 addition & 6 deletions jsdoc-template.d.ts/publish.js
Expand Up @@ -157,16 +157,11 @@ exports.publish = (data, opts, tutorials) => {
for (let name in enums) {
let values = enums[name]
process.stdout.write(`declare enum ${name} {\n`)
for (let value in values) {
for (let value of values) {
process.stdout.write(` ${value},\n`)
}
process.stdout.write(`}\n\n`)
}
// going to do these by hand
// for (let name in vars) {
// let varType = vars[name]
// process.stdout.write(`declare var ${name}: ${varType}\n`)
// }

process.stdout.write(`declare var host: ControllerHost\n`)
// console.log(interfaces)
Expand Down

0 comments on commit 830767d

Please sign in to comment.