• Version 11.1.6
  • Published
  • 134 kB
  • 2 dependencies
  • MIT license


npm i @rollup/plugin-typescript
yarn add @rollup/plugin-typescript
pnpm add @rollup/plugin-typescript


Seamless integration between Rollup and TypeScript.



function typescript

typescript: (options?: RollupTypescriptOptions) => Plugin;
  • Seamless integration between Rollup and Typescript.


interface FlexibleCompilerOptions

interface FlexibleCompilerOptions extends CompilerOptions {}

    index signature

    [option: string]: CompilerOptionsValue | TsConfigSourceFile | undefined | any;

      interface ProgramTransformerFactory

      interface ProgramTransformerFactory<T extends TransformerStage> {}

        property type

        type: 'program';

          method factory

          factory: (program: Program) => StagedTransformerFactory<T>;

            interface RollupTypescriptPluginOptions

            interface RollupTypescriptPluginOptions {}

              property cacheDir

              cacheDir?: string;
              • If using incremental this is the folder where the cached files will be created and kept for Typescript incremental compilation.

              property compilerOptions

              compilerOptions?: PartialCompilerOptions;
              • Pass additional compiler options to the plugin.

              property exclude

              exclude?: FilterPattern;
              • Determine which files are ignored by Typescript

              property filterRoot

              filterRoot?: string | false;

              property include

              include?: FilterPattern;
              • Determine which files are transpiled by Typescript (all .ts and .tsx files by default).

              property noForceEmit

              noForceEmit?: boolean;
              • Override force setting of noEmit and emitDeclarationOnly and use what is defined in tsconfig.json

              property outputToFilesystem

              outputToFilesystem?: boolean;
              • When set to false, force non-cached files to always be emitted in the output directory.output If not set, will default to true with a warning.

              property transformers

              transformers?: CustomTransformerFactories;
              • TypeScript custom transformers

              property tsconfig

              tsconfig?: string | false;
              • When set to false, ignores any options specified in the config file. If set to a string that corresponds to a file path, the specified file will be used as config file.

              property tslib

              tslib?: Promise<string> | string;
              • Overrides the injected TypeScript helpers with a custom version.

              property typescript

              typescript?: typeof _typescript;
              • Overrides TypeScript used for transpilation

              interface TypeCheckerTransformerFactory

              interface TypeCheckerTransformerFactory<T extends TransformerStage> {}

                property type

                type: 'typeChecker';

                  method factory

                  factory: (typeChecker: TypeChecker) => StagedTransformerFactory<T>;

                    Type Aliases

                    type CustomTransformerFactories

                    type CustomTransformerFactories = {
                    [stage in TransformerStage]?: Array<TransformerFactory<stage>>;

                      type ElementType

                      type ElementType<T extends Array<any> | undefined> = T extends (infer U)[]
                      ? U
                      : never;

                        type EnumCompilerOptions

                        type EnumCompilerOptions =
                        | 'module'
                        | 'moduleResolution'
                        | 'newLine'
                        | 'jsx'
                        | 'target';
                        • Properties of CompilerOptions that are normally enums

                        type JsonCompilerOptions

                        type JsonCompilerOptions = Omit<FlexibleCompilerOptions, EnumCompilerOptions> &
                        Record<EnumCompilerOptions, string>;
                        • JSON representation of Typescript compiler options

                        type PartialCompilerOptions

                        type PartialCompilerOptions =
                        | Partial<FlexibleCompilerOptions>
                        | Partial<JsonCompilerOptions>;
                        • Compiler options set by the plugin user.

                        type RollupTypescriptOptions

                        type RollupTypescriptOptions = RollupTypescriptPluginOptions &

                          type StagedTransformerFactory

                          type StagedTransformerFactory<T extends TransformerStage> = ElementType<

                            type TransformerFactory

                            type TransformerFactory<T extends TransformerStage> =
                            | StagedTransformerFactory<T>
                            | ProgramTransformerFactory<T>
                            | TypeCheckerTransformerFactory<T>;

                              type TransformerStage

                              type TransformerStage = keyof CustomTransformers;

                                Package Files (1)

                                Dependencies (2)

                                Dev Dependencies (7)

                                Peer Dependencies (3)


                                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-typescript.

                                • Markdown
                                • HTML
                                  <a href="https://www.jsdocs.io/package/@rollup/plugin-typescript"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>