Skip to content

Commit cd15d8f

Browse files
committed
chore: add missing example to constrain the type
1 parent 727687b commit cd15d8f

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
* [Install package](#install-package)
2323
* [Import and use](#import-and-use)
2424
* [Notes](#notes)
25-
* [Sheets type inference constraint / limitation](#sheets-type-inference-constraint--limitation)
25+
* [Sheets type inference constraining / limitation](#sheets-type-inference-constraining--limitation)
2626
* [Fork notice and credit](#fork-notice-and-credit)
2727
* [License](#license)
2828

@@ -96,7 +96,7 @@ browserDownloadFile(new File([ssData], 'fileName.ext'))
9696

9797
## Notes
9898

99-
### Sheets type inference constraint / limitation
99+
### Sheets type inference constraining / limitation
100100

101101
If you use multiple sheets, or you want to constraint the type of the sheet, follow this example:
102102
```ts
@@ -113,7 +113,8 @@ const workbook = constructWorkbook<any>(
113113
['What', 'what'],
114114
],
115115
}),
116-
defineJsonSheet({
116+
// Constrain the type of the sheet to `string` content
117+
defineJsonSheet<string>({
117118
sheet: 'Sheet2',
118119
content: [
119120
'{"encoded":"sample"}',

0 commit comments

Comments
 (0)