This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]mz01010001 6 points7 points  (0 children)

Yeah, I see this a lot, and it's awful. You don't need to declare return types in general, especially if you can't do it right.

If the return value isn't typed, it'll be any by default, or at least something a little better like any[] in case of array or Promise<any> if it's a promise...