diff --git a/package.json b/package.json index aa1eeec..d42945c 100644 --- a/package.json +++ b/package.json @@ -48,6 +48,7 @@ }, "devDependencies": { "presetter": "file:../presetter", - "presetter-preset-strict": "file:../preset-strict" + "presetter-preset-strict": "file:../preset-strict", + "type-fest": "^2.0.0" } } diff --git a/source/plugin.ts b/source/plugin.ts index a4b5bf2..9613232 100644 --- a/source/plugin.ts +++ b/source/plugin.ts @@ -16,6 +16,7 @@ import { isDirective } from 'presetter'; import type { ApplyDirective, ImportDirective } from 'presetter'; +import type { JsonObject } from 'type-fest'; /** full configuration about a plugin */ export type PluginConfiguration = @@ -26,10 +27,7 @@ export type PluginConfiguration = export type PluginHeader = string | ApplyDirective; /** options for a plugin */ -export type PluginOptions = - | Record - | ApplyDirective - | ImportDirective; +export type PluginOptions = JsonObject | ApplyDirective | ImportDirective; /** plugin configuration as an object */ export type PluginObject = Record;