Crustack
@crustack/utils

exhaustiveCheck

Enforce exhaustive handling for unions.

Ensures all cases are handled.

import {  } from '@crustack/utils'


function (: 'idle' | 'loading' | 'success') {
	if ( === 'idle') return 'Idle'
	if ( === 'loading') return 'Loading...'
	if ( === 'success') return 'Done'
	()
}