Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TypeScript type declarations #21

Closed
wants to merge 1 commit into from

Conversation

jirutka
Copy link
Collaborator

@jirutka jirutka commented Aug 27, 2019

Depends on Download/anylogger#2

Resolves #19

@jirutka
Copy link
Collaborator Author

jirutka commented Aug 27, 2019

CI failed on older Node.js versions because of TypeError: debug.name.padEnd is not a function which is unrelated to this PR.

@jirutka
Copy link
Collaborator Author

jirutka commented Sep 1, 2019

@Download, have you noticed this PR? I myself very often overlook some PRs/issues in my projects, so I’m better reminding…

@Download
Copy link
Owner

Download commented Sep 3, 2019

Ehm... yes I did overlook it. Sorry!
I will keep a closer eye on things now that you are so active
And thanks again for your great contributions!

@Download
Copy link
Owner

Download commented Sep 3, 2019

Is there a way to test this?

Or better yet... can we make it so that if the type defs go out-of-synch with the code, some test fails?
Because I am not using TS myself and I worry that I will not be able to keep these definitions in sync if there is no test that breaks when I mess it up

@notgull
Copy link

notgull commented Nov 3, 2019

What is the status of this merge? The .d.ts file seems to work, and I'd like to use this in a Typescript program I'm working on.

@jirutka
Copy link
Collaborator Author

jirutka commented Nov 6, 2019

What is the status of this merge?

I have to find some time to write tests for the type declarations.

toddb pushed a commit to semanticlink/ulog that referenced this pull request Mar 11, 2020
@sapkra
Copy link

sapkra commented May 4, 2020

@Download @jirutka Any news about when this PR will be merged?

@Vadorequest
Copy link

@Download There is not much risk regarding the .d.ts definitions, it could break stuff if existing defs had existed, but because it's the first one, it won't.

Also, TS "bugs" are easily fixables using @ts-ignore and other tricks, it won't break existing production apps.

The easiest way to support TS is to build the package in TS, at least you're sure it won't be out of sync.

This could/should be merged quickly. Meanwhile, I'll manually add the d.ts file to my project.

@@ -61,5 +61,8 @@
"webpack-cli": "^3.1.2",
"webpack-dev-server": "^3.1.10"
},
"dependencies": {}
"dependencies": {},
"peerDependencies": {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why peerDependencies? Wouldn't devDependencies be better suited since it's only useful for TS typings? Having it in peerDependencies wouldn't increase the overall size while not being actually useful for a production usage?

@Download
Copy link
Owner

Download commented Dec 7, 2020

See #33
I want this feature, but I want to 'do it right'.
Before, the betas simply weren't stable in the sense that everything kept changing... Now, I feel much more sure that it will only evolve from here and not change in revolutionary ways.

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.

Typescript support
5 participants