-
Notifications
You must be signed in to change notification settings - Fork 666
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
Add shapes and font options types #650
Add shapes and font options types #650
Conversation
@@ -302,7 +302,6 @@ export interface ITableOptions extends PositionOptions { | |||
colspan?: number | |||
colW?: number | number[] | |||
fill?: Color | |||
fontSize?: number |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason for this PR was to try and prevent issues like this. ITableOptions
had the type for fontSize
but not for fontFamily
. I am thinking of doing this type of refactor in more places in order for shared types to be consistent. Thoughts @gitbrent ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cronin4392 - Perfect, this is much needed
@@ -23,6 +23,10 @@ export type ShapeFill = Color | { type: string; color: Color; alpha?: number } | |||
export type BkgdOpts = { src?: string; path?: string; data?: string } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gitbrent would you mind explaining your thinking behind having both core-*.ts
files as well as types/index.d.ts
? My assumption is that a goal would be to get rid of one of these files and have types coming from one place?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dug in a bit more and noticed that tsconfig.js
has declarationDir
set (https://github.com/gitbrent/PptxGenJS/blob/master/tsconfig.json#L4).
I think that is supposed to output a types definition file when ts compiles which would mean the types/index.d.ts
would not be needed. Will look into why that file is not being created in the out
directory any longer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gitbrent I haven't had a chance yet to track down the delcarationDir
issues. I think I could look into generating the types once in another PR.
ec2fcb5
to
ab4ae72
Compare
ab4ae72
to
4a54267
Compare
@cronin4392 - thanks for the patch and the research. AFAIK, only an |
Thanks @cronin4392 ! |
…ions-types Add shapes and font options types
No description provided.