zulip/web/src/plotly.js.d.ts
Junyao Chen 6757c5a9f8 stats: Install @types/plotly.js for type check.
This is a prep commit for typescript migration for `stats.js`,
which used a third party module `plotly.js` that doesn't come
with types.
2023-08-17 11:35:00 -07:00

20 lines
471 B
TypeScript

// An internal type extracted from @types/plotly.js
// pie and bar are both trace modules from the traces subdirectory
type TraceModule = {
[key: string]: unknown;
moduleType: "trace";
name: string;
categories: string[];
meta: Record<string, unknown>;
};
declare module "plotly.js/lib/pie" {
const PlotlyPie: TraceModule;
export = PlotlyPie;
}
declare module "plotly.js/lib/bar" {
const PlotlyBar: TraceModule;
export = PlotlyBar;
}