Skip to content

Commit

Permalink
Improve function doc comment for type hinting
Browse files Browse the repository at this point in the history
  • Loading branch information
dbelokon committed Jan 18, 2022
1 parent d0bc474 commit dce6df5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
5 changes: 1 addition & 4 deletions src/api/posts/src/data/post.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 1 addition & 3 deletions src/backend/data/post.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit dce6df5

Please sign in to comment.