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

Provide .d.ts file for TypeScript #28

Closed
fgm opened this issue Aug 30, 2018 · 8 comments
Closed

Provide .d.ts file for TypeScript #28

fgm opened this issue Aug 30, 2018 · 8 comments

Comments

@fgm
Copy link

fgm commented Aug 30, 2018

Currently trying to convert my filog package using modern-syslog to TypeScript, and modern-syslog is the only dependency which doesn't either have builtin .d.ts files or an entry for @types/modern-syslog.

Either solution would help anyone trying to use modern-syslog with TypeScript.

fgm added a commit to fgm/modern-syslog that referenced this issue Aug 31, 2018
@fgm
Copy link
Author

fgm commented Aug 31, 2018

I added a version which appears to work for me on https://github.com/fgm/modern-syslog/blob/28-typescript/modern-syslog.d.ts : would you be interesting in checking it out and possibly taking a PR ? Or should I submit it to https://github.com/DefinitelyTyped/DefinitelyTyped ?

@sam-github
Copy link
Contributor

@rmg thoughts? I'm not keen to maintain mappings for a language I never use, but then again, the API is not likely to change, so there shouldn't be much maintenance.

@rmg
Copy link
Member

rmg commented Sep 24, 2018

I think it makes more sense to keep it in this repo.

@rmg
Copy link
Member

rmg commented Sep 24, 2018

@fgm if you're still willing to open a pull request for this based on the version you linked to, my first/only feedback on it would be that the exported Stream class/ctor is a stream.Writable, not a stream.Stream.

@fgm
Copy link
Author

fgm commented Sep 24, 2018

@rmg Thanks for answering. In the meantime, I received other feedback suggesting it might be better to submit it to DefinitelyTyped instead if the package is not supposed to be converted to TypeScript itself, which is unlikely since it is in C and not in JS. And it would avoid your having to care for a file you don't use.

@rmg
Copy link
Member

rmg commented Sep 24, 2018

I figured it would be easier to keep it in sync if it was in-repo, but in this case the API is highly unlikely to change much, if at all, so I suppose it doesn't really matter much.

@sam-github
Copy link
Contributor

The exposed API is partly javascript, and I've no interest in rewriting it as ts.

Anyhow, if you provide one as @rmg suggests, I'll accept, if you put in definitely typed, that's OK too.

@fgm
Copy link
Author

fgm commented Oct 10, 2018

Thanks for your answers.

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

No branches or pull requests

3 participants