Merged
Conversation
…ply to the existing `main` file.
…'t already in the JS externs into a local type.
…ire a workaround.
…le) and add `export {};` (force module goal for internal builds).
This was referenced Jul 28, 2021
rictic
approved these changes
Jul 28, 2021
Contributor
rictic
left a comment
There was a problem hiding this comment.
Just some documentation / clarity comments. Please do address, but otherwise LGTM
| @@ -0,0 +1,23 @@ | |||
| /** | |||
| * @externs | |||
Contributor
There was a problem hiding this comment.
here and elsewhere: I don't think this file should be marked as @externs. In the internal bazel rules, a ts_declaration() automatically produces externs
| @@ -0,0 +1,84 @@ | |||
| /** | |||
| * @externs | |||
| @@ -0,0 +1,57 @@ | |||
| /** | |||
| * @externs | |||
| @@ -0,0 +1,71 @@ | |||
| /** | |||
| * @externs | |||
packages/shadycss/src/env.d.ts
Outdated
| @@ -0,0 +1,31 @@ | |||
| /** | |||
| * @externs | |||
| @@ -0,0 +1,37 @@ | |||
| /** | |||
| * @externs | |||
packages/shadydom/src/env.d.ts
Outdated
| @@ -0,0 +1,60 @@ | |||
| /** | |||
| * @externs | |||
| @@ -0,0 +1,20 @@ | |||
| /** | |||
| * @externs | |||
| * rights grant found at http://polymer.github.io/PATENTS.txt | ||
| */ | ||
|
|
||
| // This file needs to be a module for the declarations to apply globally. |
Contributor
There was a problem hiding this comment.
here and elsewhere: kinda the opposite is the case. declarations in non-modules are global by default
but for consistency and our own sanity, we prefer all files to be modules
Collaborator
Author
There was a problem hiding this comment.
Yeah, this comment doesn't make sense; updated.
| @@ -0,0 +1,19 @@ | |||
| /** | |||
| * @externs | |||
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds externs for released packages in TypeScript's
.d.tsformat.The original JSCompiler types from which these were converted conflate types that are used only within the package to describe internal objects or expand known built-in types for use by the package itself with types that are intended for the user of the package. The new types only expose the package's interface in the externs file and keep those intended for internal use in an
env.d.tsfile in each package's source folder.The TS externs are included in the published packages next to their JSCompiler counterparts, but are not set as the
typesfield because they aren't relevant to some of the packages'mainmodule (i.e. Shady CSS).This PR also generates a new
webcomponents-bundle.d.tsfile next towebcomponents-bundle.js, which bundles all of the individual polyfills' externs.