---
title: "Discussion on \"TypeScript structural typing & branding\" | Hashnode"
description: "Discussion on \"TypeScript structural typing & branding\". Within TypeScript a way to define an indentifier as a number is as follows:\nconst productId: number = 1;\nconst orderId: number = 1;\nHere productId and orderId are both numbers. However there's a few things wrong with this:\n\nPrimitive types don't ofte..."
url: "https://hashnode.com/posts/typescript-structural-typing-and-branding/5feef95c017ebb59232de441"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [TypeScript structural typing & branding](https://pineapple.codes/typescript-structural-typing-and-branding?utm_source=hashnode&utm_medium=feed)

Within TypeScript a way to define an indentifier as a number is as follows: const productId: number = 1; const orderId: number = 1; Here productId and orderId are both numbers. However there's a few things wrong with this: Primitive types don't ofte...

Jan 1, 2021 · 4 min read · pineapple.codes  
Read the article

-   [#typescript](https://hashnode.com/tag/typescript)

## Written by

[Mark Holden](https://hashnode.com/@pineapplecodes)

@pineapplecodes · Manchester, UK

  
[View profile](https://hashnode.com/@pineapplecodes)

Tech lead & software developer. Manchester, UK

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
