Comparing version 0.5.5 to 0.5.6
{ | ||
"version": "0.5.5", | ||
"version": "0.5.6", | ||
"name": "catharsis", | ||
@@ -4,0 +4,0 @@ "description": "A JavaScript parser for Google Closure Compiler and JSDoc type expressions.", |
@@ -38,3 +38,3 @@ # Catharsis # | ||
try { | ||
jsdocType = 'number|string'; // Closure Compiler expects (number|string) | ||
jsdocType = 'string[]'; // Closure Compiler expects Array.<string> | ||
parsedJsdocType = catharsis.parse(jsdocType, {jsdoc: true}); | ||
@@ -47,4 +47,4 @@ } | ||
console.log(catharsis.stringify(parsedType)); // !Object | ||
console.log(catharsis.stringify(parsedJsdocType)); // number|string | ||
console.log(catharsis.stringify(parsedJsdocType, // (number|string) | ||
console.log(catharsis.stringify(parsedJsdocType)); // string[] | ||
console.log(catharsis.stringify(parsedJsdocType, // Array.<string> | ||
{restringify: true})); | ||
@@ -67,2 +67,4 @@ | ||
+ The string `function` is treated as a function type with no parameters. | ||
+ In a function type with repeatable parameters, the names of repeatable parameters are not required | ||
to be enclosed in square brackets (for example, `function(...foo)` is allowed). | ||
+ The period may be omitted from type applications. For example, `Array.<string>` and | ||
@@ -72,5 +74,5 @@ `Array<string>` will be parsed in the same way. | ||
application with the expression `Array` (for example, `Array.<string>`). | ||
+ The enclosing parentheses may be omitted from type unions. For example, `(number|string)` and | ||
`number|string` will be parsed in the same way. | ||
+ Name expressions may contain the characters `#`, `~`, `:`, and `/`. | ||
+ Name expressions may contain a suffix that is similar to a function signature (for example, | ||
`MyClass(foo, bar)`). | ||
+ Name expressions may contain a reserved word. | ||
@@ -150,2 +152,10 @@ + Record types may use types other than name expressions for keys. | ||
+ 0.5.6 (April 2013): | ||
+ For consistency with Google Closure Library, parentheses are no longer required around type | ||
unions. (In previous versions, the parentheses could be omitted when JSDoc support was enabled.) | ||
+ For consistency with Google Closure Library, you can now use postfix notation for the `?` | ||
(nullable) and `!` (non-nullable) modifiers. For example, `?string` and `string?` are now | ||
treated as equivalent. | ||
+ String literals and numeric literals are now allowed as property names within name | ||
expressions. For example, the name expression `Foo."bar"` is now parsed correctly. | ||
+ 0.5.5 (April 2013): Corrected a parsing issue with name expressions that end with a value enclosed | ||
@@ -152,0 +162,0 @@ in parentheses. |
Sorry, the diff of this file is too big to display
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
182495
870
231
8