<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/a-typescript-type-guard-is-a-promise-not-proof-krjl6wszs" -->

---
title: A TypeScript Type Guard Is a Promise, Not Proof | daily.dev
description: Hand-written TypeScript type predicates (functions using 'value is Type') can silently drift out of sync with the types they claim to validate. Because...
canonical: https://daily.dev/posts/a-typescript-type-guard-is-a-promise-not-proof-krjl6wszs
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: A TypeScript Type Guard Is a Promise, Not Proof | daily.dev
og:description: Hand-written TypeScript type predicates (functions using 'value is Type') can silently drift out of sync with the types they claim to validate. Because...
og:url: https://daily.dev/posts/a-typescript-type-guard-is-a-promise-not-proof-krjl6wszs
og:image: https://api.daily.dev/og/posts/krjl6WSzS.png
og:image:alt: A TypeScript Type Guard Is a Promise, Not Proof
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.

# A TypeScript Type Guard Is a Promise, Not Proof

**[nyaomaru](https://daily.dev/sources/graxwfjk0eop4zs3tdzdr)** · [@nyaomaru](https://daily.dev/nyaomaru) · 1 min read · 1 upvotes · 0 comments

## Summary

Hand-written TypeScript type predicates (functions using 'value is Type') can silently drift out of sync with the types they claim to validate. Because TypeScript only checks that the function returns a boolean and matches the declared signature, it does not verify that the runtime logic actually checks every field of the type. As a type evolves and gains new fields, a type guard can forget to check them while still compiling cleanly, creating a false sense of runtime safety.

## Content

```
type User = {
  id: string;
  name: string;
  role: 'admin' | 'member';
};

const isUser = (value: unknown): value is User => {
  // checks id and name...
  // but forgot role
};
```

A hand-written type predicate can still compile even when its runtime implementation no longer checks every field in the type.

That small gap becomes interesting once the type starts evolving.

## Similar posts on daily.dev

- [Introducing Type Guard to Steep](https://daily.dev/posts/introducing-type-guard-to-steep-9wjlwxc2z) · Ruby Flow · 0 upvotes · 0 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/a-typescript-type-guard-is-a-promise-not-proof-krjl6wszs)

```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/a-typescript-type-guard-is-a-promise-not-proof-krjl6wszs","headline":"A TypeScript Type Guard Is a Promise, Not Proof","text":"Hand-written TypeScript type predicates (functions using 'value is Type') can silently drift out of sync with the types they claim to validate. Because TypeScript only checks that the function returns a boolean and matches the declared signature, it does not verify that the runtime logic actually checks every field of the type. As a type evolves and gains new fields, a type guard can forget to check them while still compiling cleanly, creating a false sense of runtime safety.","url":"https://daily.dev/posts/a-typescript-type-guard-is-a-promise-not-proof-krjl6wszs","datePublished":"2026-09-18T15:28:59.380Z","dateModified":"2026-09-18T15:29:31.453Z","author":{"@type":"Person","name":"nyaomaru","url":"https://daily.dev/nyaomaru","image":"https://avatars.githubusercontent.com/u/90489696?v=4","interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"EndorseAction"},"userInteractionCount":430}},"interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"isPartOf":{"@type":"WebPage","url":"https://daily.dev/sources/graxwfjk0eop4zs3tdzdr","name":"nyaomaru"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"nyaomaru","item":"https://daily.dev/sources/graxwfjk0eop4zs3tdzdr"},{"@type":"ListItem","position":3,"name":"A TypeScript Type Guard Is a Promise, Not Proof"}]}
```

