Skip to content

lib.d.ts HTMLTableElement, HTMLTableSectionElement, and HTMLTableRowElement #3583

Closed
@kvarekamp

Description

@kvarekamp

A couple of html table related methods in lib.d.ts return HTMLElement, but they could return a more precise type:

  • HTMLTableElement.insertRow should return HTMLTableRowElement instead of HTMLElement
  • HTMLTableElement.createTHead should return HTMLTableSectionElement instead of HTMLElement
  • HTMLTableElement.createTBody should return HTMLTableSectionElement instead of HTMLElement
  • HTMLTableElement.createTFoot should return HTMLTableSectionElement instead of HTMLElement
  • HTMLTableElement.createCaption should return HTMLTableCaptionElement instead of HTMLElement
  • HTMLTableSectionElement.insertRow should return HTMLTableRowElement instead of HTMLElement
  • HTMLTableRowElement.insertCell should return HTMLTableCellElement instead of HTMLElement

Activity

added
SuggestionAn idea for TypeScript
RevisitAn issue worth coming back to
Domain: lib.d.tsThe issue relates to the different libraries shipped with TypeScript
on Jun 20, 2015
self-assigned this
on Jun 20, 2015
added this to the TypeScript 1.6 milestone on Jun 20, 2015
djarekg

djarekg commented on Jun 24, 2015

@djarekg

How about also HTMLTableElement cells and rows property return a new generic type HTMLCollectionOf where cells is HTMLCollectionOf and rows is HTMLCollectionOf. And the HTMLTableRowElement cells property would be HTMLCollectionOf.

modified the milestone: TypeScript 1.6 on Jul 1, 2015
matthewrwilton

matthewrwilton commented on Sep 30, 2015

@matthewrwilton

Seems like this didn't make v1.6. Is it possible to get a milestone update?

assigned and unassigned on Sep 30, 2015
added this to the TypeScript 1.7 milestone on Sep 30, 2015
mhegazy

mhegazy commented on Sep 30, 2015

@mhegazy
Contributor

@zhengbli is working on releasing the script that generates the typings file. it should come out shortly, and with that we should be able to take PRs for features like this one. putting it on @zhengbli for now.

21 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Breaking ChangeWould introduce errors in existing codeBugA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptFixedA PR has been merged for this issue

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @djarekg@zhengbli@matthewrwilton@mhegazy@kvarekamp

        Issue actions

          lib.d.ts HTMLTableElement, HTMLTableSectionElement, and HTMLTableRowElement · Issue #3583 · microsoft/TypeScript