MCPcopy Create free account
hub / github.com/Exafunction/codeium-chrome / setStorageItem

Function setStorageItem

src/storage.ts:85–98  ·  view source on GitHub ↗
(
  key: Key,
  value: Storage[Key]
)

Source from the content-addressed store, hash-verified

83}
84
85export function setStorageItem<Key extends keyof Storage>(
86 key: Key,
87 value: Storage[Key]
88): Promise<void> {
89 return new Promise((resolve, reject) => {
90 chrome.storage.sync.set({ [key]: value }, () => {
91 if (chrome.runtime.lastError) {
92 return reject(chrome.runtime.lastError);
93 }
94
95 return resolve();
96 });
97 });
98}
99
100export async function initializeStorageWithDefaults(defaults: Storage) {
101 const currentStorageData = await getStorageData();

Callers 6

clearLastErrorFunction · 0.90
unhealthyFunction · 0.90
loginFunction · 0.90
popup.tsFile · 0.90
EditableListFunction · 0.90
OptionsFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected