rollup-plugin-ts

  • Version 3.4.5
  • Published
  • 2.9 MB
  • 10 dependencies
  • MIT license

Install

npm i rollup-plugin-ts
yarn add rollup-plugin-ts
pnpm add 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 TypescriptPluginOptions

                              interface TypescriptPluginOptions {}

                                property babelConfig

                                babelConfig?: string | Partial<BabelConfig>;

                                  property browserslist

                                  browserslist?: false | string[] | string | BrowserslistConfig;

                                    property cwd

                                    cwd: string;

                                      property debug

                                      debug: boolean | DebugOptionCallback;

                                        property exclude

                                        exclude: string[] | string;

                                          property fileSystem

                                          fileSystem: TS.System;

                                            property hook

                                            hook: Partial<HookRecord>;

                                              property include

                                              include: string[] | string;

                                                property swcConfig

                                                swcConfig?: string | MaybeArray<Partial<SwcConfig>>;

                                                  property transformers

                                                  transformers?:
                                                  | (TS.CustomTransformers | CustomTransformersFunction)[]
                                                  | TS.CustomTransformers
                                                  | CustomTransformersFunction;

                                                    property transpileOnly

                                                    transpileOnly?: boolean;

                                                      property transpiler

                                                      transpiler: Transpiler | TranspilerOptions;

                                                        property tsconfig

                                                        tsconfig?:
                                                        | string
                                                        | Partial<TS.CompilerOptions>
                                                        | Partial<InputCompilerOptions>
                                                        | TS.ParsedCommandLine
                                                        | TsConfigResolver
                                                        | TsConfigResolverWithFileName;

                                                          property typescript

                                                          typescript: typeof TS;

                                                            Type Aliases

                                                            type BrowserslistConfig

                                                            type BrowserslistConfig = BrowserslistPathConfig | BrowserslistQueryConfig;

                                                              type CustomTransformersFunction

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

                                                                type DeclarationStats

                                                                type DeclarationStats = Record<string, DeclarationChunkStats>;

                                                                  Package Files (1)

                                                                  Dependencies (10)

                                                                  Dev Dependencies (61)

                                                                  Peer Dependencies (9)

                                                                  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/rollup-plugin-ts.

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