orbitdb / orbit-db-types

Unofficial orbit-db typings!
MIT License
26 stars 36 forks source link

Fix types #24

Closed rigwild closed 4 years ago

rigwild commented 4 years ago

Fixes #20

rigwild commented 4 years ago

Hey @aphelionz , I see that you are replicating this in new commits. You should probably look into it. Putting any types everywhere is not a good solution.

aphelionz commented 4 years ago

Yeah I know, I had to get it working under a really tight time crunch. Thanks for fixing!

aphelionz commented 4 years ago

Approved, can merge after the conflicts are fixed

rigwild commented 4 years ago

I'm not sure for Keystore.d.ts.

aphelionz commented 4 years ago

I'm not sure either. Create should definitely return a promise of a keystore and verify should definitely return a promise of a boolean.

Also I need to learn more about how these Typescript bindings work. Is there any way to write tests for these?

rigwild commented 4 years ago

I can't find the create method. Are you sure it has not been removed ? See https://github.com/orbitdb/orbit-db-keystore/blob/master/src/keystore.js

Also I need to learn more about how these Typescript bindings work. Is there any way to write tests for these?

What you could do is to write a simple TypeScript program that makes use of tested types and check if it compiles successfully without errors/warnings.

aphelionz commented 4 years ago

Yes, sorry, create was deleted. I also opened #25

aphelionz commented 4 years ago

I'm satisfied with these changes for now :+1:

rigwild commented 4 years ago

@aphelionz Don't forget #23 😉