-
Notifications
You must be signed in to change notification settings - Fork 196
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(wkt): Add TWKB parser WIP #2028
Conversation
@@ -33,7 +33,7 @@ enum WKB { | |||
/** | |||
* Options for encodeWKB | |||
*/ | |||
interface WKBOptions { | |||
type WKBOptions = { |
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.
Is type
better than interface
?
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.
If not better, it is at least less ambiguous. Admittedly I have some baggage from other languages, but to me, interface
is an object oriented concept that is intended to describe (mostly) methods that need to be defined by a class, so I think it looks strange to see interface
used to describe a pure object without any methods.
I suspect interface
is favored in some type script code because of historical reasons (maybe type
was a later addition?)
@@ -20,7 +20,7 @@ import BinaryWriter from './utils/binary-writer'; | |||
* Integer code for geometry type | |||
* Reference: https://en.wikipedia.org/wiki/Well-known_text_representation_of_geometry#Well-known_binary | |||
*/ | |||
enum WKB { | |||
export enum WKB { |
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.
Remove and import from wkb-types
?
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.
Looks like a good start
Code structure looks quite similar to WKB, remaining work, especially on encoder side, should be very similar to what we did for WKB.