Structural Type System


The type compatibility is determined by the type structure and not by other characteristics such as the name.

It's what TypeScript uses.

Typescript
type FirstName = string
type LastName = string

const firstName:FirstName = 'marcelo'
const lastName:LastName = 'marcelo'

console.log(firstName === lastName) // true