-
Notifications
You must be signed in to change notification settings - Fork 87
Open
Labels
Code healthIssues which if fixed would improve the health of the project (as opposed to new features/bugs)Issues which if fixed would improve the health of the project (as opposed to new features/bugs)
Description
Except for event listeners most APIs that used callbacks before now support Promise return values. We should migrate to those.
In some cases, we've even created wrappers to transform the callback based code into promise based code.
rikaikun/extension/configuration.ts
Lines 40 to 48 in 8fd4bf4
| // Simply wrapper which makes `sync.get` `Promise` based. | |
| async function getStorage(): Promise<MutableConfig> { | |
| const config = await new Promise<MutableConfig>((resolve) => { | |
| chrome.storage.sync.get(defaultConfig, (cloudStorage) => { | |
| resolve(cloudStorage as MutableConfig); | |
| }); | |
| }); | |
| return config; | |
| } |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Code healthIssues which if fixed would improve the health of the project (as opposed to new features/bugs)Issues which if fixed would improve the health of the project (as opposed to new features/bugs)