From ffa8c0cd19a6276e8875393e389cf59475da5ccf Mon Sep 17 00:00:00 2001 From: Jiachi Liu Date: Fri, 2 Feb 2024 18:47:33 +0100 Subject: [PATCH] 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;