# String Types For E2E Tests

DevFeed: [String Types For E2E Tests](<https://devfeed.tech/articles/string-types-for-e2e-tests-28895.md>)

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

Author: Gleb Bahmutov

Published: 2026-03-21T04:00:00Z

Content type: tutorial

Language: en

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

Topics: [TypeScript](<https://devfeed.tech/topics/typescript.md>), [Code](<https://devfeed.tech/topics/code.md>), [test](<https://devfeed.tech/topics/test.md>), [Exception](<https://devfeed.tech/topics/exception.md>), [Visual Studio Code](<https://devfeed.tech/topics/visual-studio-code.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [cypress](<https://devfeed.tech/tags/cypress.md>), [e2e](<https://devfeed.tech/tags/e2e.md>), [exception](<https://devfeed.tech/tags/exception.md>), [process](<https://devfeed.tech/tags/process.md>), [testing](<https://devfeed.tech/tags/testing.md>), [types](<https://devfeed.tech/tags/types.md>), [typescript](<https://devfeed.tech/tags/typescript.md>)

## AI overview

This tutorial explains how TypeScript string template literal types can distinguish formatted identifiers in end-to-end tests. It also shows their limitations for validating phone numbers and demonstrates more precise digit-based string types.

## Source excerpt

Every individual item sold on Mercari.com has an id that looks like m<number>.