sindresorhus/boxen

Border style type issue

vinaysharma14 opened this issue · 5 comments

Version:
^4.2.0

Issue:
The borderStyle option throws type error in TypeScript ^4.1.2. None of these seem to work: single, double, round, bold, singleDouble, doubleSingle, classic.

Screenshot:

Screenshot 2020-12-26 at 2 15 15 PM

@sindresorhus so how would you suggest to pass the value then? The app won't compile due to this error.

Look at the type tests. You just use it like any TS enum.

By types tests you mean this file, right? Well, the screenshot above literally uses the code snippet from the usage in readme. How else am I supposed to use it?

console.log(boxen('unicorn', { padding: 1, margin: 1, borderStyle: 'double' }));