Closed epezhman closed 4 years ago
I've solved by installing the type definition: sudo npm i @types/meteor-roles --save-dev
ive got @types/meteor-roles installed and referenced in my tsconfig file and i still get this error.
Same problem as @Slavrix ...
I have the same problem
Property 'roles' does not exist on type 'typeof Meteor'.
I installed with this:
typings install github:meteor-typings/alanning-roles#9960894dba03dbaf0b2a03986ed8d041e6d629e0 --global
Sorry everyone, I don't use typescript so don't know what's going on there. Meteor.roles
is a MongoDB collection that is just set on the Meteor object if that helps. Perhaps you could define your own "type definition" for that property on the Meteor object?
Alternatively, you could copy the roles package into your local app/packages
directory and remove this part from the code:
Meteor.publish(null, function () {
return Meteor.roles.find({})
});
All that's doing is making sure that the roles collection is published by default. But its not necessary.
I think this issue belongs to https://github.com/meteor-typings/alanning-roles?
Hi, I'm developing a
Meteor v1.4.1
andAngular 2 rc.5
app and I'm trying to use themeteor-role
, the package works alright but there is a problem with typings.I installed the typings from meteor-typings/alanning-roles but it didn't fix all the messages, when I run the meteor I get messages like this:
Property 'roles' does not exist on type 'typeof Meteor'
, which comes from here in my publications:Any idea how to fix this? thanks