4 ms·
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: dec
by pavlov 1y ago
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:
declare function send<P>(
payload: P,
callback: () => void
): void;
Doesn't inspire confidence in the interviewer's level of preparation.
- ipnon 1y agoAs long as the candidate feels confused and the interviewer feels brilliant then all is well in the world.
- diesal11 1y agoEh, 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.
- saagarjha 1y ago> or any other language (even just pseudo-code)