wechaty/matrix-appservice

[TypeScript] Add typing system to matrix-js-sdk and matrix-appservice-bridge

huan opened this issue · 3 comments

huan commented

I had spent around two full days to study the document and write the typings for matrix-appservice-bridge & matrix-js-sdk.

With the typing system, it helped me a lot for learn the API and prevent lots of potential bugs. I think it's worth to publish them, the best will be integrated into our npm module.

The typing definition is still working in progress and heavy developing, you can watch it at https://github.com/huan/matrix-appservice-wechaty/blob/master/src/typings.

I'll create a pull request to add the typing to their repository after I get this project done, and any suggestion will be welcome by leaving comments under this issue.

@Half-Shot

See Also

Thanks!

huan commented

Just sent the PR for typing for Matrix JS SDK (matrix-js-sdk) to DefinitelyTyped.

See: DefinitelyTyped/DefinitelyTyped#42673

huan commented

And have sent a PR for typing for Matrix AppService Bridge (matrix-appservice-bridge) to DefinitelyTyped.

See: DefinitelyTyped/DefinitelyTyped#42702

huan commented

That two PR are all merged to the DefinitelyTyped repository.

now we can use @types/matrix-js-sdk and @types/matrix-appservice-bridge by npm install:

npm install @types/matrix-js-sdk @types/matrix-appservice-bridge -D