This interview starts off with the interviewer saying it's going to be in JavaScript, and then introducing a piece of code that's clearly not JavaScript:
Eh, the implementation is all Javascript and can be approached in any language. They're just providing function signatures with types so the candidate knows what they're working with.
Also the signatures are Typescript, which really isn't that far off in the context of an interview. Even in a pure JS codebase it's not uncommon for IDEs to pull the TS definitions of packages to provide basic type checking. But even pure JS libraries will normally provide typed signatures in their documentation.
If anything I'd say this shows that the interviewer is prepared, by ensuring the candidate has what they need to complete the question.