How to check with Match.Option() for any type?


#1

I want to check with Mathch.option() for any type.

check(data, {obj1: Match.Optional()}); // don't work

Please help me.


#2

Have you tried:

check(data, {obj1: Match.Optional(Match.Any)});

Match.Optional always needs an argument.


#3

Very thanks, it work fine.