Skip to content

Commit a18685a

Browse files
author
Alexej Yaroshevich
committed
readme: add checkTypes: strictNativeCase description
1 parent 864a649 commit a18685a

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

README.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,9 +300,11 @@ function method() {}
300300

301301
Reports invalid types for bunch of tags
302302

303-
Type: `Boolean`
303+
In `strictNativeCase` mode ensures that case of natives is the same as in this list: `boolean`, `number`, `string`, `null`, `Object`, `Array`, `Date`, `RegExp`.
304304

305-
Values: `true`
305+
Type: `Boolean` or `String`
306+
307+
Values: `true` or `"strictNativeCase"`
306308

307309
Context: `*`
308310

@@ -344,6 +346,21 @@ function method(x) {}
344346

345347
##### Invalid
346348

349+
```js
350+
/** @type {some~number} */
351+
var x = 1;
352+
353+
/**
354+
* @param {function(redundantName: Number)} x
355+
*/
356+
function method(x) {}
357+
358+
/**
359+
* @param {Number|Boolean|object|array} x invalid for strictNativeCase
360+
*/
361+
function method(x) {}
362+
```
363+
347364
```js
348365
/** @type {some~number} */
349366
var x = 1;

0 commit comments

Comments
 (0)