@ttsc/banner
v0.15.1
Published
First-party ttsc plugin that adds package-documentation JSDoc banners during emit.
Readme
@ttsc/banner

@ttsc/banner adds a fixed @packageDocumentation JSDoc banner to the output.
Setup
Install ttsc and TypeScript-Go, then the banner plugin:
npm install -D ttsc @typescript/native-preview
npm install -D @ttsc/bannerRegister the plugin in your tsconfig.json:
// tsconfig.json
{
"compilerOptions": {
"plugins": [
{ "transform": "@ttsc/banner" }
]
}
}Drop a banner.config.ts next to your tsconfig.json:
// banner.config.ts
import type { ITtscBannerConfig } from "@ttsc/banner";
export default {
text: "License MIT (c) 2026 Acme",
} satisfies ITtscBannerConfig;A banner.config.* file always exports an object with a text string.
Run your normal ttsc command:
npx ttscIf @ttsc/banner is installed and no banner.config.* file is found, the compile fails.
Configuration
@ttsc/banner discovers its config by walking upward from the tsconfig directory, looking for banner.config.{ts,cts,mts,js,cjs,mjs,json}.
To point at a specific file instead of using auto-discovery, set configFile on the tsconfig entry:
// tsconfig.json
{
"compilerOptions": {
"plugins": [
{ "transform": "@ttsc/banner", "configFile": "./config/banner.config.ts" }
]
}
}The plugin formats every line of the resolved text inside a JSDoc block and appends @packageDocumentation.
The banner follows TypeScript's normal comment emit policy, so removeComments: true removes it.
Sponsors
Thanks for your support.
Your donation encourages ttsc development.
