Skip to content

Commit

Permalink
Fix typedef
Browse files Browse the repository at this point in the history
  • Loading branch information
ahocevar committed Sep 9, 2024
1 parent 80089c9 commit d5fda4d
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 24 deletions.
5 changes: 5 additions & 0 deletions jsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"compilerOptions": {
"checkJs": true
}
}
41 changes: 18 additions & 23 deletions test/dest/expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@
"longname": "module:test/sub/NumberStore"
},
{
"comment": "/**\n * @typedef {Object} Options\n * @property {number} num A number.\n */",
"comment": "/**\n * @typedef Options\n * @property {number} number A number.\n */",
"meta": {
"filename": "NumberStore.js",
"lineno": 5,
Expand All @@ -259,11 +259,6 @@
},
"kind": "typedef",
"name": "Options",
"type": {
"names": [
"Object"
]
},
"properties": [
{
"type": {
Expand All @@ -272,7 +267,7 @@
]
},
"description": "A number.",
"name": "num"
"name": "number"
}
],
"longname": "module:test/sub/NumberStore~Options",
Expand All @@ -283,8 +278,8 @@
"comment": "/**\n * @classdesc\n * A test class.\n */",
"meta": {
"range": [
154,
432
148,
426
],
"filename": "NumberStore.js",
"lineno": 14,
Expand All @@ -306,11 +301,11 @@
"undocumented": true
},
{
"comment": "/**\n * @param {module:sub/NumberStore~Options} options The options.\n */",
"comment": "/**\n * @param {Options} options The options.\n */",
"meta": {
"range": [
231,
343
225,
337
],
"filename": "NumberStore.js",
"lineno": 18,
Expand All @@ -330,7 +325,7 @@
{
"type": {
"names": [
"module:sub/NumberStore~Options"
"Options"
]
},
"description": "The options.",
Expand All @@ -348,8 +343,8 @@
"comment": "/**\n * @classdesc\n * A test class.\n */",
"meta": {
"range": [
154,
432
148,
426
],
"filename": "NumberStore.js",
"lineno": 14,
Expand All @@ -372,7 +367,7 @@
{
"type": {
"names": [
"module:sub/NumberStore~Options"
"Options"
]
},
"description": "The options.",
Expand All @@ -384,8 +379,8 @@
"comment": "/**\n * @type {number}\n * @private\n */",
"meta": {
"range": [
312,
338
306,
332
],
"filename": "NumberStore.js",
"lineno": 23,
Expand Down Expand Up @@ -413,8 +408,8 @@
"comment": "/**\n * @return {number} A number.\n */",
"meta": {
"range": [
391,
430
385,
424
],
"filename": "NumberStore.js",
"lineno": 29,
Expand Down Expand Up @@ -449,8 +444,8 @@
"comment": "",
"meta": {
"range": [
434,
461
428,
455
],
"filename": "NumberStore.js",
"lineno": 34,
Expand All @@ -465,4 +460,4 @@
"longname": "module:test/sub/NumberStore",
"kind": "member"
}
]
]
2 changes: 1 addition & 1 deletion test/src/sub/NumberStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

/**
* @typedef {Object} Options
* @property {number} num A number.
* @property {number} number A number.
*/

/**
Expand Down

0 comments on commit d5fda4d

Please sign in to comment.