Add this script to your fish config.
It sets up a listener. Every time the working directory changes, it checks what binaries are installed and accessible via yarn 2, and makes those accessible on the PATH.
In other words, if you've got a yarn 2 workspace you can run
yarn add -D typescript tsc --init
yarn add -D typescript yarn tsc --init
These binaries are available in your shell but also in other processes, making it possible to e.g. run
git ls-files | xargs prettier --write