Skip to content

Commit

Permalink
fix: 导出类型 (#1356)
Browse files Browse the repository at this point in the history
  • Loading branch information
ACERY1 committed Feb 9, 2022
1 parent 7e2ff6b commit f2e668f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,8 @@ export interface AxisProps {
zoomRange?: [number, number];
[key: string]: any; // TODO
}

export namespace AxisTypes {
export type Props = AxisProps
}

3 changes: 2 additions & 1 deletion packages/f2/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export * from './types';
import type * as Types from './types'
export { Types };
// import * as attr from './attr';
// import * as util from './util';
import Children from './children';
Expand Down
3 changes: 3 additions & 0 deletions packages/f2/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { AxisTypes } from './components/axis/types';
import type {
Point,
CircleAttrs as CircleGraphicAttrs,
Expand Down Expand Up @@ -42,6 +43,8 @@ interface PxPoint {
y: px;
}

export type { AxisTypes }

type SupportPx<T> = {
[k in keyof T]:
k extends PX_FIELD_NAME ?
Expand Down

0 comments on commit f2e668f

Please sign in to comment.