-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat(types): Add bounds types #12
Conversation
Pull Request Test Coverage Report for Build 10115209487Details
💛 - Coveralls |
| [[number, number], [number, number]] | ||
| [[number, number, number], [number, number, number]]; | ||
|
||
Any javascript typed array, or any javascript array containing numbers |
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.
JavaScript
seems to be more common that javascript
in our docs
export type Bounds3D = [[number, number, number], [number, number, number]]; | ||
|
||
/** 2 or 3 dimensional bounds [[minX, minY], [maxX, maxY]] or [[minX, minY, minZ], [maxX, maxY, maxZ]] */ | ||
export type Bounds = |
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.
Why not type Bounds = Bounds2D | Bounds3D
?
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.
Why not type Bounds = Bounds2D | Bounds3D?
Yes, this is due to one of my personal preferences. I really like being able to see the actual type definition when I hover over a type in vscode.
By referencing intermediary types, things get obscured and I need to chase down the definition of those types, so if it is easy to type it out I usually do.
But the trend is towards ever more sophisticated typescript types so I am probably on the losing side of history here.
Co-authored-by: felixpalmer <felixpalmer@gmail.com>
For visgl/deck.gl#8933 (comment)