Skip to content

Commit

Permalink
[scoped-custom-element-registry] Port to TypeScript (#561)
Browse files Browse the repository at this point in the history
* Fix eslintignore sync

* Port to TypeScript

* Some non-type changes

* Apply suggestions from code review

Co-authored-by: Russell Bicknell <bicknellr@google.com>

* Add type for form state

* Give explicit types for Maps, Sets, WeakMaps

* Add some comments and readonly markers

* Update deps

* Fix two build issues

Some TypeScripts need resolve explicitly typed, and some closure compiler versions need the `whenDefined` method on our registry ponyfill quoted.

* Add comment about how the main file is a script not a module.

* Minor updates to comments.

---------

Co-authored-by: Russell Bicknell <bicknellr@google.com>
Co-authored-by: Peter Burns <rictic@google.com>
  • Loading branch information
3 people committed May 23, 2024
1 parent 651e207 commit 14abde7
Show file tree
Hide file tree
Showing 10 changed files with 3,131 additions and 1,644 deletions.
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,7 @@ packages/webcomponentsjs/src/unresolved.*
packages/webcomponentsjs/custom-elements-es5-adapter.js
packages/webcomponentsjs/webcomponents-bundle.d.ts
packages/webcomponentsjs/webcomponents-bundle.js*

packages/scoped-custom-element-registry/**/.wireit/
packages/scoped-custom-element-registry/**/.tsbuildinfo
packages/scoped-custom-element-registry/**/build/
3 changes: 3 additions & 0 deletions .eslintignore-sync
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
[local]
.gitignore

[relative]
packages/*/{.gitignore,.eslintignore}
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ packages/webcomponentsjs/webcomponents-bundle.d.ts
packages/webcomponentsjs/webcomponents-bundle.js*

packages/scoped-custom-element-registry/**/.wireit/
packages/scoped-custom-element-registry/**/.tsbuildinfo
packages/scoped-custom-element-registry/**/build/

LICENSE
packages/*/LICENSE.md
Expand Down
2 changes: 2 additions & 0 deletions packages/scoped-custom-element-registry/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
.wireit/
.tsbuildinfo
build/
5 changes: 3 additions & 2 deletions packages/scoped-custom-element-registry/closure-flags.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
--language_in=STABLE
--language_out=ECMASCRIPT5_STRICT
--dependency_mode=PRUNE
--entry_point=./src/scoped-custom-element-registry.js
--js=./src/scoped-custom-element-registry.js
--entry_point=./build/scoped-custom-element-registry.js
--js=./build/scoped-custom-element-registry.js
--js_output_file=./scoped-custom-element-registry.min.js
--output_wrapper="(function(){
%output%
Expand All @@ -14,4 +14,5 @@
--assume_function_wrapper=true
--rewrite_polyfills=false
--create_source_map=./scoped-custom-element-registry.min.js.map
--source_map_input="./build/scoped-custom-element-registry.js|./build/scoped-custom-element-registry.js.map"
--source_map_include_content
Loading

0 comments on commit 14abde7

Please sign in to comment.