Skip to content

Latest commit

 

History

History
18 lines (14 loc) · 562 Bytes

README.md

File metadata and controls

18 lines (14 loc) · 562 Bytes

@kanziw/error

npm version license npm downloads

wrapUnknownError

import { wrapUnknownError } from '@kanziw/error'

try {
  someWrongFunction()
} catch (unknownErr: unknown) {
  // Handle err with type Error
  const err: Error = wrapUnknownError(unknownError)
}