@kanziw/error
wrapUnknownError
import { wrapUnknownError } from '@kanziw/error'
try {
someWrongFunction()
} catch (unknownErr: unknown) {
// Handle err with type Error
const err: Error = wrapUnknownError(unknownError)
}
import { wrapUnknownError } from '@kanziw/error'
try {
someWrongFunction()
} catch (unknownErr: unknown) {
// Handle err with type Error
const err: Error = wrapUnknownError(unknownError)
}
npm i @kanziw/error
0
0.1.0
MIT
2.87 kB
8