Skip to content

Commit 4d72b43

Browse files
committed
Update proptypes.
1 parent a5134de commit 4d72b43

File tree

9 files changed

+45
-4
lines changed

9 files changed

+45
-4
lines changed

src/data/Reducers.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@ function initOscillator (URL, name, id, color) {
130130
id,
131131
fileA: URL[id + 'fa'] || 'dbass',
132132
fileB: URL[id + 'fb'] || 'cheeze',
133-
channelDataA: [],
134-
channelDataB: [],
133+
channelDataA: new Float32Array(),
134+
channelDataB: new Float32Array(),
135135
computedChannelData: [],
136136
algorithm: URL[id + 'al'] || 'p',
137137
cycles: urlVal(URL[id + 'c'], 1),

src/views/Components/HorizontalSlider.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,12 @@ class HorizontalSlider extends React.Component {
6565
}
6666
}
6767

68+
HorizontalSlider.propTypes = {
69+
min: React.PropTypes.number,
70+
max: React.PropTypes.number,
71+
value: React.PropTypes.number,
72+
onChange: React.PropTypes.func,
73+
label: React.PropTypes.string
74+
}
75+
6876
export default connect()(HorizontalSlider)

src/views/Components/VerticalSlider.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,12 @@ class VerticalSlider extends React.Component {
6969
}
7070
}
7171

72+
VerticalSlider.propTypes = {
73+
min: React.PropTypes.number,
74+
max: React.PropTypes.number,
75+
value: React.PropTypes.number,
76+
onChange: React.PropTypes.func,
77+
label: React.PropTypes.string
78+
}
79+
7280
export default connect()(VerticalSlider)

src/views/Keyboard/Keyboard.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,4 +203,9 @@ class Keyboard extends React.Component {
203203

204204
}
205205

206+
Keyboard.propTypes = {
207+
eventEmitter: React.PropTypes.object,
208+
Keyboard: React.PropTypes.object
209+
}
210+
206211
export default connect()(Keyboard)

src/views/Midi/MidiInput.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,4 +124,8 @@ class MidiInput extends React.Component {
124124
}
125125
}
126126

127+
MidiInput.propTypes = {
128+
eventEmitter: React.PropTypes.object
129+
}
130+
127131
export default connect()(MidiInput)

src/views/Modals/AboutModal.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,8 @@ export default class AboutModal extends React.Component {
2424
)
2525
}
2626
}
27+
28+
AboutModal.propTypes = {
29+
isOpen: React.PropTypes.bool,
30+
onClose: React.PropTypes.func
31+
}

src/views/Modals/SavePatchModal.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,8 @@ export default class SavePatchModal extends React.Component {
2626
)
2727
}
2828
}
29+
30+
SavePatchModal.propTypes = {
31+
isOpen: React.PropTypes.bool,
32+
onClose: React.PropTypes.func
33+
}

src/views/Oscillator/AlgorithmSwitch.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,10 @@ class AlgorithmSwitch extends React.Component {
6060
}
6161
}
6262

63+
AlgorithmSwitch.propTypes = {
64+
algorithm: React.PropTypes.string,
65+
id: React.PropTypes.string,
66+
color: React.PropTypes.string
67+
}
68+
6369
export default connect()(AlgorithmSwitch)

src/views/Oscillator/OscillatorView.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,8 @@ OscillatorView.propTypes = {
149149
detune: React.PropTypes.number,
150150
octave: React.PropTypes.number,
151151
amount: React.PropTypes.number,
152-
// channelDataA: React.PropTypes.array, ?
153-
// channelDataB: React.PropTypes.array,
152+
channelDataA: React.PropTypes.object, // Float32Array
153+
channelDataB: React.PropTypes.object, // Float32Array
154154
files: React.PropTypes.object,
155155
fileA: React.PropTypes.string,
156156
fileB: React.PropTypes.string

0 commit comments

Comments
 (0)