We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
tryNormalizeType
1 parent 5ecc141 commit a00e748Copy full SHA for a00e748
index.js
@@ -246,17 +246,12 @@ function normalizeType (value) {
246
* Try to normalize a type and remove parameters.
247
*
248
* @param {string} value
249
- * @return {string}
+ * @return {(string|null)}
250
* @private
251
*/
252
-
253
function tryNormalizeType (value) {
254
- if (!value) {
255
- return null
256
- }
257
258
try {
259
- return normalizeType(value)
+ return value ? normalizeType(value) : null
260
} catch (err) {
261
return null
262
}
0 commit comments