Skip to content

defineOptions

defineOptions has been removed in 0.2.0. Here is how to migrate:

my-integration/index.ts
import { defineIntegration, defineOptions } from "astro-integration-kit";
import { defineIntegration } from "astro-integration-kit";
import { z } from "astro/zod";
type Options = {
/**
* A comment
*
* @default `"bar"`
*/
foo?: string | undefined;
}
export default defineIntegration({
// ...
options: defineOptions<Options>({ foo: "bar" }),
optionsSchema: z.object({
/**
* A comment
*
* @default `"bar"`
*/
foo: z.string().optional().default("bar"),
}),
})