MCPcopy Create free account
hub / github.com/deepnote/vscode-deepnote / shift

Method shift

src/platform/common/utils/map.ts:330–342  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

328 }
329
330 shift(): V | undefined {
331 if (!this._head && !this._tail) {
332 return undefined;
333 }
334 if (!this._head || !this._tail) {
335 throw new Error('Invalid list');
336 }
337 const item = this._head;
338 this._map.delete(item.key);
339 this.removeItem(item);
340 this._size--;
341 return item.value;
342 }
343
344 // eslint-disable-next-line @typescript-eslint/no-explicit-any
345 forEach(callbackfn: (value: V, key: K, map: LinkedMap<K, V>) => void, thisArg?: any): void {

Callers 15

getCommentForUnionsFunction · 0.80
sendPendingMessagesMethod · 0.80
disposeMethod · 0.80
handlePendingRequestsMethod · 0.80
getWidgetScriptSourceMethod · 0.80
disposeMethod · 0.80
sendPendingMessagesMethod · 0.80
registerCommTargetsMethod · 0.80
disposeMethod · 0.80
disposeMethod · 0.80

Calls 2

removeItemMethod · 0.95
deleteMethod · 0.65

Tested by

no test coverage detected