I have an axios post that does this
public myFunc(auth: string) {
return axios.post(`${auth_provider_base_url}/access`, {
code: auth
}).then((resp) => resp.data);
}
Which returns a hash (I suppose)
but can I return it as an interface?
interface Iface {
field: string;
}
public myFunc(auth: string): IFace {
return axios.post(`${auth_provider_base_url}/access`, {
code: auth
}).then((resp) => resp.data);
}
Or do I even want to?