closure-compiler-type-cast.js 502 B

1234567891011121314151617
  1. // test to make sure comments are attached correctly
  2. let inlineComment = /* some comment */ (
  3. someReallyLongFunctionCall(withLots, ofArguments));
  4. let object = {
  5. key: /* some comment */ (someReallyLongFunctionCall(withLots, ofArguments))
  6. };
  7. // preserve parens only for type casts
  8. let assignment = /** @type {string} */ (getValue());
  9. functionCall(1 + /** @type {string} */ (value), /** @type {!Foo} */ ({}));
  10. function returnValue() {
  11. return /** @type {!Array.<string>} */ (['hello', 'you']);
  12. }