-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(build): Support TypeScript in
core/
(#6220)
* fix(tests): Use tsc-compiled base.js to allow use of goog.js The Closure Compiler complains if you try to feed it a file named goog.js which is not in the same directory as the Closure Library's base.js. Since tsc will "compile" goog.js when it encounters an "import ... from '.../goog.js'", it is necessary to also have tsc "compile" base.js and base_minimal.js, so they will come from the same directory. This necessitates some updates to paths in * docs(build): JSDoc update for JSCOMP_WARNING * refactor(utils): Convert utils/deprecation.js to TypeScript This was done manually for test/proving purposes and might need to be corrected based on what MigranTS generated. * chore(utils): Update utils/deprecation.ts from MigranTS output This manually applies certain changes from BeksOmega's ts/migration2 branch, but notably: - I did not apply the reordering of the doc comments at the top. - I applied the deletion of types and @Package from the JSDoc. - I preserved the import goog and goog.declareModuleId lines. - I have applied a whitespace change on line 37 which violates the styleguide; I want to figure out why clang-format is not fixing this. * feat(build): clang-format .ts files And fix formatting issues introduced by MigranTS in deprecation.ts. * fix(build): Fix sources for advanced compilation test I'm not sure why this didn't fail on my local machine previously; perhaps it succeeded only because of leftover files and would have failed if I'd run npm run clean. * fix(build): Disable checkTypes diagnostic group Unfortunately TSC doesn't output type information in a form that Closure Compiler can understand, so the latter raises errors for situations like omitting an optional parameter. We may have to turn off more diagnostics in future, but for now this is sufficient. * chore(utils): Use @internal where we previously used @Package Per comments on PR #6220. This requires that we disable the nonStandardJsDocs diagnostic.
- Loading branch information
Showing
5 changed files
with
60 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters