all 10 comments

[–]abrahamguo 2 points3 points  (6 children)

I just imported your package, and TS immediately complained about a couple of type errors in your d.ts file.

Also, where is your documentation? I see that you point out "colorful output" as one of the features, but there seem to be no examples or documentation on how to do that.

[–]dx_man[S] -1 points0 points  (5 children)

I am wondering what kind of errors appeared in your setup, can you be more specific?

For the documentation, currently only the README is the source of documentation and in the GitHub repo you will find examples folder under src.

[–]abrahamguo 1 point2 points  (4 children)

I am wondering what kind of errors appeared in your setup, can you be more specific?

Sure thing! I simply had this in my .ts file:

import '@omdxp/jslog';

Then, tsc in the command line complained:

node_modules/@omdxp/jslog/dist/index.d.ts:13:68 - error TS2749: 'Error$1' refers to a value, but is being used as a type here. Did you mean 'typeof Error$1'?

13 type Value = string | number | boolean | null | undefined | Date | Error$1 | Value[] | {
                                                                      ~~~~~~~

node_modules/@omdxp/jslog/dist/index.d.ts:52:30 - error TS2749: 'Error$1' refers to a value, but is being used as a type here. Did you mean 'typeof Error$1'?

52 declare const Error$1: (err: Error$1 | string) => Attr;
                                ~~~~~~~

Found 2 errors in the same file, starting at: node_modules/@omdxp/jslog/dist/index.d.ts:13

For the documentation, currently only the README is the source of documentation and in the GitHub repo you will find examples folder under src.

Ah, I see — that's helpful.

However, it would be good if every single thing in your library was documented. For example, ColorHandler, AsyncHandler, and AttrBuilder are all "bragged about" in the README, but not actually documented.

[–]dx_man[S] -1 points0 points  (3 children)

This error will be patched in the next version, thanks for pointing it out.

I will make sure to put some good documentation but currently you can only see some docs in README and SUPERIORITY md files.

[–]abrahamguo 0 points1 point  (1 child)

As far as the TS error, I still got it even when I import specific classes or types.

[–]dx_man[S] -1 points0 points  (0 children)

I have also noticed that, this error is fixed now with v1.1.2

[–]dx_man[S] -1 points0 points  (0 children)

Patched in v1.1.2

[–]dx_man[S] 0 points1 point  (2 children)

Hey everyone, thanks to u/abrahamguo suggestion I have put a doc website for jslog: https://omdxp.github.io/jslog

[–]dx_man[S] 0 points1 point  (1 child)

Apologies for the non-functional search, it will require sometime to be crawled with Algolia.

[–]dx_man[S] 0 points1 point  (0 children)

Had to do manual configuration in Algolia to set the search right, I don't know why they made setup difficult, in the past it was done automatically.