That's TS, not JS.
1. Type definition 2. Chain definition 3. Enqueue definition
Transpilation does not change the fact that the input is these 3 lines of code in 2 different languages.
I wonder why are you downvoted for being as factual and neutral as it is technically possible.