-
Notifications
You must be signed in to change notification settings - Fork 17
Add typescript support for search results #530
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
Conversation
import { JSONObject } from '../../utils/interfaces'; | ||
|
||
class SpecificationsSearchResult extends SearchResultBase { | ||
export class SpecificationsSearchResult extends SearchResultBase<JSONObject> { |
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 know I should have created a proper Specification
interface but I'm lazy to do it since I doubt someone is using this and we need a refactor of this module.
The JSONObject
type works like a POJO
Codecov Report
@@ Coverage Diff @@
## 7-dev #530 +/- ##
========================================
Coverage ? 91.18%
========================================
Files ? 32
Lines ? 1395
Branches ? 133
========================================
Hits ? 1272
Misses ? 98
Partials ? 25
Continue to review full report at Codecov.
|
this._scrollAction = 'scroll'; | ||
Reflect.defineProperty(this, '_controller', { | ||
value: request.controller, | ||
writable: true |
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 are these writable?
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.
Because in the SpecificationSearchResult
class we overload the controller with collection
# [7.4.0](https://github.com/kuzzleio/sdk-javascript/releases/tag/7.4.0) (2020-08-18) #### New features - [ [#542](#542) ] Finalize typescript support ([Aschen](https://github.com/Aschen)) - [ [#529](#529) ] Add typescript support for protocols ([Aschen](https://github.com/Aschen)) #### Enhancements - [ [#541](#541) ] Add meaningful stacktrace ([Aschen](https://github.com/Aschen)) - [ [#537](#537) ] Add typescript support realtime ([Aschen](https://github.com/Aschen)) - [ [#531](#531) ] Add typescript support for Index and Collection controllers ([Aschen](https://github.com/Aschen)) - [ [#530](#530) ] Add typescript support for search results ([Aschen](https://github.com/Aschen)) - [ [#523](#523) ] Add support for the collection:delete API action ([morgandruesne](https://github.com/morgandruesne)) ---
What does this PR do?
Adds Typescript support for SearchResult classes