elastic/search-ui

Any plan to add correct typing?

giovanniincammicia opened this issue · 1 comments

Hi, I was wondering if there was any plan to add correct typescript definitions to the library.
At the moment, most of the types are incomplete or contain "any" (which is the same as a missing type).

One example from the library:

import PropTypes from "prop-types";
declare function WithSearch({ mapContextToProps, children }: {
    mapContextToProps: any;
    children: any;
}): JSX.Element;
declare namespace WithSearch {
    var propTypes: {
        mapContextToProps: PropTypes.Requireable<(...args: any[]) => any>;
        children: PropTypes.Validator<(...args: any[]) => any>;
    };
}
export default WithSearch;

This is the definition of "WithSearch", there's no way to know what Context contains (and have autocomplete on the properties), what Props should contain, what's the shape of children (which is a render prop that gets in input the same type defined as the return of mapContextToProps).

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Is this issue still important to you? If so, please leave a comment and let us know. As always, thank you for your contributions.