While you are at adding JSDoc comments, could you please add docs for this function too? It helps WebStorm to offer better suggestions & code completions.