<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/stop-using-any-here-s-the-alternative-that-changes-absolutely-nothing--76b3f5xjl" -->

---
title: Stop using &quot;any&quot;. Here&#x27;s the alternative that changes...
description: An opinion piece argues against blindly following 
canonical: https://daily.dev/posts/stop-using-any-here-s-the-alternative-that-changes-absolutely-nothing--76b3f5xjl
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Stop using &quot;any&quot;. Here&#x27;s the alternative that changes absolutely nothing. | daily.dev
og:description: An opinion piece argues against blindly following 
og:url: https://daily.dev/posts/stop-using-any-here-s-the-alternative-that-changes-absolutely-nothing--76b3f5xjl
og:image: https://api.daily.dev/og/posts/76b3f5xJL.png
og:image:alt: Stop using &quot;any&quot;. Here&#x27;s the alternative that changes absolutely nothing.
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Stop using "any". Here's the alternative that changes absolutely nothing.

**[Sandhya K](https://daily.dev/sources/f8a71aothmgqz4gvfzpti)** · [@sandhyak](https://daily.dev/sandhyak) · 2 min read · 148 upvotes · 29 comments

## Summary

An opinion piece argues against blindly following

## Content

You've seen it in every PR review: someone spots `any` in your TypeScript and drops a comment like you just committed a war crime.

So you do the responsible thing — you replace it with `unknown`.

Congratulations. Your code is now _potentially_ safer, but you've also added type-narrowing boilerplate before you can actually use the value.

Then comes the next "senior" move:

![image.png](https://media.daily.dev/image/upload/s--EQZUoKsU--/f_auto/v1790837566/ugc/content_b39d164c-4308-4390-b8d9-686836a6a231?_a=BAMAMicg0)

Congrats. You've added generics and ceremony to a function that still doesn't tell us anything about what `data` is supposed to be.

And that's the real problem with a lot of "stop using X" advice.

**The real stop-using-X post nobody will write:**

Stop using blanket rules as a substitute for understanding tradeoffs.

`any` can be perfectly reasonable when you're:

- Prototyping
- Migrating legacy JavaScript
- Integrating with genuinely dynamic third-party data
- Temporarily working around a type gap you'll address later

`unknown` is useful when you want the compiler to force you to prove what the value is before using it.

Generics are useful when you actually need to preserve relationships between types.

None of these keywords makes you a better engineer by itself.

**The real problem isn't using** `any`**.**

**It's shipping code you don't understand — with or without types.**

## Community discussion

Top comments from developers on daily.dev.

**@diseasium** · 25 upvotes

> W vibe posting

**@anderspersson** · 22 upvotes

> Using `any` while prototyping, or as a temporary shortcut, is risky because it often creates problems later. In practice, there is rarely enough time to go back and replace those `any` types properly.
>
> It is much better to do things correctly from the start. Although it may slow development down initially, it saves time and avoids issues in the long run.
>
> When I worked with TypeScript, the use of `any` was forbidden in code that was checked in. Everything had to have a proper type.

**@luukoosterhuis** · 12 upvotes

> > Temporarily working around a type gap you’ll address later
>
> Nothing as permanent as a temporary solution

**@musikk** · 8 upvotes

> "Considered harmful" considered harmful.

**@digeomel** · 7 upvotes

> Yeah, try this in a large app with other developers, see how that works for you when you're trying to figure out what that `any` (or worse, missing type entirely!) variable that your colleague added is supposed to be.

## Similar posts on daily.dev

- [Stop drifting around in the dark when using "any" and "unknown" TypeScript types](https://daily.dev/posts/stop-drifting-around-in-the-dark-when-using-any-and-unknown-typescript-types-89bkfo9pv) · This is Learning · 0 upvotes · 0 comments
- [50 TypeScript F\*ck Ups \(I’ve Made So You Don’t Have To\)](https://daily.dev/posts/50-typescript-f-ck-ups-i-ve-made-so-you-don-t-have-to--dd5asxaon) · Medium · 113 upvotes · 8 comments
- [20 Mistakes That Quietly Destroy JavaScript/TypeScript Codebases \(Part 1\)](https://daily.dev/posts/20-mistakes-that-quietly-destroy-javascript-typescript-codebases-part-1--n6okeimrf) · The T-Shaped Dev · 6 upvotes · 0 comments

---

Tags: [#typescript](https://daily.dev/tags/typescript)

[View this post on daily.dev](https://daily.dev/posts/stop-using-any-here-s-the-alternative-that-changes-absolutely-nothing--76b3f5xjl)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"DiscussionForumPosting","mainEntityOfPage":"https://daily.dev/posts/stop-using-any-here-s-the-alternative-that-changes-absolutely-nothing--76b3f5xjl","headline":"Stop using \"any\". Here's the alternative that changes absolutely nothing.","text":"An opinion piece argues against blindly following ","url":"https://daily.dev/posts/stop-using-any-here-s-the-alternative-that-changes-absolutely-nothing--76b3f5xjl","datePublished":"2026-10-01T06:48:41.094Z","dateModified":"2026-10-01T06:53:12.204Z","author":{"@type":"Person","name":"Sandhya K","url":"https://daily.dev/sandhyak","image":"https://media.daily.dev/image/upload/s--SE6L2St6--/f_auto/v1788238316/avatars/avatar_F8a71aOthmGqz4gVFZpTi?_a=BAMAMicg0","description":"Full-stack AI Engineer","interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"EndorseAction"},"userInteractionCount":2180}},"interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":147},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":29}],"comment":[{"@type":"Comment","text":"W vibe posting","datePublished":"2026-10-01T07:27:07.865Z","url":"https://daily.dev/posts/76b3f5xJL#c-Krr4xJI1U","author":{"@type":"Person","name":"Ian W","url":"https://daily.dev/diseasium","image":"https://media.daily.dev/image/upload/s--O0TOmw4y--/f_auto/v1715772965/public/noProfile"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":25}},{"@type":"Comment","text":"Using any while prototyping, or as a temporary shortcut, is risky because it often creates problems later. In practice, there is rarely enough time to go back and replace those any types properly.\nIt is much better to do things correctly from the start. Although it may slow development down initially, it saves time and avoids issues in the long run.\nWhen I worked with TypeScript, the use of any was forbidden in code that was checked in. Everything had to have a proper type.","datePublished":"2026-10-01T09:31:40.552Z","url":"https://daily.dev/posts/76b3f5xJL#c-HkJgoyJdz","author":{"@type":"Person","name":"Anders Persson","url":"https://daily.dev/anderspersson","image":"https://avatars.githubusercontent.com/u/1372776?v=4"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":22}},{"@type":"Comment","text":"Temporarily working around a type gap you’ll address later\n\nNothing as permanent as a temporary solution","datePublished":"2026-10-01T09:43:32.532Z","url":"https://daily.dev/posts/76b3f5xJL#c-dT5Q3rKLh","author":{"@type":"Person","name":"Luuk Oosterhuis","url":"https://daily.dev/luukoosterhuis","image":"https://avatars.githubusercontent.com/u/304927767?v=4"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":12}},{"@type":"Comment","text":"“Considered harmful” considered harmful.","datePublished":"2026-10-01T09:22:54.417Z","url":"https://daily.dev/posts/76b3f5xJL#c-nItW9KN2M","author":{"@type":"Person","name":"Werner Hahn","url":"https://daily.dev/musikk","image":"https://lh3.googleusercontent.com/a/ACg8ocJr9LIXrt1E5zAmLx3QtOkq4iGvcwdh-t__bh6z4dhVoZyOEgE=s96-c"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":8}},{"@type":"Comment","text":"Yeah, try this in a large app with other developers, see how that works for you when you’re trying to figure out what that any (or worse, missing type entirely!) variable that your colleague added is supposed to be.","datePublished":"2026-10-01T10:29:39.284Z","url":"https://daily.dev/posts/76b3f5xJL#c-Kc55GUrz8","author":{"@type":"Person","name":"Dimitris","url":"https://daily.dev/digeomel","image":"https://avatars3.githubusercontent.com/u/3295889?v=4"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":7}}],"isPartOf":{"@type":"WebPage","url":"https://daily.dev/sources/f8a71aothmgqz4gvfzpti","name":"Sandhya K"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Sandhya K","item":"https://daily.dev/sources/f8a71aothmgqz4gvfzpti"},{"@type":"ListItem","position":3,"name":"Stop using \"any\". Here's the alternative that changes absolutely nothing."}]}
```

