- The /*properties */ directive can now accept types. For example, the directive
a: array, b: boolean, n: number, o: object, r: regexp, any: *
indicates that the properties a, b, n, o, r should only accept values having the indicated types. Additionally, the type * is a wildcard indicating any type.
foo.s = 1; // warning
foo.s = ''; // ok
foo.any = 1 // ok
foo.any = ''; // ok
Also, function is a type, as is function followed by one of the other types, where the second type is a function's return type.
join: function string, slice: function *
The /*properties */ directive is generated as part of the function report.
This is part of the type confusion checking service of JSLint. If you do not want to use this service, then click the 'Tolerate type confusion' option.