From b778ba0a6988301d4d7aaf1edf6cd30df931000f Mon Sep 17 00:00:00 2001 From: Jiachi Liu Date: Wed, 5 Jun 2024 03:55:57 +0200 Subject: [PATCH] fix(esm-shim): missing exports in types (#1670) types: fix missing export type for esm-shim --- packages/esm-shim/types/index.d.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/esm-shim/types/index.d.ts b/packages/esm-shim/types/index.d.ts index a4f877d8c..e7a2df455 100644 --- a/packages/esm-shim/types/index.d.ts +++ b/packages/esm-shim/types/index.d.ts @@ -1,4 +1,9 @@ -import type { Plugin } from 'rollup'; +import type { Plugin, SourceMapInput } from 'rollup'; + +interface Output { + code: string; + map?: SourceMapInput; +} /** * A Rollup plugin to replace cjs syntax for esm output bundles. @@ -6,3 +11,4 @@ import type { Plugin } from 'rollup'; * @returns Plugin instance. */ export default function commonjsShim(): Plugin; +export function provideCJSSyntax(code: string): Output | null;