jorgebucaran / classcat

Build a class attribute string quickly
MIT License
906 stars 22 forks source link

Add named export or add default function name #42

Closed Birdie0 closed 6 months ago

Birdie0 commented 7 months ago

The library currently provides only default export, which makes it a bit inconvenient for IntelliSense to provide autocomplete and automatic imports. Re-exporting with export { default as cc } from 'classcat' somewhat solves this issue, but in my opinion having named export would be beneficial as it improves developer experience.

Birdie0 commented 7 months ago

Looks like IntelliSense gets confused because default export isn't named in index.d.ts file, providing it solves the problem with automatic import.

export default function cc(names: Class): string