Skip to content

Commit cdb36d0

Browse files
committed
[typings] enum-ify Axis.Side, fix class export regression.
1 parent 51e1fae commit cdb36d0

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

dist/uPlot.d.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export class uPlot {
1+
declare class uPlot {
22
/** when passing a function for @targ, call init() after attaching self.root to the DOM */
33
constructor(
44
opts: Options,
@@ -535,6 +535,13 @@ export namespace Axis {
535535

536536
export type Values = ((self: uPlot, splits: number[], axisIdx: number, foundSpace: number, foundIncr: number) => (string | number | null)[]) | (string | number | null)[][] | string;
537537

538+
export enum Side {
539+
Top = 0,
540+
Right = 1,
541+
Bottom = 2,
542+
Left = 3,
543+
}
544+
538545
export enum Align {
539546
Left = 1,
540547
Right = 2,
@@ -573,7 +580,7 @@ export interface Axis {
573580
scale?: string;
574581

575582
/** side of chart - 0: top, 1: rgt, 2: btm, 3: lft */
576-
side?: number;
583+
side?: Axis.Side;
577584

578585
/** height of x axis or width of y axis in CSS pixels alloted for values, gap & ticks, but excluding axis label */
579586
size?: Axis.Size;

0 commit comments

Comments
 (0)