Meteor-Community-Packages / meteor-roles

Authorization package for Meteor, compatible with built-in accounts packages
http://meteor-community-packages.github.io/meteor-roles/
MIT License
921 stars 166 forks source link

Add Typescript declarations #297

Closed bbenoist closed 6 months ago

bbenoist commented 4 years ago

Since Meteor now supports TypeScript, it would be nice to have type definitions on this package.

Documentation: https://www.typescriptlang.org/docs/handbook/declaration-files/introduction.html Template: https://www.typescriptlang.org/docs/handbook/declaration-files/templates/module-d-ts.html

SimonSimCity commented 4 years ago

Might also be a good time to take this package into TypeScript ... PRs are welcome. Please ping me if you're interested to get started with it.

SimonSimCity commented 4 years ago

If we want to stay at plain javascript, some library like tsd-jsdoc might be valuable. We currently annotate all our code with comments compatible with YUIDoc - where we might need to switch to jsdoc.

diavrank commented 3 years ago

Might also be a good time to take this package into TypeScript ... PRs are welcome. Please ping me if you're interested to get started with it.

Maybe this can be of help https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/meteor-roles/index.d.ts to update it to version 3 . (That is the type definitions for v1.2.14)

wallind commented 3 years ago

Does anyone still have interest in moving this to support v3.2.3? I badly need this library to work with that version and below and would be willing to contribute

wallind commented 3 years ago

https://github.com/wallind/DefinitelyTyped/tree/bump-supported-version-to-2.1.0-meteor-roles

To get the ball rolling I'm working on getting @types/meteor-roles to support 2.1.0 on the branch above. If anyone wants to participate hit me up

diavrank commented 2 years ago

is there any newness about this?

Clovel commented 2 years ago

https://github.com/wallind/DefinitelyTyped/tree/bump-supported-version-to-2.1.0-meteor-roles

To get the ball rolling I'm working on getting @types/meteor-roles to support 2.1.0 on the branch above. If anyone wants to participate hit me up

Got any updates on this ?

StorytellerCZ commented 6 months ago

With v3.6.2 types should be all set. In the future version of roles package we should move to TypeScript.

bobo96run commented 2 months ago

Just for reference, once the alanning:roles package has been added to the Meteor project, you need to either start it or execute meteor lint to have types set up and available, as explained in the docs of zodern:types (which this package depends on):

The type definitions are updated whenever your app is built. You can also update the types directly by running meteor lint.