Commit Graph

111 Commits

Author SHA1 Message Date
Russell Bicknell
05878b673c Merge pull request #5649 from Polymer/compiler-warnings
Fix a couple more compiler warnings
2020-04-28 14:32:28 -07:00
Peter Burns
ad2bca189f Fix a couple more compiler warnings
Fixes warnings in some internal builds.
2020-04-27 10:21:48 -07:00
Russell Bicknell
0da4e63f26 Remove unused externs. 2020-03-26 13:38:47 -07:00
Steven Orvell
a55e6f039e Merge branch 'master' into legacy-undefined-noBatch-update 2020-01-13 13:40:39 -08:00
Steven Orvell
15ce881fda FIx closure annotation
Closure was unhappy with the change from `var` to `let` so reverting it.
2020-01-13 11:18:01 -08:00
Steven Orvell
943905fb8e Merge branch 'master' into legacy-undefined-noBatch-sync 2020-01-10 10:46:17 -08:00
Steven Orvell
41df9a591b Update externs. 2019-12-19 16:55:05 -08:00
Steven Orvell
3c128fa25e Update extern format. 2019-12-19 16:25:44 -08:00
Steven Orvell
957c8c4d25 Address review feedback. 2019-12-19 15:32:40 -08:00
Peter Burns
15747c832c Add node field to PolymerDomApi
And keep DomApiNative type compatible with PolymerDomApi.

Upstreaming cl/275091781
2019-10-17 23:56:22 -07:00
Peter Burns
4274bcecaa Improve types for the template field on Polymer elements. (#5596)
null is allowed!
2019-10-14 19:57:51 -07:00
Kevin Schaaf
5d130faef2 Update polymer externs for new settings. 2019-10-11 11:52:37 -07:00
Kevin Schaaf
7fa78973fa Add missing externs for global settings. 2019-09-20 10:53:50 -07:00
Russell Bicknell
5d6f34f5b1 Remove unused TemplateInfo properties from types. 2019-08-27 17:25:00 -07:00
Russell Bicknell
9385436491 Add other used TemplateInfo property types. 2019-08-27 17:11:16 -07:00
Russell Bicknell
2697cf10b6 Add type for TemplateInfo#parent. 2019-08-27 16:55:04 -07:00
Daniel Freedman
a9c756e8a5 Merge branch 'master' into legacy-undefined-noBatch 2019-07-30 21:31:16 -07:00
Peter Burns
69ee4688af Add additional externs (#5575)
Upstreaming cl/259031976
2019-07-19 18:13:36 -07:00
Kevin Schaaf
42dd361f94 Fix closure issues 2019-03-07 18:12:26 -08:00
Daniel Freedman
2ed3bfac0e Add more externs
Add legacyWarnings and legacyNotifyOrder to externs
2019-02-20 20:03:44 -08:00
Daniel Freedman
cc7d4cc834 Add legacyUndefined and legacyNoBatch to externs 2019-02-20 17:04:01 -08:00
Daniel Freedman
e35a1a7cfc Update externs from internal 2019-02-07 11:45:13 -08:00
Kevin Schaaf
19dd467450 Merge branch 'strict-no-warnings' into sync-externs 2019-02-05 12:02:35 -08:00
Kevin Schaaf
77ac3ec2b4 Merge branch 'master' into strict-no-warnings 2019-02-05 11:56:53 -08:00
Peter Burns
7745d431ac Externs should use var instead of let
Multiple externs may declare the same symbol and that's ok. That doesn't work if an extern is declared with `let` instead of `var`, you get errors like: Duplicate let / const / class / function declaration in the same scope is not allowed.
2019-01-14 16:52:20 -08:00
Peter Burns
566dcfaefe Get Polymer compiling clean under closure recommended flags
With these changes we have zero errors and zero warnings with `RECOMMENDED_FLAGS`!

Most of the changes were adding `@override` for methods and properties in mixins. Apparently if you implement an interface you need to say `@override` for each method or property on the interface. This combines with our mixin strategy to the tune of needing to add `@override` on every non-private method and property.

I'm not sure this is intended behavior of the compiler. Filed https://github.com/google/closure-compiler/issues/3137 to see if it is.
2018-11-04 13:29:04 -08:00
Alexander Marks
b8e3002162 Hybrid compatibility for PolymerDomApi and Polymer.Iconset types.
Polymer V1 applications are compiled with hand-written externs at
https://github.com/google/closure-compiler/blob/master/contrib/externs/polymer-1.0.js.
These externs contain some types that do not exist in the V2 code.

PolymerDomApi is the type returned by the V1 Polymer.dom API, but in V2
it returns Polymer.DomApi. This adds the PolymerDomApi interface to the
V2 externs, and annotates that Polymer.DomApi implements it. This allows
both V1 and V2 code to use the PolymerDomApi type. Similar story for
PolymerDomApi.ObserveCallback.

Polymer.Iconset would ideally live in the iron-iconset repo, but many
packages reference the type without actually depending on that library,
so its simpler to just include it here, similar to how it worked for
Polymer V1.
2018-10-31 14:55:54 -07:00
Peter Burns
0492390b4e Add beforeRegister callback to externs 2018-10-23 09:50:50 -07:00
Tim van der Lippe
9dbc87284d Update gen-closure-declarations to 0.5.0 (#5360)
* Update gen-closure-declarations to 0.5.0

This fixes the externs generation for our modules

* Generate closure types before publishing

* Actually remove closure-types.js from git

* Remove HTML Imports from webcomponents externs

* Add back externs/polymer-externs.js
2018-09-18 21:05:19 +01:00
Kevin Schaaf
83834aff18 Upstream changes to externs 2018-08-28 14:48:13 -04:00
Kevin Schaaf
438c8c40bc Merge pull request #5310 from simonfuhrmann/master
Upstream externs changes for DomRepeatEvent
2018-08-15 10:20:53 -07:00
Alexander Marks
6847cf4791 Make Polymer gestures library safe for Closure property renaming (take 2). (#5314)
Make Polymer gestures library safe for Closure property renaming.

The issue here was that we were assuming that the method for a given
gesture would always match the string name of that gesture, e.g. that if
the gesture name was "mousedown" that we could call
gestureDefinition.mousedown. In actuality, gestureDefinition.mousedown
could be renamed by Closure, which would throw with "undefined is not a
function".

The fix is to move the GesturesRecognizer type into our externs, which
prevents those methods from being renamed.
2018-08-02 14:58:07 -07:00
Simon Fuhrmann
e3b9d4e6a3 Upstream externs changes for DomRepeatEvent 2018-07-30 11:06:33 -07:00
Alexander Marks
536030acfa Generate typings for Polymer 3.
- Publishing (actually packing) will now generate the typings and fail
  if they don't compile.
- Travis will now generate the typings and fail if they don't compile.
- Some minor tweaks to get typings compiling.
2018-07-26 18:28:22 -07:00
Alexander Marks
ac6011e0e4 Revert Promise<void> changes. 2018-07-26 18:06:52 -07:00
Alexander Marks
8b1e793470 Restore some externs. 2018-07-26 16:21:37 -07:00
Alexander Marks
3b8171922f Upstream a bunch of g3 changes. 2018-07-26 16:15:32 -07:00
Daniel Freedman
4f0337a5da Fix gulp 4 issues 2018-07-18 12:06:56 -07:00
Daniel Freedman
3c23d673ca Closure extern update 2018-04-11 12:17:09 -07:00
Tim van der Lippe
8d97d1311e Merge branch 'master' into rewrite-expression-parser 2018-03-31 15:52:33 +02:00
Peter Burns
5357d64aef Update types. 2018-03-30 15:59:57 -07:00
Tim van der Lippe
211c223fb9 Update docs and types 2018-02-25 16:13:16 +01:00
Daniel Freedman
2d674e75b1 update types 2018-02-21 14:11:51 -08:00
Daniel Freedman
8f8135b2de fix typings 2018-02-21 12:52:00 -08:00
Daniel Freedman
7e74e363ff Ensure DisableUpgradeMixin extends PropertiesMixin 2018-02-21 12:45:18 -08:00
Steven Orvell
5bc45ce390 update types 2018-02-21 10:28:07 -08:00
Steven Orvell
5607a2d8c3 Lint and type fixes 2018-02-06 14:48:36 -08:00
Mike Samuel
b52ab81dff Added Polymer.version to polymer-externs (#5079) 2018-01-31 12:31:18 -08:00
Steven Orvell
5521e43e69 update types 2018-01-30 15:19:58 -08:00
James Garbutt
589684a5a4 add void return type annotations (#5000)
* add void return type annotations

* define dom api prototype members as functions

* fix renderstatus optional parameters

* fix style-gatherer types

* fix templatize types

* fix event listener remove types

* use generics in mixinBehaviors

* update gen-typescript-declarations

* add memberof annotation to domapi methods

* add domapi types

* move dom methods to correct place

* use parameterless NodeList for the dom API
2018-01-09 15:10:12 -08:00