<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/day-3-60---stop-using-the-any-type-cop-out-dgfnj3arn" -->

---
title: (Day 3/60)- Stop Using The 'Any' Type Cop-Out | daily.dev
description: A short opinion piece arguing against using TypeScript's `any` type as a shortcut to silence compiler errors. It frames `any` as technical debt and recommends...
canonical: https://daily.dev/posts/day-3-60---stop-using-the-any-type-cop-out-dgfnj3arn
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: (Day 3/60)- Stop Using The 'Any' Type Cop-Out | daily.dev
og:description: A short opinion piece arguing against using TypeScript's `any` type as a shortcut to silence compiler errors. It frames `any` as technical debt and recommends...
og:url: https://daily.dev/posts/day-3-60---stop-using-the-any-type-cop-out-dgfnj3arn
og:image: https://api.daily.dev/og/posts/dgFNj3aRn.png
og:image:alt: (Day 3/60)- Stop Using The 'Any' Type Cop-Out
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.

# (Day 3/60)- Stop Using The 'Any' Type Cop-Out

**[Taiwo Francis Oguntade](https://daily.dev/sources/fstpm3zejud3qgleeoous)** · [@taiwofrancis](https://daily.dev/taiwofrancis) · 1 min read · 2 upvotes · 0 comments

## Summary

A short opinion piece arguing against using TypeScript's `any` type as a shortcut to silence compiler errors. It frames `any` as technical debt and recommends using `unknown` combined with type guards instead, since `unknown` forces explicit validation before data is accessed.

## Content

The moment you type `: any` to bypass a compiler error, you are not solving a problem. You are just signing a technical debt contract that your future self will have to pay with interest.

Using `any` is an admission that you either do not understand the shape of your data, or you are too lazy to map it out. It turns off the type checker entirely, leaving a silent landmine waiting for a production user to step on it.

If a data shape is truly dynamic or unknown, use `unknown`. It forces you to explicitly validate the data shape before you touch it, keeping your system completely bulletproof.

**Welcome to Day 3 of 60 Days of TypeScript.**

- **The Rule:** Treat `any` like a compilation failure.
- **The Fix:** Use `unknown` and a type guard when handling unpredictable data payloads.

![ (Day 3:60)- Stop Using The 'Any' Type Cop-Out.png](https://media.daily.dev/image/upload/s--TCm6Nplz--/f_auto/v1785671794/ugc/content_756debee-a0ff-46d6-956a-2022194b30ce?_a=BAMAMicg0)

**Be honest:** How many instances of `: any` are currently hiding in your main branch right now?

## Similar posts on daily.dev

- [Understanding any in TypeScript](https://daily.dev/posts/understanding-any-in-typescript-jtv3tgivb) · Medium · 3 upvotes · 1 comments
- [How to Defend Your JavaScript App Against Unsafe Data with TypeScript Guard Utilities](https://daily.dev/posts/how-to-defend-your-javascript-app-against-unsafe-data-with-typescript-guard-utilities-cuooqjnij) · freeCodeCamp · 5 upvotes · 1 comments

---

Tags: [#general-programming](https://daily.dev/tags/general-programming), [#typescript](https://daily.dev/tags/typescript)

[View this post on daily.dev](https://daily.dev/posts/day-3-60---stop-using-the-any-type-cop-out-dgfnj3arn)

```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/day-3-60---stop-using-the-any-type-cop-out-dgfnj3arn","headline":"(Day 3/60)- Stop Using The 'Any' Type Cop-Out","text":"A short opinion piece arguing against using TypeScript's `any` type as a shortcut to silence compiler errors. It frames `any` as technical debt and recommends using `unknown` combined with type guards instead, since `unknown` forces explicit validation before data is accessed.","url":"https://daily.dev/posts/day-3-60---stop-using-the-any-type-cop-out-dgfnj3arn","datePublished":"2026-08-02T11:56:51.069Z","dateModified":"2026-09-13T20:58:59.747Z","author":{"@type":"Person","name":"Taiwo Francis Oguntade","url":"https://daily.dev/taiwofrancis","image":"https://media.daily.dev/image/upload/s--px3_Pvo4--/f_auto/v1785515368/avatars/avatar_FStpm3ZejUD3qGlEeoOUS?_a=BAMAMicg0","description":"I will Be Your Professional Full Stack Software Developer","worksFor":{"@type":"Organization","name":"Opa Exquisite Concept Limited","logo":"https://www.google.com/s2/favicons?domain=opaexquisiteconceptlimited.com&sz=128"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"EndorseAction"},"userInteractionCount":2210}},"image":"https://media.daily.dev/image/upload/s--L6Q8ruBx--/f_auto/v1785671818/posts/dgFNj3aRn?_a=BAMAMicg0","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":2},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"isPartOf":{"@type":"WebPage","url":"https://daily.dev/sources/fstpm3zejud3qgleeoous","name":"Taiwo Francis Oguntade"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Taiwo Francis Oguntade","item":"https://daily.dev/sources/fstpm3zejud3qgleeoous"},{"@type":"ListItem","position":3,"name":"(Day 3/60)- Stop Using The 'Any' Type Cop-Out"}]}
```

