I am a newbie for Typescript.
I tired with Meteor-1.8.2.x.
I worked, but don’t bug error when I assign difference data type in function
// Method (ts)
Meteor.methods({
hello(
name: string,
gender: string = "M",
age: number,
address?: string
): string {
console.log(name, gender, age, address);
return name;
}
});
-------------
// Client call
Meteor.call("hello", "Rabbit", "M", "5 year", "BTB", (err, res) => {
console.log(res);
});
It still work … (age: number???)
Please help me…