Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: angular/tsickle
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.38.1
Choose a base ref
...
head repository: angular/tsickle
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.39.0
Choose a head ref
  • 19 commits
  • 226 files changed
  • 6 contributors

Commits on Mar 5, 2020

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    c3c16d1 View commit details

Commits on Mar 11, 2020

  1. Copy the full SHA
    60e5460 View commit details
  2. Copy the full SHA
    0019925 View commit details

Commits on Mar 17, 2020

  1. Bump minimist from 1.2.0 to 1.2.2 in /demo

    Bumps [minimist](https://github.com/substack/minimist) from 1.2.0 to 1.2.2.
    - [Release notes](https://github.com/substack/minimist/releases)
    - [Commits](https://github.com/substack/minimist/compare/1.2.0...1.2.2)
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored and mprobst committed Mar 17, 2020
    Copy the full SHA
    8a1b405 View commit details

Commits on Mar 20, 2020

  1. Copy the full SHA
    dee3661 View commit details

Commits on Apr 6, 2020

  1. Bump minimist from 1.2.2 to 1.2.3 in /demo

    Bumps [minimist](https://github.com/substack/minimist) from 1.2.2 to 1.2.3.
    - [Release notes](https://github.com/substack/minimist/releases)
    - [Commits](https://github.com/substack/minimist/compare/1.2.2...1.2.3)
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored and mprobst committed Apr 6, 2020
    Copy the full SHA
    1751f0b View commit details

Commits on Apr 29, 2020

  1. Copy the full SHA
    03e4676 View commit details

Commits on May 19, 2020

  1. forbid '@Protected' in TypeScript comments

    We already forbade @Private and @public; I think this was an oversight.
    
    The reason we forbid these is because there are TS builtin equivalents,
    and some users aren't aware of them.  I have already fixed the existing
    users to make this change safe to land.
    
    PiperOrigin-RevId: 309953800
    evmar committed May 19, 2020
    Copy the full SHA
    3f1dd00 View commit details

Commits on May 20, 2020

  1. move private field test to its own directory

    PiperOrigin-RevId: 312379048
    evmar committed May 20, 2020
    Copy the full SHA
    9007ca4 View commit details

Commits on May 21, 2020

  1. clang-format after last change

    I have fixed things so that future changes will be automatically clang-formatted.
    
    PiperOrigin-RevId: 312701618
    evmar committed May 21, 2020
    Copy the full SHA
    24f604f View commit details

Commits on May 29, 2020

  1. Suppress "missingRequire" diagnostics in "closure" output as types re…

    …ferences are propagated between files even when they are not directly imported. While these are violations of the "missing require" rules hey are believed to be safe.
    
    PiperOrigin-RevId: 313669021
    concavelenz authored and evmar committed May 29, 2020
    Copy the full SHA
    ef4147e View commit details
  2. don't dealias types in heritage clauses

    If you have
    ```
    class Foo implements Bar
    ```
    where `Bar` is some sort of alias, previously we would resolve
    Bar to the underlying alias and emit that name instead in the
    `@implements` bit.  This change makes us instead use the original
    Bar.
    
    You can see in the two affected tests that we have tests for the ways
    in which you might expect this to fail -- for example, the test shows
    that JSCompiler handles it properly when you implements a type alias.
    
    PiperOrigin-RevId: 313779842
    evmar authored and copybara-github committed May 29, 2020
    Copy the full SHA
    fae06be View commit details

Commits on Jun 12, 2020

  1. reformat recently-touched code

    I have recently fixed things so we run clang-format within Google,
    so hopefully subsequent changes will preserve the formatting, which
    otherwise breaks the CI on Github.
    
    PiperOrigin-RevId: 316054434
    evmar authored and copybara-github committed Jun 12, 2020
    Copy the full SHA
    f8f5eb0 View commit details
  2. drop the module = module; emit by tsickle

    This was a workaround for JSCompiler warning that module is an unused variable,
    but we fixed this more appropriately by suppressing that warning.
    
    PiperOrigin-RevId: 316150037
    evmar authored and copybara-github committed Jun 12, 2020
    Copy the full SHA
    8335738 View commit details

Commits on Jun 23, 2020

  1. simplify emit of side effect imports

    Imagine code like
    
    ```
    import 'foo';  // #1
    import * as foo from 'foo';  // #2
    ```
    
    tsickle currently produces something like:
    
    ```
    var tsickle_module_1_ = goog.require('foo');  // #1
    var foo_1 = tsickle_module_1_;  // #2
    ```
    
    Using this alias ends up confusing some JSCompiler optimization
    (see bug).  We can avoid it by producing the simpler emit done
    in this change, which looks instead like:
    
    ```
    goog.require('foo');  // #1
    var foo_1 = goog.require('foo');  // #2
    ```
    
    PiperOrigin-RevId: 317957124
    evmar authored and copybara-github committed Jun 23, 2020
    Copy the full SHA
    7950404 View commit details

Commits on Jun 26, 2020

  1. Add TypeScript 3.9 support

    PiperOrigin-RevId: 318546058
    rrdelaney authored and copybara-github committed Jun 26, 2020
    Copy the full SHA
    c5a8567 View commit details
  2. Disables formatting checks (#1158)

    We don't need to check this anymore now that we push code out using
    Copybara.
    rrdelaney authored Jun 26, 2020
    Copy the full SHA
    679cbee View commit details

Commits on Jun 29, 2020

  1. Update TypeScript dependency to 3.9 (#1157)

    * Update TypeScript dependency to 3.9
    
    Fixes #1155
    
    * Update test goldens
    rrdelaney authored Jun 29, 2020
    Copy the full SHA
    d4428e5 View commit details

Commits on Jun 30, 2020

  1. rel: 0.39.0

    rrdelaney authored and evmar committed Jun 30, 2020
    Copy the full SHA
    afc41a2 View commit details
Showing with 632 additions and 618 deletions.
  1. +0 −3 .clang-format
  2. +1 −3 README.md
  3. +0 −59 check_format.js
  4. +1 −1 demo/package.json
  5. +4 −9 demo/yarn.lock
  6. +3 −5 package.json
  7. +3 −0 src/closure_externs.js
  8. +14 −8 src/fileoverview_comment_transformer.ts
  9. +236 −44 src/googmodule.ts
  10. +2 −2 src/jsdoc.ts
  11. +14 −12 src/jsdoc_transformer.ts
  12. +3 −3 src/module_type_translator.ts
  13. +3 −2 test/e2e_closure_test.ts
  14. +37 −11 test/googmodule_test.ts
  15. +1 −2 test_files/abstract/abstract.js
  16. +1 −2 test_files/anon_class/anon_class.js
  17. +1 −1 test_files/arrow_fn.es5/arrow_fn_es5.js
  18. +1 −2 test_files/arrow_fn.untyped/arrow_fn.untyped.js
  19. +1 −2 test_files/arrow_fn/arrow_fn.js
  20. +1 −2 test_files/async_functions/async_functions.js
  21. +1 −2 test_files/augment/user.js
  22. +1 −2 test_files/automatic_semicolon_insertion/asi.js
  23. +1 −2 test_files/basic.untyped/basic.untyped.js
  24. +1 −2 test_files/blacklisted_ambient_external_module/user.js
  25. +3 −4 test_files/cast_extends/cast_extends.js
  26. +1 −2 test_files/class.untyped/class.js
  27. +2 −3 test_files/class/class.js
  28. +1 −2 test_files/clutz.no_externs/import_default.js
  29. +1 −2 test_files/clutz.no_externs/strip_clutz_type.js
  30. +1 −2 test_files/clutz_type_value.no_externs/user.js
  31. +1 −2 test_files/coerce/coerce.js
  32. +1 −2 test_files/comments/comments.js
  33. +1 −2 test_files/conditional_rest_tuple_type/conditional_rest_tuple_type.js
  34. +1 −2 test_files/conditional_type/conditional_type.js
  35. +1 −2 test_files/ctors/ctors.js
  36. +1 −2 test_files/debugger/user.js
  37. +1 −2 test_files/declare/declare_nondts.js
  38. +1 −2 test_files/declare/user.js
  39. +1 −2 test_files/declare_class_ns/declare_class_ns.js
  40. +1 −2 test_files/declare_class_overloads/declare_class_overloads.js
  41. +1 −2 test_files/declare_export.untyped/declare_export.js
  42. +1 −2 test_files/declare_export/declare_export.js
  43. +1 −2 test_files/declare_export_dts/user.js
  44. +1 −2 test_files/declare_import/export_default.js
  45. +1 −2 test_files/declare_import/exporter.js
  46. +2 −3 test_files/decorator/decorator.js
  47. +1 −2 test_files/decorator/default_export.js
  48. +1 −2 test_files/decorator/external.js
  49. +1 −2 test_files/decorator/external2.js
  50. +1 −2 test_files/decorator/only_types.js
  51. +1 −2 test_files/decorator_nested_scope/decorator_nested_scope.js
  52. +1 −2 test_files/default/default.js
  53. +1 −2 test_files/doc_params/doc_params.js
  54. +1 −2 test_files/docs_on_ctor_param_properties/docs_on_ctor_param_properties.js
  55. +1 −2 test_files/enum.untyped/enum.untyped.js
  56. +1 −2 test_files/enum/enum.js
  57. +1 −2 test_files/enum/enum_user.js
  58. +1 −2 test_files/enum_ref_import/enum_ref_import.js
  59. +1 −2 test_files/enum_ref_import/exporter.js
  60. +1 −2 test_files/enum_value_literal_type/enum_value_literal_type.js
  61. +1 −2 test_files/export/export.js
  62. +1 −2 test_files/export/export_helper.js
  63. +1 −2 test_files/export/export_helper_2.js
  64. +1 −2 test_files/export/export_helper_3.js
  65. +1 −2 test_files/export/export_star_imported.js
  66. +1 −2 test_files/export/type_and_value.js
  67. +1 −2 test_files/export_declare_namespace/export_declare_namespace.js
  68. +1 −2 test_files/export_declare_namespace/user.js
  69. +1 −2 test_files/export_equals.shim/export_equals.js
  70. +1 −2 test_files/export_equals.shim/user.js
  71. +1 −2 test_files/export_local_type/export_local_type.js
  72. +1 −2 test_files/export_multi/export_multi.js
  73. +1 −2 test_files/export_star_as_ns/ns.js
  74. +1 −2 test_files/export_star_as_ns/star_as_ns.js
  75. +1 −2 test_files/export_types_values.untyped/importer.js
  76. +1 −2 test_files/export_types_values.untyped/type_exporter.js
  77. +1 −2 test_files/export_types_values.untyped/value_exporter.js
  78. +2 −3 test_files/exporting_decorator/exporting.js
  79. +1 −2 test_files/extend_and_implement/extend_and_implement.js
  80. +1 −2 test_files/fields/fields.js
  81. +1 −2 test_files/fields_no_ctor/fields_no_ctor.js
  82. +0 −1 test_files/file_comment.puretransform/before_import.js
  83. +0 −1 test_files/file_comment.puretransform/comment_before_class.js
  84. +0 −1 test_files/file_comment.puretransform/comment_before_elided_import.js
  85. +0 −1 test_files/file_comment.puretransform/comment_before_var.js
  86. +0 −1 test_files/file_comment.puretransform/comment_no_tag.js
  87. +0 −1 test_files/file_comment.puretransform/comment_with_text.js
  88. +0 −1 test_files/file_comment.puretransform/file_comment.js
  89. +0 −1 test_files/file_comment.puretransform/fileoverview_and_jsdoc.js
  90. +0 −1 test_files/file_comment.puretransform/fileoverview_comment_add_suppress.js
  91. +0 −1 test_files/file_comment.puretransform/fileoverview_comment_add_suppress_before_license.js
  92. +0 −1 test_files/file_comment.puretransform/fileoverview_comment_merge_suppress.js
  93. +0 −1 test_files/file_comment.puretransform/jsdoc_comment.js
  94. +0 −1 test_files/file_comment.puretransform/multiple_comments.js
  95. +0 −1 test_files/file_comment.puretransform/other_fileoverview_comments.js
  96. +1 −2 test_files/file_comment.puretransform/side_effect_import.js
  97. +1 −2 test_files/file_comment/before_import.js
  98. +1 −2 test_files/file_comment/comment_before_class.js
  99. +1 −2 test_files/file_comment/comment_before_elided_import.js
  100. +1 −2 test_files/file_comment/comment_before_var.js
  101. +1 −2 test_files/file_comment/comment_no_tag.js
  102. +1 −2 test_files/file_comment/comment_with_text.js
  103. +1 −2 test_files/file_comment/export_star.js
  104. +1 −2 test_files/file_comment/file_comment.js
  105. +1 −2 test_files/file_comment/fileoverview_and_jsdoc.js
  106. +1 −2 test_files/file_comment/fileoverview_comment_add_suppress.js
  107. +1 −2 test_files/file_comment/fileoverview_comment_add_suppress_before_license.js
  108. +1 −2 test_files/file_comment/fileoverview_comment_merge_suppress.js
  109. +1 −2 test_files/file_comment/fileoverview_in_comment_text.js
  110. +1 −2 test_files/file_comment/jsdoc_comment.js
  111. +1 −2 test_files/file_comment/latecomment.js
  112. +1 −2 test_files/file_comment/latecomment_front.js
  113. +1 −2 test_files/file_comment/multiple_comments.js
  114. +1 −2 test_files/file_comment/other_fileoverview_comments.js
  115. +1 −2 test_files/file_comment/run_in_comment.js
  116. +2 −3 test_files/file_comment/side_effect_import.js
  117. +1 −2 test_files/functions.untyped/functions.js
  118. +1 −2 test_files/functions/functions.js
  119. +1 −2 test_files/functions/two_jsdoc_blocks.js
  120. +1 −2 test_files/generic_fn_type/generic_fn_type.js
  121. +1 −2 test_files/generic_local_var/generic_local_var.js
  122. +1 −2 test_files/generic_type_alias/generic_type_alias.js
  123. +1 −2 test_files/implement_reexported_interface/exporter.js
  124. +1 −2 test_files/implement_reexported_interface/interface.js
  125. +2 −4 test_files/implement_reexported_interface/user.js
  126. +1 −2 test_files/import_alias/exporter.js
  127. +1 −2 test_files/import_alias/importer.js
  128. +1 −2 test_files/import_default/exporter.js
  129. +1 −2 test_files/import_default/import_default.js
  130. +1 −2 test_files/import_empty/import_empty.js
  131. +1 −2 test_files/import_empty/imported.js
  132. +6 −0 test_files/import_from_goog.no_externs/closure_LegacyModule.js
  133. 0 test_files/{import_from_goog → import_from_goog.no_externs}/closure_Module.js
  134. 0 test_files/{import_from_goog → import_from_goog.no_externs}/closure_OtherModule.js
  135. +24 −0 test_files/import_from_goog.no_externs/decls.d.ts
  136. +7 −5 test_files/{import_from_goog → import_from_goog.no_externs}/import_from_goog.js
  137. +2 −0 test_files/{import_from_goog → import_from_goog.no_externs}/import_from_goog.ts
  138. +0 −12 test_files/import_from_goog/decls.d.ts
  139. +0 −27 test_files/import_from_goog/externs.js
  140. +1 −2 test_files/import_only_types/import_only_types.js
  141. +1 −2 test_files/import_only_types/types_and_constenum.js
  142. +1 −2 test_files/import_only_types/types_only.js
  143. +1 −2 test_files/import_prefixed/exporter.js
  144. +1 −2 test_files/import_prefixed/import_prefixed_mixed.js
  145. +1 −2 test_files/import_prefixed/import_prefixed_types.js
  146. +1 −2 test_files/index_import/has_index/index.js
  147. +1 −2 test_files/index_import/has_index/relative.js
  148. +1 −2 test_files/index_import/lib.js
  149. +1 −2 test_files/index_import/user.js
  150. +1 −2 test_files/interface/implement_import.js
  151. +1 −2 test_files/interface/interface.js
  152. +1 −2 test_files/interface/interface_extends.js
  153. +1 −2 test_files/interface/interface_type_params.js
  154. +1 −2 test_files/invalid_closure_properties/invalid_closure_properties.js
  155. +1 −2 test_files/iterator/iterator.js
  156. +1 −2 test_files/jsdoc/enum_tag.js
  157. +1 −2 test_files/jsdoc/jsdoc.js
  158. +1 −2 test_files/jsdoc_types.untyped/default.js
  159. +1 −2 test_files/jsdoc_types.untyped/jsdoc_types.js
  160. +1 −2 test_files/jsdoc_types.untyped/module1.js
  161. +1 −2 test_files/jsdoc_types.untyped/module2.js
  162. +1 −2 test_files/jsdoc_types.untyped/nevertyped.js
  163. +1 −2 test_files/jsdoc_types/default.js
  164. +1 −2 test_files/jsdoc_types/initialized_unknown.js
  165. +1 −2 test_files/jsdoc_types/jsdoc_types.js
  166. +1 −2 test_files/jsdoc_types/module1.js
  167. +1 −2 test_files/jsdoc_types/module2.js
  168. +1 −2 test_files/jsdoc_types/nevertyped.js
  169. +1 −2 test_files/jsx/jsx.js
  170. +1 −2 test_files/methods/methods.js
  171. +1 −1 test_files/mixin/dtsdiagnostics.txt
  172. +1 −2 test_files/module/module.js
  173. +1 −2 test_files/namespaced/ambient_namespaced.js
  174. +1 −2 test_files/namespaced/export_enum_in_namespace.js
  175. +1 −2 test_files/namespaced/export_namespace.js
  176. +1 −2 test_files/namespaced/local_namespace.js
  177. +1 −2 test_files/namespaced/reopen_ns.js
  178. +1 −2 test_files/namespaced/user.js
  179. +1 −2 test_files/nonnull_generics/nonnull_generics.js
  180. +1 −2 test_files/nullable/nullable.js
  181. +1 −2 test_files/optional/optional.js
  182. +1 −2 test_files/parameter_properties/parameter_properties.js
  183. +1 −2 test_files/partial/partial.js
  184. +4 −5 test_files/{class → private_field}/private_field.js
  185. 0 test_files/{class → private_field}/private_field.ts
  186. +1 −2 test_files/promiseconstructor/promiseconstructor.js
  187. +1 −2 test_files/promisectorlike/promisectorlike.js
  188. +1 −2 test_files/promiselike/promiselike.js
  189. +1 −2 test_files/protected/protected.js
  190. +1 −2 test_files/rest_parameters_any/rest_parameters_any.js
  191. +1 −2 test_files/rest_parameters_generic_empty/rest_parameters_generic_empty.js
  192. +1 −2 test_files/rest_parameters_tuple/rest_parameters_tuple.js
  193. +1 −2 test_files/return_this/return_this.js
  194. +13 −0 test_files/side_effect_import/module1.js
  195. +5 −0 test_files/side_effect_import/module1.ts
  196. +13 −0 test_files/side_effect_import/module2.js
  197. +5 −0 test_files/side_effect_import/module2.ts
  198. +22 −0 test_files/side_effect_import/side_effect_import.js
  199. +16 −0 test_files/side_effect_import/side_effect_import.ts
  200. +1 −2 test_files/single_value_enum/single_value_enum.js
  201. +1 −2 test_files/static/static.js
  202. +1 −2 test_files/structural.untyped/structural.untyped.js
  203. +1 −2 test_files/super/super.js
  204. +1 −2 test_files/symbol/symbol.js
  205. +1 −2 test_files/this_type/this_type.js
  206. +1 −2 test_files/transitive_symbol_type_only/exporter.js
  207. +1 −2 test_files/transitive_symbol_type_only/reexporter.js
  208. +1 −2 test_files/transitive_symbol_type_only/transitive_symbol_type_only.js
  209. +1 −2 test_files/type/type.js
  210. +1 −2 test_files/type_alias_imported/elided_comment.js
  211. +1 −2 test_files/type_alias_imported/export_constant.js
  212. +1 −2 test_files/type_alias_imported/type_alias_declare.js
  213. +1 −2 test_files/type_alias_imported/type_alias_default_exporter.js
  214. +1 −2 test_files/type_alias_imported/type_alias_exporter.js
  215. +1 −2 test_files/type_alias_imported/type_alias_imported.js
  216. +1 −2 test_files/type_and_value/module.js
  217. +1 −2 test_files/type_and_value/type_and_value.js
  218. +1 −2 test_files/type_guard_fn/type_guard_fn.js
  219. +1 −2 test_files/type_propaccess.no_externs/type_propaccess.js
  220. +1 −2 test_files/typedef.untyped/typedef.js
  221. +1 −2 test_files/typedef/typedef.js
  222. +1 −2 test_files/underscore/export_underscore.js
  223. +1 −2 test_files/underscore/underscore.js
  224. +1 −2 test_files/use_closure_externs/use_closure_externs.js
  225. +1 −2 test_files/variables/variables.js
  226. +6 −25 yarn.lock
3 changes: 0 additions & 3 deletions .clang-format

This file was deleted.

4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -140,9 +140,7 @@ any of the below commands to make sure you are using the right version.
- `ibazel test test:unit_test` executes the unit tests in watch mode (use `bazel test test:unit_test` for a single run),
- `bazel test test:e2e_test` executes the e2e tests,
- `bazel test test:golden_test` executes the golden tests,
- `node check_format.js` checks the source code formatting using
`clang-format`,
- `yarn test` runs unit tests, e2e tests and checks the source code formatting.
- `yarn test` runs unit tests and e2e tests.

### Debugging

59 changes: 0 additions & 59 deletions check_format.js

This file was deleted.

2 changes: 1 addition & 1 deletion demo/package.json
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
"demo": "node --preserve-symlinks build/demo.js -- --outDir `pwd`/tsickle-out"
},
"dependencies": {
"minimist": "^1.2.0",
"minimist": "^1.2.3",
"tsickle": "^0.37.0",
"typescript": "~3.5.3"
},
13 changes: 4 additions & 9 deletions demo/yarn.lock
Original file line number Diff line number Diff line change
@@ -7,11 +7,6 @@
resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.0.tgz#69a23a3ad29caf0097f06eda59b361ee2f0639f6"
integrity sha1-aaI6OtKcrwCX8G7aWbNh7i8GOfY=

"@types/node@*":
version "12.7.5"
resolved "https://registry.yarnpkg.com/@types/node/-/node-12.7.5.tgz#e19436e7f8e9b4601005d73673b6dc4784ffcc2f"
integrity sha512-9fq4jZVhPNW8r+UYKnxF1e2HkDWOWKM5bC2/7c9wPV835I0aOrVbS/Hw/pWPk2uKrNXQqg9Z959Kz+IYDd5p3w==

"@types/node@^10.5.6":
version "10.14.18"
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.14.18.tgz#b7d45fc950e6ffd7edc685e890d13aa7b8535dce"
@@ -22,10 +17,10 @@ minimist@0.0.8:
resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d"
integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=

minimist@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284"
integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=
minimist@^1.2.0, minimist@^1.2.3:
version "1.2.3"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.3.tgz#3db5c0765545ab8637be71f333a104a965a9ca3f"
integrity sha512-+bMdgqjMN/Z77a6NlY/I3U5LlRDbnmaAk6lDveAPKwSpcPM4tKAuYsvYF8xjhOPXhOYGe/73vVLVez5PW+jqhw==

mkdirp@^0.5.1:
version "0.5.1"
8 changes: 3 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tsickle",
"version": "0.37.1",
"version": "0.39.0",
"description": "Transpile TypeScript code to JavaScript with Closure annotations.",
"main": "src/tsickle.js",
"typings": "src/tsickle.d.ts",
@@ -21,21 +21,19 @@
"@types/glob": "5.0.35",
"@types/jasmine": "2.8.8",
"@types/node": "^10.5.6",
"clang-format": "^1.2.4",
"diff-match-patch": "^1.0.1",
"glob": "7.1.2",
"google-closure-compiler": "^20190929.0.0",
"jasmine": "3.1.0",
"prettier": "1.14.0",
"source-map": "^0.7.3",
"source-map-support": "^0.5.6",
"tslib": "1.11",
"tslint": "5.11.0",
"typescript": "3.8.2"
"typescript": "3.9"
},
"scripts": {
"build": "bazel build //:npm_package",
"lint": "node check_format.js && tslint -c tslint.json -p tsconfig.json",
"lint": "tslint -c tslint.json -p tsconfig.json",
"test": "yarn lint && bazel test ..."
},
"repository": {
3 changes: 3 additions & 0 deletions src/closure_externs.js
Original file line number Diff line number Diff line change
@@ -112,3 +112,6 @@ function CanvasDrawImage() {}
function CryptoKey() {};
/** @constructor */
function CryptoKeyPair() {};

/** @typedef {!{handleEvent: function(Event):void}} */
var EventListenerObject;
22 changes: 14 additions & 8 deletions src/fileoverview_comment_transformer.ts
Original file line number Diff line number Diff line change
@@ -62,24 +62,30 @@ function augmentFileoverviewComments(
}

// Ensure our suppressions are included in the @suppress tag:
// 1) Suppress checkTypes. We believe the code has already been type-checked by TypeScript,
// and we cannot model all the TypeScript type decisions in Closure syntax.
// * Suppress checkTypes. We believe the code has already been type-checked
// by TypeScript, and we cannot model all the TypeScript type decisions in
// Closure syntax.
suppressions.add('checkTypes');
// 2) Suppress extraRequire. We remove extra requires at the TypeScript level, so any require
// that gets to the JS level is a load-bearing require.
// * Suppress extraRequire. We remove extra requires at the TypeScript level,
// so any require that gets to the JS level is a load-bearing require.
suppressions.add('extraRequire');
// 3) Suppress uselessCode. We emit an "if (false)" around type declarations,
// * Types references are propagated between files even when they are not
// directly imported. While these are violations of the "missing require"
// rules they are believed to be safe.
suppressions.add('missingRequire');
// * Suppress uselessCode. We emit an "if (false)" around type declarations,
// which is flagged as unused code unless we suppress it.
suppressions.add('uselessCode');
// 4) Suppress some checks for user errors that TS already checks.
// * Suppress some checks for user errors that TS already checks.
suppressions.add('missingReturn');
suppressions.add('unusedPrivateMembers');
// 5) Suppress checking for @override, because TS doesn't model it.
// * Suppress checking for @override, because TS doesn't model it.
suppressions.add('missingOverride');
// 6) Suppress constantProperty checking, which errors when a namespace is
// * Suppress constantProperty checking, which errors when a namespace is
// reopened. Namespace reopening happens when one writes namespace foo {}
// or namespace foo.* {} more than once.
suppressions.add('constantProperty');

suppressTag.type = Array.from(suppressions.values()).sort().join(',');

return tags;
Loading