@wessberg/rollup-plugin-ts

  • Version 2.0.4
  • Published
  • 2.73 MB
  • 10 dependencies
  • MIT license

Install

npm i @wessberg/rollup-plugin-ts
yarn add @wessberg/rollup-plugin-ts
pnpm add @wessberg/rollup-plugin-ts

Overview

A TypeScript Rollup plugin that bundles declarations, respects Browserslists, and enables seamless integration with transpilers such as babel and swc

Index

Functions

function typescriptRollupPlugin

typescriptRollupPlugin: (
pluginInputOptions?: Partial<TypescriptPluginOptions>
) => Plugin;
  • A Rollup plugin that transpiles the given input with Typescript

Interfaces

interface BrowserslistPathConfig

interface BrowserslistPathConfig {}

    property path

    path: string;

      interface BrowserslistQueryConfig

      interface BrowserslistQueryConfig {}

        property query

        query: string[] | string;

          interface CustomTransformerOptions

          interface CustomTransformerOptions {}

            property printer

            printer: TS.Printer;

              property program

              program: TS.Program | undefined;

                property typescript

                typescript: typeof TS;

                  method addDiagnostics

                  addDiagnostics: (...diagnostics: ExtendedDiagnostic[]) => void;

                    interface DeclarationChunkStats

                    interface DeclarationChunkStats {}

                      property externalTypes

                      externalTypes: ExternalType[];

                        interface ExternalType

                        interface ExternalType {}

                          property library

                          library: string;

                            property version

                            version: string;

                              interface TypescriptPluginBabelOptions

                              interface TypescriptPluginBabelOptions extends TypescriptPluginBaseOptions {}

                                property babelConfig

                                babelConfig?: string | Partial<BabelConfig>;

                                  property transpiler

                                  transpiler: 'babel';

                                    interface TypescriptPluginTypescriptOptions

                                    interface TypescriptPluginTypescriptOptions extends TypescriptPluginBaseOptions {}

                                      property transpiler

                                      transpiler: 'typescript';

                                        Type Aliases

                                        type BrowserslistConfig

                                        type BrowserslistConfig = BrowserslistPathConfig | BrowserslistQueryConfig;

                                          type CustomTransformersFunction

                                          type CustomTransformersFunction = (
                                          options: CustomTransformerOptions
                                          ) => TS.CustomTransformers;

                                            type DeclarationStats

                                            type DeclarationStats = Record<string, DeclarationChunkStats>;

                                              type TypescriptPluginOptions

                                              type TypescriptPluginOptions =
                                              | TypescriptPluginTypescriptOptions
                                              | TypescriptPluginBabelOptions
                                              | TypescriptPluginSwcOptions;

                                                Package Files (1)

                                                Dependencies (10)

                                                Dev Dependencies (50)

                                                Peer Dependencies (8)

                                                Badge

                                                To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@wessberg/rollup-plugin-ts.

                                                • Markdown
                                                  [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@wessberg/rollup-plugin-ts)
                                                • HTML
                                                  <a href="https://www.jsdocs.io/package/@wessberg/rollup-plugin-ts"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>