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

HTMLElement missing style and innerHTML #26123

Closed
ghost opened this issue Aug 1, 2018 · 1 comment
Closed

HTMLElement missing style and innerHTML #26123

ghost opened this issue Aug 1, 2018 · 1 comment
Assignees
Labels
Bug A bug in TypeScript Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript Fixed A PR has been merged for this issue

Comments

@ghost
Copy link

ghost commented Aug 1, 2018

TypeScript Version: 3.1.0-dev.20180801
(works in 3.1.0-dev.20170731)

Code

function f(h: HTMLElement) {
    h.style;
    h.innerHTML;
}

Expected behavior:

No error.

Actual behavior:

src/a.ts:2:7 - error TS2339: Property 'style' does not exist on type 'HTMLElement'.

2     h.style;
        ~~~~~

src/a.ts:3:7 - error TS2339: Property 'innerHTML' does not exist on type 'HTMLElement'.

3     h.innerHTML;

Think this was broken by #25944 (CC @mhegazy).

Affects these DefinitelyTyped packages: ace, clamp-js, countdown, devexpress-web, domurl, dygraphs, fabric, fetch-jsonp, gapi.auth2, gapi.calendar, gapi.drive, gapi.people, google-earth, heremaps, highcharts, humane, jasmine/v1, jest/v16, jquery, jsurl, knockout.deferred.updates, mainloop.js, mapbox, mermaid, microsoft-ajax, modernizr, nightmare, nvd3, page, phonegap, phonon, photonui, photoswipe, pkijs, plupload, puppeteer, qunit/v1, raphael, safari-extension, safari-extension-content, scrollreveal, scroller, sharepoint, simplemde, skatejs, slickgrid, sortablejs, stripe-v3, swipeview, three, tingle.js, to-markdown, viewporter, ydn-db, zeroclipboard

@ghost ghost added the Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript label Aug 1, 2018
@ghost ghost changed the title HTMLElement mssing style and innerHTML HTMLElement missing style and innerHTML Aug 1, 2018
@ghost ghost mentioned this issue Aug 1, 2018
@RyanCavanaugh RyanCavanaugh added the Bug A bug in TypeScript label Aug 1, 2018
@falsandtru
Copy link
Contributor

Also outerHTML.

@mhegazy mhegazy added the Fixed in TSJS repo Fix merged in https://github.com/Microsoft/TSJS-lib-generator, but not ported yet label Aug 2, 2018
@mhegazy mhegazy self-assigned this Aug 2, 2018
@mhegazy mhegazy added this to the TypeScript 3.1 milestone Aug 2, 2018
@mhegazy mhegazy added Domain: Quick Fixes Editor-provided fixes, often called code actions. Fixed A PR has been merged for this issue and removed Domain: Quick Fixes Editor-provided fixes, often called code actions. labels Aug 2, 2018
@mhegazy mhegazy removed the Fixed in TSJS repo Fix merged in https://github.com/Microsoft/TSJS-lib-generator, but not ported yet label Aug 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript Fixed A PR has been merged for this issue
Projects
None yet
Development

No branches or pull requests

3 participants