Skip to content

Instantly share code, notes, and snippets.

@dewey92
Last active September 16, 2018 23:30
Show Gist options
  • Select an option

  • Save dewey92/bcc2cf3a4c1e32bbbf31a1e3971ccf59 to your computer and use it in GitHub Desktop.

Select an option

Save dewey92/bcc2cf3a4c1e32bbbf31a1e3971ccf59 to your computer and use it in GitHub Desktop.
Phantom Type - 1
class Temp<A> {
constructor(degree: number) { }
}
interface Celcius {}
interface Fahrenheit {}
declare function isBoiling(temp: Temp<Celcius>): boolean;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment