I'm encountering an issue while using fetch to call an API in a typescript file. The browser is throwing an error stating that const configInit must be initialized, even though I believe it is already. Any suggestions on how to resolve this? Thank you for your help.
const authHeader = new Headers();
authHeader.append('Authorization', `Bearer ${token}`);
const configInit : RequestInit = {
method: 'GET',
headers: authHeader,
cache: 'default'
};
const configRequest = new Request('/api/econfig', configInit);