Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(web)!: throw unimplemented error #9

Merged
merged 11 commits into from
Apr 9, 2021
6 changes: 2 additions & 4 deletions src/web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@ import type { KeepAwakePlugin } from './definitions';

export class KeepAwakeWeb extends WebPlugin implements KeepAwakePlugin {
async keepAwake(): Promise<void> {
console.log('KeepAwake does not support web');
return Promise.resolve();
throw this.unimplemented('Not implemented on web.');
}

async allowSleep(): Promise<void> {
console.log('KeepAwake does not support web');
return Promise.resolve();
throw this.unimplemented('Not implemented on web.');
}
}