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

Adding typescript definitions #34

Open
s0rthak opened this issue Jan 26, 2021 · 5 comments
Open

Adding typescript definitions #34

s0rthak opened this issue Jan 26, 2021 · 5 comments

Comments

@s0rthak
Copy link
Contributor

s0rthak commented Jan 26, 2021

Hi again!

I was wondering if it's possible to add a typescript definition file in the project.
I'm using this package on a project and have written typings for some of the functions.

Would be happy to complete them if it's possible to add them to this project (an extra index.d.ts file I think) or could even contribute them to @DefinitelyTyped

@jakesjews
Copy link
Member

That sounds good to me. I'll definitely merge a PR for it.

@simultsop
Copy link

Hey there, cool to see type definition.

However im running into this case
https://stackoverflow.com/questions/53186841/exports-and-export-assignements-are-not-permitted-in-module-augmentations

Feels like you may need to export types from index.js, am new to ts to, idk the proper way. So our pipeline halts on 49,3 (last line) index.d.ts TS2666.

@simultsop
Copy link

Hey there, cool to see type definition.

However im running into this case https://stackoverflow.com/questions/53186841/exports-and-export-assignements-are-not-permitted-in-module-augmentations

Feels like you may need to export types from index.js, am new to ts to, idk the proper way. So our pipeline halts on 49,3 (last line) index.d.ts TS2666.

So the worst way to keep pipelines running was adding skipLibCheck to compileroptions in tsconfig.

Locally as workaround, I went to your index.d.ts and removed declare module samba client, with its pairing brackets.

And by googling did a TopLevelDeclaration by adding declare keyword near class SambaClient. Locally got no error on the tsc build.

@jakesjews
Copy link
Member

to be honest I don't really use typescript so I dont know much about it but I'll definitely accept a PR for it

@drubetti
Copy link
Contributor

Hi @jakesjews, I've opened a pull request that should fix error TS2666 here: #48.

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

4 participants