Start a doubly linked list
Make a folder with a package.json that sets "type": "module", so Node treats your .ts files as ES modules.
list.ts holds two classes. A ListNode stores a key, a value and two pointers, prev and next. A LinkedList starts with two dummy nodes, head and tail, pointing at each other, and addFront slots a node in straight after head.
WHY
The cache needs to keep keys in order of use and move any one of them in constant time. A doubly linked list can unhook a node it already holds in O(1), because the node knows both neighbours. The dummy ends mean the first and last real nodes are never special cases: every real node always has a prev and a next.