Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refine typing for Column #1488

Merged
merged 1 commit into from
Oct 5, 2020
Merged

Refine typing for Column #1488

merged 1 commit into from
Oct 5, 2020

Conversation

nywleswoey
Copy link

Summary

This PR is to refine the type definition for Column. This should resolve #1120

Test plan

I derived this by looking at column.js. Then I replaced index.d.ts in node_modules/exceljs with my changes and the typescript issue from #1120 went away.

_header, _key and width are dependent on defn and therefore may
be undefined.

Add comment for properties that are dependent on style. Since style will
be set to an empty object when defn is not provided, these properties
may be undefined as well.

Change references of Partial<Column> to Column since the undefined
properties are directly handled inside the Column type definition.
@alubbe alubbe requested a review from Siemienik October 5, 2020 06:48
Copy link
Member

@Siemienik Siemienik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@alubbe alubbe merged commit a682091 into exceljs:master Oct 5, 2020
@paliwalgaurav
Copy link

Partial column thing should be there because now it's giving error. I don't want to define outlineLevel
Screenshot 2021-02-01 at 7 25 32 PM

@nywleswoey
Copy link
Author

Fixed by Hesamp in 4e38ad8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Typescript error from getColumn.eachCell
4 participants