-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(analyzer): ignore and internal jsdoc
fixes #21
- Loading branch information
1 parent
da30af8
commit 6bd90a4
Showing
17 changed files
with
323 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 66 additions & 0 deletions
66
packages/analyzer/fixtures/jsdoc-ignore-internal/fixture/custom-elements.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
{ | ||
"schemaVersion": "1.0.0", | ||
"readme": "", | ||
"modules": [ | ||
{ | ||
"kind": "javascript-module", | ||
"path": "fixtures/jsdoc-ignore-internal/package/my-element.js", | ||
"declarations": [ | ||
{ | ||
"kind": "variable", | ||
"name": "variable", | ||
"type": { | ||
"text": "string" | ||
}, | ||
"default": "'var'" | ||
}, | ||
{ | ||
"kind": "class", | ||
"description": "", | ||
"name": "IncludeMe", | ||
"members": [ | ||
{ | ||
"kind": "field", | ||
"name": "included", | ||
"type": { | ||
"text": "string" | ||
}, | ||
"default": "'hello world'" | ||
} | ||
], | ||
"superclass": { | ||
"name": "HTMLElement" | ||
}, | ||
"tagName": "include-me", | ||
"customElement": true | ||
} | ||
], | ||
"exports": [ | ||
{ | ||
"kind": "js", | ||
"name": "variable", | ||
"declaration": { | ||
"name": "variable", | ||
"module": "fixtures/jsdoc-ignore-internal/package/my-element.js" | ||
} | ||
}, | ||
{ | ||
"kind": "js", | ||
"name": "IncludeMe", | ||
"declaration": { | ||
"name": "IncludeMe", | ||
"module": "fixtures/jsdoc-ignore-internal/package/my-element.js" | ||
} | ||
}, | ||
{ | ||
"kind": "custom-element-definition", | ||
"name": "include-me", | ||
"declaration": { | ||
"name": "IncludeMe", | ||
"module": "fixtures/jsdoc-ignore-internal/package/my-element.js" | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} |
66 changes: 66 additions & 0 deletions
66
packages/analyzer/fixtures/jsdoc-ignore-internal/output.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
{ | ||
"schemaVersion": "1.0.0", | ||
"readme": "", | ||
"modules": [ | ||
{ | ||
"kind": "javascript-module", | ||
"path": "fixtures/jsdoc-ignore-internal/package/my-element.js", | ||
"declarations": [ | ||
{ | ||
"kind": "variable", | ||
"name": "variable", | ||
"type": { | ||
"text": "string" | ||
}, | ||
"default": "'var'" | ||
}, | ||
{ | ||
"kind": "class", | ||
"description": "", | ||
"name": "IncludeMe", | ||
"members": [ | ||
{ | ||
"kind": "field", | ||
"name": "included", | ||
"type": { | ||
"text": "string" | ||
}, | ||
"default": "'hello world'" | ||
} | ||
], | ||
"superclass": { | ||
"name": "HTMLElement" | ||
}, | ||
"tagName": "include-me", | ||
"customElement": true | ||
} | ||
], | ||
"exports": [ | ||
{ | ||
"kind": "js", | ||
"name": "variable", | ||
"declaration": { | ||
"name": "variable", | ||
"module": "fixtures/jsdoc-ignore-internal/package/my-element.js" | ||
} | ||
}, | ||
{ | ||
"kind": "js", | ||
"name": "IncludeMe", | ||
"declaration": { | ||
"name": "IncludeMe", | ||
"module": "fixtures/jsdoc-ignore-internal/package/my-element.js" | ||
} | ||
}, | ||
{ | ||
"kind": "custom-element-definition", | ||
"name": "include-me", | ||
"declaration": { | ||
"name": "IncludeMe", | ||
"module": "fixtures/jsdoc-ignore-internal/package/my-element.js" | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} |
38 changes: 38 additions & 0 deletions
38
packages/analyzer/fixtures/jsdoc-ignore-internal/package/my-element.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/** @internal */ | ||
export const dontIncludeMe = false; // should not be in declarations | ||
|
||
/** @ignore */ | ||
export const meNeither = false; // should not be in declarations | ||
|
||
export const variable = 'var'; | ||
|
||
/** @ignore */ | ||
export class IgnoreMe extends HTMLElement { } | ||
|
||
customElements.define("ignore-me", IgnoreMe); | ||
|
||
export class IncludeMe extends HTMLElement { | ||
included = 'hello world'; | ||
|
||
/** @ignore */ | ||
sneaky = 'deaky'; | ||
|
||
/** @internal */ | ||
hideMe() { | ||
return '🙈' | ||
} | ||
} | ||
|
||
customElements.define("include-me", IncludeMe); | ||
|
||
/** @ignore */ | ||
var ignoreMePlease = 'haha'; | ||
|
||
/** @internal */ | ||
var excludeMe, andMe = 'something private'; | ||
|
||
export { | ||
ignoreMePlease, | ||
excludeMe, | ||
andMe, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.