From 4f0bff541d788e273f5419e0f9c8bab8a88752cc Mon Sep 17 00:00:00 2001 From: Hugo Alliaume Date: Sun, 24 Nov 2019 19:15:02 +0100 Subject: [PATCH] feat: export Rollup*Options interfaces (#53) * feat: export Rollup*Options interfaces * test: import options in types testing files --- packages/buble/index.d.ts | 2 +- packages/buble/test/types.ts | 2 +- packages/inject/index.d.ts | 2 +- packages/inject/test/types.ts | 2 +- packages/json/index.d.ts | 2 +- packages/json/test/types.ts | 2 +- packages/replace/index.d.ts | 2 +- packages/replace/test/types.ts | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/buble/index.d.ts b/packages/buble/index.d.ts index df9eed951..146b79ac8 100755 --- a/packages/buble/index.d.ts +++ b/packages/buble/index.d.ts @@ -24,7 +24,7 @@ interface TransformOptions { unicodeRegExp?: boolean; } -interface RollupBubleOptions { +export interface RollupBubleOptions { /** * A minimatch pattern, or array of patterns, of files that should be * processed by this plugin (if omitted, all files are included by default) diff --git a/packages/buble/test/types.ts b/packages/buble/test/types.ts index 9188db344..3baa16ba1 100755 --- a/packages/buble/test/types.ts +++ b/packages/buble/test/types.ts @@ -1,5 +1,5 @@ // @ts-check -import buble from '..'; +import buble, { RollupBubleOptions } from '..'; /** @type {import("rollup").RollupOptions} */ const config = { diff --git a/packages/inject/index.d.ts b/packages/inject/index.d.ts index 421e88a37..1f0014bf0 100644 --- a/packages/inject/index.d.ts +++ b/packages/inject/index.d.ts @@ -2,7 +2,7 @@ import { Plugin } from "rollup"; type Injectment = string | [string, string]; -interface RollupInjectOptions { +export interface RollupInjectOptions { /** * A minimatch pattern, or array of patterns, of files that should be * processed by this plugin (if omitted, all files are included by default) diff --git a/packages/inject/test/types.ts b/packages/inject/test/types.ts index 4e383acc6..98559de0f 100644 --- a/packages/inject/test/types.ts +++ b/packages/inject/test/types.ts @@ -1,7 +1,7 @@ // @ts-check import { dirname } from "path"; -import inject from ".."; +import inject, { RollupInjectOptions } from ".."; /** @type {import("rollup").RollupOptions} */ const config = { diff --git a/packages/json/index.d.ts b/packages/json/index.d.ts index 4f1f4c925..7b71ba9d2 100755 --- a/packages/json/index.d.ts +++ b/packages/json/index.d.ts @@ -1,6 +1,6 @@ import { Plugin } from 'rollup'; -interface RollupJsonOptions { +export interface RollupJsonOptions { /** * All JSON files will be parsed by default, * but you can also specifically include files diff --git a/packages/json/test/types.ts b/packages/json/test/types.ts index d68136497..773185afc 100755 --- a/packages/json/test/types.ts +++ b/packages/json/test/types.ts @@ -1,5 +1,5 @@ // @ts-check -import json from '..'; +import json, { RollupJsonOptions } from '..'; /** @type {import("rollup").RollupOptions} */ const config = { diff --git a/packages/replace/index.d.ts b/packages/replace/index.d.ts index 3ed080778..080a3ac43 100755 --- a/packages/replace/index.d.ts +++ b/packages/replace/index.d.ts @@ -2,7 +2,7 @@ import { Plugin } from 'rollup'; type Replacement = string | ((id: string) => string); -interface RollupReplaceOptions { +export interface RollupReplaceOptions { /** * A minimatch pattern, or array of patterns, of files that should be * processed by this plugin (if omitted, all files are included by default) diff --git a/packages/replace/test/types.ts b/packages/replace/test/types.ts index 8560a4a8e..244540886 100755 --- a/packages/replace/test/types.ts +++ b/packages/replace/test/types.ts @@ -1,7 +1,7 @@ // @ts-check import { dirname } from 'path'; -import replace from '..'; +import replace, { RollupReplaceOptions } from '..'; /** @type {import("rollup").RollupOptions} */ const config = {