File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 2
2
3
3
Reports invalid types.
4
4
5
- By default, ensures that case of native types is the same as in this list:
5
+ By default, ensures that the casing of native types is the same as in this list:
6
6
7
7
```
8
8
undefined
12
12
string
13
13
object
14
14
Array
15
+ Function
15
16
Date
16
17
RegExp
17
18
```
@@ -55,9 +56,10 @@ functions might not even support the objects if they are checking for identity.)
55
56
type name | ` typeof ` | check-types | testcase
56
57
--|--|--|--
57
58
** Array** | object | ** Array** | ` ([]) instanceof Array ` -> ` true `
59
+ ** Function** | function | ** function** | ` (function f () {}) instanceof Function ` -> ` true `
58
60
** Date** | object | ** Date** | ` (new Date()) instanceof Date ` -> ` true `
59
61
** RegExp** | object | ** RegExp** | ` (new RegExp(/.+/)) instanceof RegExp ` -> ` true `
60
- ** Object** | object | ** object** | ` ({}) instanceof Object ` -> ` true ` but ` Object.create(null) instanceof Object ` -> ` false `
62
+ Object | ** object** | ** object** | ` ({}) instanceof Object ` -> ` true ` but ` Object.create(null) instanceof Object ` -> ` false `
61
63
Boolean | ** boolean** | ** boolean** | ` (true) instanceof Boolean ` -> ** ` false ` **
62
64
Number | ** number** | ** number** | ` (41) instanceof Number ` -> ** ` false ` **
63
65
String | ** string** | ** string** | ` ("test") instanceof String ` -> ** ` false ` **
Original file line number Diff line number Diff line change @@ -10,9 +10,9 @@ const strictNativeTypes = [
10
10
'string' ,
11
11
'object' ,
12
12
'Array' ,
13
- 'RegExp ' ,
13
+ 'Function ' ,
14
14
'Date' ,
15
- 'Function '
15
+ 'RegExp '
16
16
] ;
17
17
18
18
export default iterateJsdoc ( ( {
You can’t perform that action at this time.
0 commit comments