We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Is there any type of definition for the promise returned?
for example
componentDidMount() { this.props.loadCategories().then(res => { // what is the type of res }) }
I wanna represent the res with a typescript interface, so I came up with the following representation
res
/** * Describes the returned object of axios middleware action creators */ export interface IAxiosAction<TData = any> { type: string payload: { request: { client: string method: string url: string } } } /** * Describes the returned object of axios middleware calls */ export interface IAxiosResult<TData = any> { type: string payload: { config: IAxiosRequestConfig data: TData headers: { [key: string]: string } request: XMLHttpRequest status: number statusText: string } meta: { previousAction: IAxiosAction<TData> } } /** * Describes request config object of axios calls */ export interface IAxiosRequestConfig<TData = any> { adapter: any baseURL: string client: string data?: TData headers: { [key: string]: string } maxContentLength: number method: string reduxSourceAction: IAxiosAction<TData> responseType: string timeout: number transformRequest: any transformResponse: any url: string validateStatus: any xsrfCookieName: string xsrfHeaderName: string }
Are the interfaces above really describes the res object? if so are you open to add .d.ts definition files to your source code?
.d.ts
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Is there any type of definition for the promise returned?
for example
I wanna represent the
res
with a typescript interface, so I came up with the following representationAre the interfaces above really describes the
res
object? if so are you open to add.d.ts
definition files to your source code?The text was updated successfully, but these errors were encountered: