# How To Type Function Mocha Context With Cypress Aliases

DevFeed: [How To Type Function Mocha Context With Cypress Aliases](<https://devfeed.tech/articles/how-to-type-function-mocha-context-with-cypress-aliases-28901.md>)

Original publisher: [Read original article](<https://glebbahmutov.com/blog/type-test-context/>)

Author: Gleb Bahmutov

Published: 2025-12-11T05: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>), [Mocha](<https://devfeed.tech/topics/mocha.md>), [interfaces](<https://devfeed.tech/topics/interfaces.md>), [test](<https://devfeed.tech/topics/test.md>)

Tags: [argument](<https://devfeed.tech/tags/argument.md>), [callback](<https://devfeed.tech/tags/callback.md>), [code](<https://devfeed.tech/tags/code.md>), [cypress](<https://devfeed.tech/tags/cypress.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [interface](<https://devfeed.tech/tags/interface.md>), [interfaces](<https://devfeed.tech/tags/interfaces.md>), [linter](<https://devfeed.tech/tags/linter.md>), [products](<https://devfeed.tech/tags/products.md>), [test](<https://devfeed.tech/tags/test.md>), [typescript](<https://devfeed.tech/tags/typescript.md>)

## AI overview

This tutorial explains how to add strong typing for the custom property Cypress aliases place on the Mocha test context. It shows how to extend the relevant callback context type when the bundled type is not directly exposed.

## Source excerpt

In Cypress you can save values under aliases which is pretty handy. You can get the aliased value