From 102d45f852aa843d0301b39e43c649506eb48bac Mon Sep 17 00:00:00 2001 From: liuxingbaoyu <30521560+liuxingbaoyu@users.noreply.github.com> Date: Wed, 20 Jul 2022 11:17:40 +0800 Subject: [PATCH] review --- packages/babel-cli/src/babel/file.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/babel-cli/src/babel/file.ts b/packages/babel-cli/src/babel/file.ts index b039dcebef8f..7fbe2a44421a 100644 --- a/packages/babel-cli/src/babel/file.ts +++ b/packages/babel-cli/src/babel/file.ts @@ -1,6 +1,5 @@ import convertSourceMap from "convert-source-map"; import { AnyMap, encodedMap } from "@jridgewell/trace-mapping"; -import type { Section } from "@jridgewell/trace-mapping/dist/types/types"; import slash from "slash"; import path from "path"; import fs from "fs"; @@ -9,9 +8,16 @@ import * as util from "./util"; import type { CmdOptions } from "./options"; import * as watcher from "./watcher"; +import type { + SectionedSourceMap, + SectionedSourceMapInput, +} from "@jridgewell/trace-mapping"; + +type Section = SectionedSourceMap["sections"][0]; + type CompilationOutput = { code: string; - map: any; + map: SectionedSourceMapInput; }; export default async function ({