# Consider adding an alternative to \`typeof\` that doesn’t include the legacy baggage of \`typeof\`

**URL:** <https://es.discourse.group/t/consider-adding-an-alternative-to-typeof-that-doesn-t-include-the-legacy-baggage-of-typeof/526>\
**Category:** 💡 Ideas\
**Tags:** proposal\
**Created:** [November 5, 2020, 1:03am UTC](https://es.discourse.group/t/consider-adding-an-alternative-to-typeof-that-doesn-t-include-the-legacy-baggage-of-typeof/526 "2020-11-05T01:03:30Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![jithujoshyjy](https://yyz2.discourse-cdn.com/free1/user_avatar/es.discourse.group/jithujoshyjy/32/399_2.png) [@jithujoshyjy](https://es.discourse.group/u/jithujoshyjy)\
**Post date:** [September 30, 2022, 7:43am UTC](https://es.discourse.group/t/consider-adding-an-alternative-to-typeof-that-doesn-t-include-the-legacy-baggage-of-typeof/526/7 "2022-09-30T07:43:26Z")

</div>

May be we could use meta properties on typeof

```javascript
let x: string = ''
typeof.get(x) // { type: 'string', objectType: 'string' }
typeof.is(x, 'string') // true
typeof.is(x, { type: 'string', objectType: 'string' })

```

---

_[View the full topic](https://es.discourse.group/t/consider-adding-an-alternative-to-typeof-that-doesn-t-include-the-legacy-baggage-of-typeof/526)._
