Skip to content

Conversation

@amishshah
Copy link

Hi there! Firstly, thank you for making this library, I'm finding it very useful!

I'm using this library with TypeScript, and it's a bit cumbersome when dealing with the return type of the crc functions:

import { crc } from 'node-crc';

const result = crc(...someArguments);

if (!result) {
  throw new Error('failure');
}
// here, result is of type `true | Buffer` instead of just Buffer,
// since the return type is given as `boolean | Buffer`

I've updated the typings to use the more correct return types of false | Buffer instead of boolean | Buffer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant