Closed sclausen closed 9 years ago
Same goes for every other error. new Mongo.ObjectId(hexString)
should throw an error, if the length of the provided hex-string is not 24 characters long. Besides this, the meteor.d.ts is wrong at the point, that hexString should be optional.
@sclausen Yes, because modules on the server side being loaded asynchronously, errors were raised not in the main fiber. I just fixed it, please try it out.
Really nice! Thanks! For the tiny fix in meteor.d.ts I made a pull-request borisyankov/DefinitelyTyped/pull/6072
I'm not exactly sure, if this is an issue for @barbatus angular2 or @Urigo Meteor-Angular2, but If I got it right, this project is responsible for TypeScript compilation.
In a Meteor-Angular2 project, I wanted to use
Random.hexString(n);
on the server, but overlooked, that I missed to add it to.meteor/packages
. I found out, that the script simply stopped to execute after trying to useRandom
with no error thrown. When using meteor with javascript, this slip causes aReferenceError: Random is not defined
on the server or the client, but with Meteor-Angular2 and TypeScript, errors are only thrown on the client side.