mirror of
https://github.com/hanzoai/prettier.git
synced 2026-09-24 17:02:04 +00:00
13 lines
242 B
JavaScript
13 lines
242 B
JavaScript
// @flow
|
|
|
|
type Binary = 0 | 1;
|
|
|
|
function stringifyBinary(binary: Binary): string {
|
|
if (binary === 0) {
|
|
return 'zero';
|
|
} else if (binary === 2) { // oops
|
|
return 'one';
|
|
}
|
|
throw "unreachable"; // TODO: this shouldn't be needed
|
|
}
|