Skip to content

Commit 2ec7182

Browse files
committed
refactor: avoid caps consistently (and export typescript tags for future use)
1 parent 3d1decc commit 2ec7182

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

src/jsdocUtils.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
import _ from 'lodash';
2-
import {jsdocTags, closureTags} from './tagNames';
2+
import {closureTags} from './tagNames';
33

44
// Todo: Distinguish closure tags
5-
const tagNames = {
6-
...closureTags,
7-
...jsdocTags,
8-
};
5+
const tagNames = closureTags;
96

107
const getFunctionParameterNames = (functionNode : Object) : Array<string> => {
118
const getParamName = (param) => {

src/tagNames.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,14 +114,16 @@ const jsdocTags = {
114114
],
115115
};
116116

117-
const TypeScriptTags = {
117+
const typeScriptTags = {
118+
...jsdocTags,
119+
118120
// `@template` is also in TypeScript per:
119121
// https://www.typescriptlang.org/docs/handbook/type-checking-javascript-files.html#supported-jsdoc
120122
template: [],
121123
};
122124

123125
const closureTags = {
124-
...TypeScriptTags,
126+
...typeScriptTags,
125127

126128
// From https://github.com/google/closure-compiler/wiki/Annotating-JavaScript-for-the-Closure-Compiler
127129
// These are all recognized in https://github.com/jsdoc/jsdoc/blob/master/packages/jsdoc/lib/jsdoc/tag/dictionary/definitions.js
@@ -155,4 +157,4 @@ const closureTags = {
155157
unrestricted: [],
156158
};
157159

158-
export {jsdocTags, closureTags};
160+
export {jsdocTags, closureTags, typeScriptTags};

0 commit comments

Comments
 (0)