Skip to content

Commit

Permalink
fix(types): add missing named exports
Browse files Browse the repository at this point in the history
Add exports for shapes and interaction modules in types definition.

Fix #1520
  • Loading branch information
netil committed Jul 19, 2020
1 parent d4b63be commit 5dc77b5
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 3 deletions.
26 changes: 24 additions & 2 deletions types/bb.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
* Copyright (c) 2017 ~ present NAVER Corp.
* billboard.js project is licensed under the MIT license
*/
import { Chart } from "./chart";
import { ChartOptions } from "./options";
import {Chart} from "./chart";
import {ChartOptions} from "./options";

export const bb: {
/**
Expand Down Expand Up @@ -31,3 +31,25 @@ export const bb: {
*/
instance: Chart[];
};

// shape modules
export const area: () => "area";
export const areaLineRange: () => "area-line-range";
export const areaSpline: () => "area-spline";
export const areaSplineRange: () => "area-spline-range";
export const areaStep: () => "area-step";
export const bar: () => "bar";
export const bubble: () => "bubble";
export const donut: () => "donut";
export const gauge: () => "gauge";
export const line: () => "line";
export const pie: () => "pie";
export const radar: () => "radar";
export const scatter: () => "scatter";
export const spline: () => "spline";
export const step: () => "step";

// interaction modules
export const selection: () => true;
export const subchart: () => true;
export const zoom: () => true;
26 changes: 25 additions & 1 deletion types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,31 @@ import {bb} from "./bb";

export default bb;
export as namespace bb;
export {bb} from "./bb";
export {
bb,

// shapes modules
area,
areaLineRange,
areaSpline,
areaSplineRange,
areaStep,
bar,
bubble,
donut,
gauge,
line,
pie,
radar,
scatter,
spline,
step,

// interaction modules
selection,
subchart,
zoom
} from "./bb";
export * from "./axis";
export * from "./chart";
export * from "./options";
Expand Down

0 comments on commit 5dc77b5

Please sign in to comment.