refactor: switch to generated .d.ts (#835)

* build: generate d.ts

* fix: preserve PublicMethods

* fix: avoid exposing types of attrs

* refactor: use existing setoption type

* fix: expose root and chart

* feat: use symbol as injection key

* chore: add comment for the type casting of the exposed
This commit is contained in:
Yue JIN
2025-06-01 12:29:26 +08:00
committed by GU Yiling
parent d3bff26307
commit 5b39c47102
9 changed files with 229 additions and 613 deletions

View File

@ -21,7 +21,7 @@ const METHOD_NAMES = [
type MethodName = (typeof METHOD_NAMES)[number];
type PublicMethods = Pick<EChartsType, MethodName>;
export type PublicMethods = Pick<EChartsType, MethodName>;
export function usePublicAPI(
chart: Ref<EChartsType | undefined>,