-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Missing declaration file for "tailwindcss/resolveConfig" #8920
Comments
For anyone that needs a quick work-around, create a declare module 'tailwindcss/resolveConfig' {
import type { Config } from 'tailwindcss';
declare function resolveConfig(config: Config): Config;
export = resolveConfig;
} |
Hey, I merged in your PR. This will be in our insiders build until we tag a new release (likely tomorrow). Thanks again for the PR! 🎉 |
I am using some utils, would be nice if all of them had types. Here is what I've done to add some. declare module "tailwindcss/src/util/normalizeScreens" {
import {
ResolvableTo,
Screen,
ScreensConfig,
} from "tailwindcss/types/config";
type ScreenDefinition = {
name: string;
values: Screen;
};
export function normalizeScreens(
screens: ResolvableTo<ScreensConfig>
): ScreenDefinition[];
}
declare module "tailwindcss/src/util/buildMediaQuery" {
import { ScreenDefinition } from "tailwindcss/src/util/normalizeScreens";
function buildMediaQuery(screen: ScreenDefinition): string;
export = buildMediaQuery;
} |
@robclancy Those utils are not part of the Tailwind CSS public API so we are not likely to add types for them. |
If it's not part of your public API, why is it on your public documentation? https://tailwindcss.com/docs/configuration#referencing-in-java-script |
@Sidnioulz No they're not. My comment was about |
@thecrypticace aaaand I read too fast. My sincerest apologies! 😱 |
@Sidnioulz All good! |
What version of Tailwind CSS are you using?
For example: v3.1.6
What build tool (or framework if it abstracts the build tool) are you using?
Vite, Typescript
What version of Node.js are you using?
For example: v16.15.1
What browser are you using?
Chrome
What operating system are you using?
Windows 10
Reproduction URL
https://github.com/joshmossas/tailwindcss-resolve-config-missing-types
Describe your issue
When attempting to use the resolveConfig helper in a typescript project you get a type error
Could not find a declaration file for module 'tailwindcss/resolveConfig'
.The text was updated successfully, but these errors were encountered: