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
Using RawAxiosRequestHeaders cause compiler error #6369
Comments
Faced same issue and made PR for fix this. MAYBE this issue related with tsconfig options, so I just want to paste my reproducible tsconfig options here: {
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Next.js",
"compilerOptions": {
"allowJs": true,
"skipLibCheck": true,
"strict": false,
"declaration": true,
"esModuleInterop": true,
"moduleResolution": "node",
"resolveJsonModule": true,
"forceConsistentCasingInFileNames": false,
"isolatedModules": true,
"experimentalDecorators": true,
"incremental": true,
"noEmit": true,
"target": "es5",
"lib": ["dom", "dom.iterable", "es2021"],
"module": "esnext",
"jsx": "preserve",
"jsxImportSource": "@emotion/react",
"typeRoots": ["./node_modules/@types", "./@types"]
}
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
I need to create a proper type for axios headers object
I have followed #5476 this one - so I can't use AxiosRequestHeaders.
I believe I need to use RawAxiosRequestHeaders. But in case i need to use this type as a generic argument, for example, with
React.createContext
- it cause compiler errorI guess it's because interface
RawAxiosHeaders
is declared locally.To Reproduce
No response
Code snippet
No response
Expected behavior
No response
Axios Version
No response
Adapter Version
No response
Browser
No response
Browser Version
No response
Node.js Version
No response
OS
No response
Additional Library Versions
No response
Additional context/Screenshots
No response
The text was updated successfully, but these errors were encountered: