From dce6df51b336d15efcbd1bfa7e1721e724c058b1 Mon Sep 17 00:00:00 2001 From: Diana Belokon <67607236+dbelokon@users.noreply.github.com> Date: Tue, 18 Jan 2022 12:16:55 -0500 Subject: [PATCH] Improve function doc comment for type hinting --- src/api/posts/src/data/post.js | 5 +---- src/backend/data/post.js | 4 +--- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/api/posts/src/data/post.js b/src/api/posts/src/data/post.js index f2e125c753..df2c43df81 100644 --- a/src/api/posts/src/data/post.js +++ b/src/api/posts/src/data/post.js @@ -36,11 +36,8 @@ function ensureFeed(feed) { } /** - * Determine the type of the post depending on the given URL. - * The possible types are 'video' or 'blogpost'. - * * @param {string} url - * @returns {string} the post's type + * @returns {"video" | "blogpost"} the post's type */ function determinePostType(url) { try { diff --git a/src/backend/data/post.js b/src/backend/data/post.js index ec4948d474..3ae82f8dcf 100644 --- a/src/backend/data/post.js +++ b/src/backend/data/post.js @@ -40,10 +40,8 @@ function ensureFeed(feed) { } /** - * The possible types are 'video' or 'blogpost'. - * * @param {string} url - * @returns {string} the post's type + * @returns {"video" | "blogpost"} the post's type */ function determinePostType(url) { try {