getters setters and other enhancement to typescript definitions#57
getters setters and other enhancement to typescript definitions#57
Conversation
|
Unfortunately, clang-format doesn't really work well with typescript |
…ers' into mapped-getters-setters
Mapped getters setters fixup
…libui-napi into mapped-getters-setters
Use tsc instead of tslint
…libui-napi into mapped-getters-setters
Fix matrix typings
| /** | ||
| * Create a new UiControl object. | ||
| */ | ||
| constructor(handle: any); |
There was a problem hiding this comment.
This is the last remaining "private/internal" constructor that should be removed from the public API definition
There was a problem hiding this comment.
Why you said constructor? Anyway, I never exactly understand how that could be used, apart for read. Do you never try to set toplevel=false on a toplevel control?
There was a problem hiding this comment.
No 😄 , I meant this part:
Lines 354 to 357 in dade525
There was a problem hiding this comment.
Ah, sure! I guess it should be protected?
There was a problem hiding this comment.
I would just remove it, because libui-napi (js/*.js) itself isn't typechecked. This is just the public API.
There was a problem hiding this comment.
And toplevel is just a getter, so it should be readonly: (the documentation is wrong as well)
Lines 36 to 42 in 5e32314
There was a problem hiding this comment.
That explains my previous doubt on its being writable 😊
tslintpackage to lint typescript defs file.While doing these changes, I also find some error in type of properties that I'm going to fix with further commits here.