polished
polished copied to clipboard
Typescript Error
-
polished
version: ^4.2.2 -
JSS-in_CSS
library and version: ^5.3.5 - Any relevant JS library and version: Next.js 13.0.3
Mixin/Helper/Shorthand Usage
usage
import { rbga } from 'polished';
const shadeOf = (color: string, opacity: number): string =>
rbga(color, opacity);
export default shadeOf;
tsconfig
{
"compilerOptions": {
"baseUrl": ".",
// Target latest version of ECMAScript.
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
// Process & infer types from .js files.
"allowJs": true,
"skipLibCheck": true,
// Enable strictest settings like strictNullChecks & noImplicityAny.
"strict": true,
"forceConsistentCasingInFileNames": true,
// Don't emit; allow Babel to transform files.
"noEmit": true,
// Import non-ES modules as default imports.
"esModuleInterop": true,
"module": "esnext",
// Search under node_modules for non-relative imports.
"moduleResolution": "node",
"resolveJsonModule": true,
// Disallow features that require cross-file information for emit.
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"paths": {
"@assets/*": ["public/*"],
"@components": ["components"],
"@components/*": ["components/*"],
"@global": ["global"],
"@global/*": ["global/*"],
"@icons/*": ["public/icons/*"]
}
},
"include": ["next-env.d.ts", "styled.d.ts", "**/*.ts", "**/*.tsx"],
"exclude": ["node_modules", "build", "dist", "public", "cache"]
}
What You Are Seeing
"Module '"polished"' has no exported member 'rbga'."
It wont let me upload an image, it has failed 7 times now. There is a red line under the word "rbga" in the import line and shows that message above.
What You Expected To See
No typescript error