@obuild/plugin-tsc-dts
v0.0.2
Published
tsc declarations plugin for obuild
Readme
📦 @obuild/plugin-tsc-dts 😯
TS declarations emit for obuild.
This plugin uses TypeScript's tsc to generate declaration files (.d.mts and .d.ts) for your TypeScript code. It is designed to work seamlessly with the obuild build system, allowing you to easily generate type definitions for your projects.
Usage
Import the plugin in your build configuration and add it to the plugins array. You can also configure it with options.
import { defineBuildConfig } from "obuild/config";
import { tscDts } from "@obuild/plugin-tsc-dts";
import { oxcTransform } from "@obuild/plugin-oxc-transform";
export default defineBuildConfig({
entries: [
{
type: "transform",
input: "./src/runtime/",
outDir: "./dist/runtime/",
plugins: [
tscDts({
// Configuration options
}),
oxcTransform(), // Optional: Use oxc-transform to transform the TS(X) files to JS
],
},
],
});Options
The following interface describes the options you can pass to the plugin:
import type { Compiler } from "./tsc.ts";
import type { Extensions, OutputExtension } from "./config.ts";
export interface TscDtsPluginOptions {
/** Default extension to use */
defaultExtension?: OutputExtension;
/** Extensions to process for declaration files. */
extensions?: Extensions;
/**
* Which compiler to use for generating declaration files.
*
* @defaulValue tsc
*/
compiler?: Compiler;
}License
💛 Released under the MIT license.
🤖 auto updated with automd
