Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typescript compilation failing for app-box and app-header #566

Closed
rileyjbauer opened this issue Aug 9, 2018 · 2 comments
Closed

Typescript compilation failing for app-box and app-header #566

rileyjbauer opened this issue Aug 9, 2018 · 2 comments

Comments

@rileyjbauer
Copy link

Description

The app-header and app-box elements fail to be compiled by Typescript (tried 2.6.2 and 3.0.1)

Expected outcome

No compilation errors.

Actual outcome

Compilation fails with the following errors:

bower_components/app-layout/app-box/app-box.d.ts(85,11): error TS2320: Interface 'AppBoxElement' cannot simultaneously extend types 'Element' and 'AppScrollEffectsBehavior'.
  Named property 'scroll' of types 'Element' and 'AppScrollEffectsBehavior' are not identical.
bower_components/app-layout/app-header/app-header.d.ts(213,11): error TS2320: Interface 'AppHeaderElement' cannot simultaneously extend types 'Element' and 'AppScrollEffectsBehavior'.
  Named property 'scroll' of types 'Element' and 'AppScrollEffectsBehavior' are not identical.

Steps to reproduce

  1. Run npm install typescript
  2. Run bower install PolymerElements/app-layout --save
  3. Run tsc

Browsers Affected

N / A

@keanulee
Copy link
Contributor

keanulee commented Aug 9, 2018

cc @aomarks @e111077

I'm not super familiar with TS, but PolymerElements/iron-scroll-target-behavior#41 was supposed to make AppScrollEffectsBehavior.scroll at least compatible with Element.scroll (AppScrollEffectsBehavior includes IronScrollTargetBehavior), though that was to make Closure happy. Basically AppScrollEffectsBehavior.scroll will override Element.scroll.

Ref https://github.com/Polymer/gen-typescript-declarations/issues/79

@keanulee
Copy link
Contributor

npm run generate-types works with TS 3.0.3 (as specified in package-lock.json). There's a separate issue with TS 3.1 that should be fixed with the next Polymer release (PR Polymer/polymer#5372).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants