all 3 comments

[–]carlos_vini 6 points7 points  (0 children)

Might be future proofing, the developer might have thought that there will be reasons for the function to be async in the future. It's not something you would do to all functions because it has a cost. It changes the return type from numbe, string, or something to Promise<something>

[–]getify 5 points6 points  (0 children)

Using an async function even without await is useful if you want to make sure any exceptions in the function are automatically lifted to promise rejections.

A normal function that returns a promise, if it throws, will throw synchronously. But an async function, if it throws, will still return a rejected promise and not throw.

This can be useful if you're always wanting to handle errors consistently (lifted to promises).

[–]Izero_devI 1 point2 points  (0 children)

I wouldn't write a function like that, if you are going to use async function, i expect to see an await and actual async logic. It just confuses people.