Skip to content

Commit

Permalink
Add typing to return results
Browse files Browse the repository at this point in the history
  • Loading branch information
crucialfelix committed Nov 23, 2019
1 parent 1c0b687 commit 9fb8911
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/lang/src/SynthDefCompiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default class SynthDefCompiler {
this.store = new Map();
}

async boot() {
async boot(): Promise<SCLang> {
if (!this.lang) {
this.lang = await boot();
}
Expand Down Expand Up @@ -90,15 +90,15 @@ export default class SynthDefCompiler {
return this.store.get(defName);
}

allSendCommands() {
allSendCommands(): msg.CallAndResponse[] {
const commands: msg.CallAndResponse[] = [];
this.store.forEach((value, defName) => {
commands.push(this.sendCommand(defName));
});
return commands;
}

sendCommand(defName: string) {
sendCommand(defName: string): msg.CallAndResponse {
const data = this.get(defName);
if (!data) {
throw new Error(`SynthDef not in store: ${defName}`);
Expand Down

0 comments on commit 9fb8911

Please sign in to comment.