If I turn a SimpleSchema schema definition into TypeScript, I get an type error when using the “index” option. How can I fix this?
Could you post some code sample here? what’s problem?
If I have a schema declaration like this:
the index is highlighted as an error.
Maybe this is because I am still using simpl-schema
and not the revised meteor/aldeed:simple-schema
?
4.0
Starting 4.0 collection2 ships with built in aldeed:simple-schema@1.13.1.
meteor add aldeed:collection2
I don’t know your setup but if you use aldeed:collection2
package, it doesn’t even support typed.
There is no type definition here: meteor-collection2/package/collection2 at master · Meteor-Community-Packages/meteor-collection2 · GitHub
or here: meteor-simple-schema/package.js at master · Meteor-Community-Packages/meteor-simple-schema · GitHub