Skip to content

fix(*): Fix compilation problems in my local environment #98

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

Merged
merged 5 commits into from
Jul 24, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/messaging/controllers/window-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ export default class WindowController extends ControllerInterface {
const serviceWorker = registration.installing || registration.waiting ||
registration.active;

return new Promise((resolve, reject) => {
return new Promise<ServiceWorkerRegistration>((resolve, reject) => {
if (!serviceWorker) {
// This is a rare scenario but has occured in firefox
reject(this.errorFactory_.create(Errors.codes.NO_SW_IN_REG));
Expand Down
2 changes: 1 addition & 1 deletion src/messaging/models/db-interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default class DBInterface {
private dbVersion_: number;
private openDbPromise_: Promise<IDBDatabase>;
protected errorFactory_: ErrorFactory<string>;
protected TRANSACTION_READ_WRITE: string;
protected TRANSACTION_READ_WRITE: IDBTransactionMode;

/**
* @param {string} dbName
Expand Down
4 changes: 2 additions & 2 deletions src/storage/task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -493,13 +493,13 @@ export class UploadTask {
/**
* This object behaves like a Promise, and resolves with its snapshot data
* when the upload completes.
* The fulfillment callback. Promise chaining works as normal.
* @param onFulfilled The fulfillment callback. Promise chaining works as normal.
* @param onRejected The rejection callback.
*/
then<U>(onFulfilled?: ((value: UploadTaskSnapshot) => U | PromiseLike<U>) | null, onRejected?: ((error: any) => U | PromiseLike<U>) | null): Promise<U> {
return this.promise_.then<U>(
(onFulfilled as (value: UploadTaskSnapshot) => U | PromiseLike<U>),
(onRejected as ((error: any) => PromiseLike<U>) | null));
(onRejected as ((error: any) => PromiseLike<never>) | null));
}

/**
Expand Down