How to create a Bidirectional Map in JavaScript

Bidirectional maps allow you to query by key and get its value or by value and get its key. Learn how to implement them in JS and make them type safe with TypeScript.