[BUG] Type '{ col: number; row: number; }' is missing the following properties from type 'Anchor': nativeCol, nativeColOff, nativeRow, nativeRowOff, and 3 more.
See original GitHub issue🐛 Bug Report
Lib version: 4.2.1
Steps To Reproduce
worksheet.addImage(imageId, {
tl: { col: 0, row: 31 },
br: { col: 15, row: 31 },
});
The expected behaviour:
In TypeScript projects (like my Angular project) will not run if I use the example syntax shown in the README:
I get the following errors and cannot build because the interface requires all properties to be present.
Possible solution (optional, but very helpful):
// You could make those properties optional by putting a `?` before the semicolon defining the properties type to be optional.
export interface Anchor {
nativeCol?: number;
nativeColOff?: number;
nativeRow?: number;
nativeRowOff?: number;
....
}
// Or you could use a Partial of Anchor in the method declaration for `addImage`:
Partial<Anchor>
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:5
Top Results From Across the Web
typesrcript reactjs : is missing the following properties from type
In your interface you've declared dropdownItems as any. Looking at you data it seems dropdownItems is an array of objects containing keys ...
Read more >Row | TanStack Table Docs
These are core options and API properties for all rows. More options and API properties are available for other table features. Row API....
Read more >Merge branch 'master' of https://github.com/exceljs/exceljs ...
All index values in the table are zero based, so the first row number ... this field specifies the path to a file...
Read more >bug type
[BUG] Type '{ col: number; row: number; }' is missing the following properties from type 'Anchor': nativeCol, nativeColOff, nativeRow, nativeRowOff, ...
Read more >exceljs-modify - npm Package Health Analysis - Snyk
A count of the number of rows that have values. If a mid-document row is empty, it will not be included in the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Any updates??
I just overrode the errors and it seems to work fine so it must be an issue with the TS type definitions in this lib.
You can get around this by doing the following, but I couldn’t find an example of this in the documentation: