# Using Branded Types to Distinguish Milliseconds and Seconds in Cypress Tests

DevFeed: [Using Branded Types to Distinguish Milliseconds and Seconds in Cypress Tests](<https://devfeed.tech/articles/branded-types-28876.md>)

Original publisher: [Read original article](<https://glebbahmutov.com/blog/branded-types/>)

Author: Gleb Bahmutov

Published: 2025-12-05T05:00:00Z

Content type: tutorial

Language: en

Sources: [Gleb Bahmutov](<https://devfeed.tech/sources/gleb-bahmutov.md>)

Topics: [Cypress](<https://devfeed.tech/topics/cypress.md>), [TypeScript](<https://devfeed.tech/topics/typescript.md>), [Testing](<https://devfeed.tech/topics/testing.md>)

Tags: [cypress](<https://devfeed.tech/tags/cypress.md>), [process](<https://devfeed.tech/tags/process.md>), [testing](<https://devfeed.tech/tags/testing.md>), [tests](<https://devfeed.tech/tags/tests.md>), [time](<https://devfeed.tech/tags/time.md>), [typescript](<https://devfeed.tech/tags/typescript.md>)

## AI overview

This tutorial explains how to use TypeScript branded types to distinguish milliseconds from seconds in Cypress end-to-end tests. It also demonstrates branded type predicates and assertions to reduce unit-mixing errors.

## Source excerpt

Let's say you need to specify a timeout or wait in your end-to-end Cypress tests. You would use milliseconds