Skip to content

Commit

Permalink
Fix type error
Browse files Browse the repository at this point in the history
  • Loading branch information
fand committed May 20, 2020
1 parent 23c2e03 commit b98d484
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 17 deletions.
11 changes: 11 additions & 0 deletions lib/app.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/app.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/osc-loader.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions lib/wrapper.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/wrapper.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -385,15 +385,15 @@ export default class App {
this.recorder.setRecordingMode(mode);
}

insertTime(): void {
this.player.query('TIME').then(
(time: number) => {
public insertTime(): void {
this.player.query({ type: 'TIME' }).then(
(time: number): void => {
const editor = atom.workspace.getActiveTextEditor();
if (editor) {
editor.insertText(time.toString());
}
},
(err: string) => {
(err: string): void => {
console.error(err);
atom.notifications.addError('[VEDA] Failed to get time.');
},
Expand Down
10 changes: 0 additions & 10 deletions src/player.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,16 +165,6 @@ export default class Player implements Playable {
}
}

query(type: QueryType): Promise<any> {
switch (type) {
case 'TIME':
return Promise.resolve(this.veda.getTime());
default:
console.error('>> Unsupported query', type);
return Promise.reject('Unsupported query');
}
}

private play(): void {
this.view.show();
this.veda.play();
Expand Down

0 comments on commit b98d484

Please sign in to comment.