jsdoctypeparser
Advanced tools
Comparing version 5.1.0 to 5.1.1
@@ -65,2 +65,5 @@ 'use strict'; | ||
VARIADIC (variadicNode, concretePublish) { | ||
if (!variadicNode.value) { | ||
return '...'; | ||
} | ||
return format('...%s', concretePublish(variadicNode.value)); | ||
@@ -67,0 +70,0 @@ }, |
{ | ||
"name": "jsdoctypeparser", | ||
"description": "Strict JsDoc type expression parser.", | ||
"version": "5.1.0", | ||
"version": "5.1.1", | ||
"author": "Kuniwak <orga.chem.job@gmail.com>", | ||
@@ -34,3 +34,3 @@ "contributors": [ | ||
"prepare": "npm-run-all build", | ||
"pretest": "npm-run-all lint build typecheck", | ||
"pretest": "npm-run-all lint build", | ||
"test": "npm-run-all mocha typecheck", | ||
@@ -37,0 +37,0 @@ "lint": "eslint .", |
@@ -51,3 +51,3 @@ 'use strict'; | ||
typeExprStr: line.trim().replace(/^\{(.*)\}$/, '$1'), | ||
typeExprStr: line.trim().replace(/^\{(.*)\}$/, '$1').replace(/\\n/g, '\n'), | ||
position: { | ||
@@ -54,0 +54,0 @@ filePath, |
@@ -224,3 +224,13 @@ 'use strict'; | ||
it('should return a function type with variadic', function() { | ||
const node = parse('function(...a)'); | ||
expect(publish(node)).to.equal('function(...a)'); | ||
}); | ||
it('should return a function type with variadic and no operand', function() { | ||
const node = parse('function(...)'); | ||
expect(publish(node)).to.equal('function(...)'); | ||
}); | ||
it('should return a function type with a parameter', function() { | ||
@@ -227,0 +237,0 @@ const node = parse('function(string)'); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8048684
9889