Skip to content

Commit cdc88fa

Browse files
committed
Merge pull request #24 from Microsoft/i3583
Overwrite return types for HTMLTableElement, HTMLTableSectionElement, and HTMLTableRowElement methods
2 parents 3a5e566 + f82dbe2 commit cdc88fa

File tree

2 files changed

+49
-7
lines changed

2 files changed

+49
-7
lines changed

baselines/dom.generated.d.ts

+7-7
Original file line numberDiff line numberDiff line change
@@ -6422,19 +6422,19 @@ interface HTMLTableElement extends HTMLElement {
64226422
/**
64236423
* Creates an empty caption element in the table.
64246424
*/
6425-
createCaption(): HTMLElement;
6425+
createCaption(): HTMLTableCaptionElement;
64266426
/**
64276427
* Creates an empty tBody element in the table.
64286428
*/
6429-
createTBody(): HTMLElement;
6429+
createTBody(): HTMLTableSectionElement;
64306430
/**
64316431
* Creates an empty tFoot element in the table.
64326432
*/
6433-
createTFoot(): HTMLElement;
6433+
createTFoot(): HTMLTableSectionElement;
64346434
/**
64356435
* Returns the tHead element object if successful, or null otherwise.
64366436
*/
6437-
createTHead(): HTMLElement;
6437+
createTHead(): HTMLTableSectionElement;
64386438
/**
64396439
* Deletes the caption element and its contents from the table.
64406440
*/
@@ -6456,7 +6456,7 @@ interface HTMLTableElement extends HTMLElement {
64566456
* Creates a new row (tr) in the table, and adds the row to the rows collection.
64576457
* @param index Number that specifies where to insert the row in the rows collection. The default value is -1, which appends the new row to the end of the rows collection.
64586458
*/
6459-
insertRow(index?: number): HTMLElement;
6459+
insertRow(index?: number): HTMLTableRowElement;
64606460
}
64616461

64626462
declare var HTMLTableElement: {
@@ -6507,7 +6507,7 @@ interface HTMLTableRowElement extends HTMLElement, HTMLTableAlignment {
65076507
* Creates a new cell in the table row, and adds the cell to the cells collection.
65086508
* @param index Number that specifies where to insert the cell in the tr. The default value is -1, which appends the new cell to the end of the cells collection.
65096509
*/
6510-
insertCell(index?: number): HTMLElement;
6510+
insertCell(index?: number): HTMLTableCellElement;
65116511
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
65126512
}
65136513

@@ -6534,7 +6534,7 @@ interface HTMLTableSectionElement extends HTMLElement, HTMLTableAlignment {
65346534
* Creates a new row (tr) in the table, and adds the row to the rows collection.
65356535
* @param index Number that specifies where to insert the row in the rows collection. The default value is -1, which appends the new row to the end of the rows collection.
65366536
*/
6537-
insertRow(index?: number): HTMLElement;
6537+
insertRow(index?: number): HTMLTableRowElement;
65386538
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
65396539
}
65406540

inputfiles/overridingTypes.json

+42
Original file line numberDiff line numberDiff line change
@@ -217,5 +217,47 @@
217217
"interface": "ImageData",
218218
"name": "data",
219219
"type": "Uint8ClampedArray"
220+
},
221+
{
222+
"kind": "method",
223+
"interface": "HTMLTableElement",
224+
"name": "insertRow",
225+
"signatures": ["insertRow(index?: number): HTMLTableRowElement"]
226+
},
227+
{
228+
"kind": "method",
229+
"interface": "HTMLTableElement",
230+
"name": "createTHead",
231+
"signatures": ["createTHead(): HTMLTableSectionElement"]
232+
},
233+
{
234+
"kind": "method",
235+
"interface": "HTMLTableElement",
236+
"name": "createTBody",
237+
"signatures": ["createTBody(): HTMLTableSectionElement"]
238+
},
239+
{
240+
"kind": "method",
241+
"interface": "HTMLTableElement",
242+
"name": "createTFoot",
243+
"signatures": ["createTFoot(): HTMLTableSectionElement"]
244+
},
245+
{
246+
"kind": "method",
247+
"interface": "HTMLTableElement",
248+
"name": "createCaption",
249+
"signatures": ["createCaption(): HTMLTableCaptionElement"]
250+
},
251+
{
252+
"kind": "method",
253+
"interface": "HTMLTableSectionElement",
254+
"name": "insertRow",
255+
"signatures": ["insertRow(index?: number): HTMLTableRowElement"]
256+
},
257+
{
258+
"kind": "method",
259+
"interface": "HTMLTableRowElement",
260+
"name": "insertCell",
261+
"signatures": ["insertCell(index?: number): HTMLTableCellElement"]
220262
}
221263
]

0 commit comments

Comments
 (0)