For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /reference/control/unimplemented.md.

unimplemented

Marks a code path as intentionally unsupported and throws if execution reaches it.

return unimplemented('mysql driver is not supported')

Usage

unimplemented(message?)

Use unimplemented for behavior the application deliberately does not support. Its never return type allows it in any expression position, but it always throws at runtime. Use todo for unfinished work and unreachable for logically impossible paths.

import { match, unimplemented } from 'massaman'

type Driver = 'postgres' | 'sqlite' | 'mysql'

const migrate = (driver: Driver): void =>
  match(driver)
    .with('postgres', runPostgresMigration)
    .with('sqlite', runSqliteMigration)
    .with('mysql', () => unimplemented('mysql driver is not supported'))
    .exhaustive()

Parameters

messagestringoptional

optional context appended to the thrown error message.

Returns

never returns; the function always throws.

never

Throws

An Error with not implemented, optionally followed by message.

See also

  • todo — unfinished behavior
  • unreachable — logically impossible behavior