MCPcopy Index your code
hub / github.com/microsoft/vscode-languageserver-node / shift

Method shift

jsonrpc/src/linkedMap.ts:101–113  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

99 }
100
101 public shift(): V | undefined {
102 if (!this._head && !this._tail) {
103 return undefined;
104 }
105 if (!this._head || !this._tail) {
106 throw new Error('Invalid list');
107 }
108 const item = this._head;
109 this._map.delete(item.key);
110 this.removeItem(item);
111 this._size--;
112 return item.value;
113 }
114
115 public forEach(callbackfn: (value: V, key: K, map: LinkedMap<K, V>) => void, thisArg?: any): void {
116 let current = this._head;

Callers 5

closedMethod · 0.80
uriToFilePathFunction · 0.80
doWriteMessageMethod · 0.80
doWriteMessageMethod · 0.80
processMessageQueueFunction · 0.80

Calls 2

removeItemMethod · 0.95
deleteMethod · 0.65

Tested by

no test coverage detected