unimpl
TypeScript icon, indicating that this package has built-in type declarations

1.2.4 • Public • Published

unimpl

Install

npm i unimpl

Usage

import { todo, unimplemented, unreachable } from 'unimpl';

function function1(): string {
  const needToImplement = true;
  if (needToImplement) {
    return todo(); // Throws an error 'Not yet implemented'
  }
}

function function2(): string {
  const needToImplement = true;
  if (needToImplement) {
    return unimplemented(); // Throws an error 'Not implemented'
  }
}

function function3(): string {
  const needToExit = true;
  if (needToExit) {
    return 'Exit function here';
  }
  return unreachable(); // Throws an error 'Internal error: entered unreachable code'
}

Readme

Keywords

none

Package Sidebar

Install

npm i unimpl

Weekly Downloads

1

Version

1.2.4

License

MIT

Unpacked Size

8.23 kB

Total Files

6

Last publish

Collaborators

  • gsongsong