aslilac / succulent

Powerful and easy runtime type checking
MIT License
32 stars 1 forks source link

Support for key types #8

Open aslilac opened 2 years ago

aslilac commented 2 years ago
const $Hi = $interface({
  type: 'hi'
});

const $Hey = $interface({
  type: 'hey'
});

const $Greeting = union(hi, hey);

// Desired result:
is('hi', $Greeting['type']); // true
is('hey', $Greeting['type']); // true