---
title: "Furkan Emin Can (@femincan) | Hashnode"
description: "A front-end developer who loves reading, writing, and calisthenics. Read the latest articles by Furkan Emin Can on Hashnode."
url: "https://hashnode.com/@femincan"
---

@femincan

# Furkan Emin Can

@femincan · Turkiye · Joined April 2023

A front-end developer who loves reading, writing, and calisthenics.

[Website](https://femincan.dev/)

## Comments

[Orpheus UI (Raef) I will definitely check it out. Thanks for very helpful information.](https://hashnode.com/posts/how-i-built-my-custom-blog-with-astro-and-headless-hashnode/654022f661a761980096cd71/comment/66a372780f388fcde5fafa2b#reply-66a3ac22add1ec313bd6dd2c)

Reply · Article · Jul 26, 2024 · [How I Built My Custom Blog With Astro and Headless Hashnode](https://hashnode.com/posts/how-i-built-my-custom-blog-with-astro-and-headless-hashnode/654022f661a761980096cd71)

[Hi Orpheus UI (Raef), thanks for your comment! I didn't build this blog with Headless Hashnode. I did some research after your comment and unfortunately can't find a way to implement the comments feature. Have a good day!](https://hashnode.com/posts/how-i-built-my-custom-blog-with-astro-and-headless-hashnode/654022f661a761980096cd71/comment/66a372780f388fcde5fafa2b#reply-66a39dcaaf21eb866a7ea7ae)

Reply · Article · Jul 26, 2024 · [How I Built My Custom Blog With Astro and Headless Hashnode](https://hashnode.com/posts/how-i-built-my-custom-blog-with-astro-and-headless-hashnode/654022f661a761980096cd71)

[I recommend you share the codes as snippets instead of images so we can easily copy-paste them. For more information about code snippets, you can refer to Hashnode Markdown Guide and Neptun Editor Guide.](https://hashnode.com/posts/handling-delete-request/65c9218cdec45b737d3dbf5c/comment/65cb4260d9cd78df566d8185)

Comment · Article · Feb 13, 2024 · [Day 23 of 100days of code.](https://hashnode.com/posts/handling-delete-request/65c9218cdec45b737d3dbf5c)

[For the first part of your question, the reason why I didn't use Array.includes is because of a problem with TypeScript. As far as I understand, TypeScript doesn't allow us to use a more generic typed search parameter for a more explicitly typed array in the Array.includes. So we can't use the type string with an array typed ("External Editor" | "External Administrator")\[\]. As a workaround we can set the parameter type as any, but I thought Array.some is more straightforward to work with (we don't need to disable type checking), and also I couldn't find any performance difference between the two. For the second part of the question, returning a boolean doesn't give us any type narrowing. If you use the function with an if statement, inside the statement, the type of data.collaborator.type is still string. On the contrary, returning type predicate gives us type narrowing. If we call this function with an if statement, inside the statement, the type of data.collaborator.type is narrowed to "External Editor" | "External Administrator". There is a visualization in the TS Playground that shows the result of narrowing the type. As I said, I think this approach is more suitable for the TypeScript side, for the JavaScript side there is nearly no difference.](https://hashnode.com/posts/the-right-way-to-create-utility-functions-in-typescript/659812adc22d321fff4af818/comment/65998e705a246ab4fe8981ea#reply-659a541a5a246ab4fe8ed97a)

Reply · Article · Jan 7, 2024 · [The right way to create utility functions in TypeScript](https://hashnode.com/posts/the-right-way-to-create-utility-functions-in-typescript/659812adc22d321fff4af818)

[Thanks for the great article Ákos Kőműves. I've played with your example and converted it to a type predicate function. The isCollaboratorExternal function accepts a collaborator parameter with type string and uses the Array.some function (because of this issue) to check if externalCollaboratorTypes has the collaboratorType and returns the type predicate. Thus, after the check operation the type of data.collaborator.type will be "External Editor" | "External Administrator". I think types are more aligned with the logic in this solution. Here is the link for TypeScript Playground: TS Playground](https://hashnode.com/posts/the-right-way-to-create-utility-functions-in-typescript/659812adc22d321fff4af818/comment/65998e705a246ab4fe8981ea)

Comment · Article · Jan 6, 2024 · [The right way to create utility functions in TypeScript](https://hashnode.com/posts/the-right-way-to-create-utility-functions-in-typescript/659812adc22d321fff4af818)

[Thanks for the comment Ákos Kőműves! I'm glad you got this feature. Regarding the comment section, It feels very overwhelming due to the API design. So I didn't prefer to integrate it.](https://hashnode.com/posts/how-i-built-my-custom-blog-with-astro-and-headless-hashnode/654022f661a761980096cd71/comment/657004e9d65dd4cd71f438a2#reply-657171b814e4ac7e3bdb5317)

Reply · Article · Dec 7, 2023 · [How I Built My Custom Blog With Astro and Headless Hashnode](https://hashnode.com/posts/how-i-built-my-custom-blog-with-astro-and-headless-hashnode/654022f661a761980096cd71)

[This is such an inspiring story. Thanks!](https://hashnode.com/posts/javascript-proxy-magic-how-i-built-a-2kb-state-manager/655400b978cfc27300ea946f/comment/6557230fc445bc5508611628)

Comment · Article · Nov 17, 2023 · [Javascript Proxy Magic: How I built a 2kB state manager with zero dependencies (and how it got me two different job offers)](https://hashnode.com/posts/javascript-proxy-magic-how-i-built-a-2kb-state-manager/655400b978cfc27300ea946f)

[Thanks for the article! It nicely shows what makes a developer a senior.](https://hashnode.com/posts/how-to-interview-a-senior-engineer/65166558305829c2876b11b4/comment/651970476b3bc7812906fff3)

Comment · Article · Oct 1, 2023 · [How to Interview a Senior Engineer](https://hashnode.com/posts/how-to-interview-a-senior-engineer/65166558305829c2876b11b4)

[Thanks Hoh Shen Yien. I had saw it when I researched the dotenv-expand package, but I didn't pay much attention. With this information, I'd like to try it in my future projects. (By the way, I like your custom design much.)](https://hashnode.com/posts/dotenv-vault-the-new-way-to-manage-env/646ce460f419f3d1c1b5aadc/comment/647ab4ab1c128bf71962a9da)

Comment · Article · Jun 3, 2023 · [Dotenv-vault: The New Way to Manage .env](https://hashnode.com/posts/dotenv-vault-the-new-way-to-manage-env/646ce460f419f3d1c1b5aadc)

[Thanks for the comment Ender. As I have mentioned in the article, If I didn't use the "Cancelling the button during the ongoing request" approach, I would use AbortController with Axios. But I didn't choose this approach for simplicity.](https://hashnode.com/posts/how-to-use-swr-for-better-data-fetching-approach/646af295403a24631e43497c/comment/64733a133f35dda0a9992c7c#reply-6473563d3f35dda0a9992fa4)

Reply · Article · May 28, 2023 · [How to Use SWR for Better Data Fetching Approach](https://hashnode.com/posts/how-to-use-swr-for-better-data-fetching-approach/646af295403a24631e43497c)
