Vega Charts 抛出类型定义错误

Vega Charts is throwing type definition error

我正在尝试在我的 StencilJS 项目中使用 Vega 图表。当我在我的组件中导入 vega-embed 时,它会在构建过程中抛出以下错误:

[ ERROR ]  TypeScript: ./node_modules\vega-lite\build\src\axis.d.ts:5:47
           Type 'BaseAxis' is not generic.

      L4:  import { LayoutAlign } from './vega.schema';
      L5:  declare type BaseAxisNoSignals = AxisMixins & BaseAxis<number, number, boolean, number | boolean, string, Col

      L6:  declare type VgAxisConfigNoSignals = BaseAxisNoSignals;

[ ERROR ]  TypeScript: ./node_modules\vega-lite\build\src\axis.d.ts:119:63
           A type predicate's type must be assignable to its parameter's type. Type 'string | number' is not assignable
           to type 'string'. Type 'number' is not assignable to type 'string'.

    L118:  }

这就是我尝试将其导入我的 tsx 文件的方式:

import embed, * as vegaEmbed from 'vega-embed'

如有任何帮助,我们将不胜感激。

请升级vega-lite版本。这已在 vega-lite 4.0.0-beta.10

中修复