Skip to content

Commit a081694

Browse files
Fix types for getWorksheet() (#2223)
<!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. The two fields below are mandatory. --> ## Summary Fix types for getWorksheet(). It can return undefined ## Test plan N/A ## Related to source code (for typings update) [lib/doc/workbook.js#L143](https://github.com/exceljs/exceljs/blob/master/lib/doc/workbook.js#L143) --------- Co-authored-by: Siemienik Pawel <hi@siemienik.com>
1 parent c228180 commit a081694

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1743,7 +1743,7 @@ export class Workbook {
17431743
/**
17441744
* fetch sheet by name or id
17451745
*/
1746-
getWorksheet(indexOrName: number | string): Worksheet;
1746+
getWorksheet(indexOrName?: number | string): Worksheet | undefined;
17471747

17481748
/**
17491749
* Iterate over all sheets.

0 commit comments

Comments
 (0)