Skip to content

Commit

Permalink
preset should be Partial<Config>
Browse files Browse the repository at this point in the history
  • Loading branch information
fsubal committed Oct 24, 2023
1 parent dcf4931 commit bc3004a
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import postcssSelectorParser from "postcss-selector-parser";

/**
* @param {string} input
* @param {import('tailwindcss').Config} preset
* @param {Partial<import('tailwindcss').Config>} preset
* @return {Promise<string[]>}
*/
export async function extractClassNames(input, preset) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import preset from "../tailwind.config.js";
import preset from "../preset";
import { extractClassNames } from "../extractClassNames";

const input = `
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// @ts-check

/**
* @type {Partial<import('tailwindcss').Config>}
*/
const preset = {
theme: {
colors: {
blue: {
light: "#85d7ff",
DEFAULT: "#1fb6ff",
dark: "#009eeb",
// ...
},
},
},
plugins: [],
};

module.exports = preset;
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// @ts-check

import { describe, test, expect } from "vitest";

import preset from "../tailwind.config.js";
import preset from "../preset";
import { extractClassNames } from "../extractClassNames";

const input = `
Expand Down

0 comments on commit bc3004a

Please sign in to comment.