diff --git a/types/cookieclicker/package.json b/types/cookieclicker/package.json index c509a266c7457d..f485cf14cccf6a 100644 --- a/types/cookieclicker/package.json +++ b/types/cookieclicker/package.json @@ -12,8 +12,8 @@ }, "owners": [ { - "name": "Lubomir", - "githubUsername": "TheGLander" + "name": "Zee", + "githubUsername": "zyudneko" }, { "name": "Static Variable James", diff --git a/types/pg/index.d.ts b/types/pg/index.d.ts index 756abf9598aa27..8642887f1e5577 100644 --- a/types/pg/index.d.ts +++ b/types/pg/index.d.ts @@ -282,9 +282,9 @@ export class ClientBase extends events.EventEmitter { setTypeParser: typeof pgTypes.setTypeParser; getTypeParser: typeof pgTypes.getTypeParser; - on( + on( event: E, - listener: E extends "drain" | "end" ? () => void + listener: E extends "connect" | "drain" | "end" ? () => void : E extends "error" ? (err: Error) => void : E extends "notice" ? (notice: NoticeMessage) => void : (message: Notification) => void, diff --git a/types/pg/pg-tests.mts b/types/pg/pg-tests.mts index 30e04e0f081d4f..7a159f97b28e14 100644 --- a/types/pg/pg-tests.mts +++ b/types/pg/pg-tests.mts @@ -76,6 +76,10 @@ const myFunc2 = (c: pg.Client) => { c.on("drain", () => {}); }; +const myFunc3 = (c: pg.Client) => { + c.on("connect", () => {}); +}; + // $ExpectType ClientBase new pg.ClientBase(); // $ExpectType ClientBase diff --git a/types/plotly.js/index.d.ts b/types/plotly.js/index.d.ts index 95ee8d384485d5..79542bde44051d 100644 --- a/types/plotly.js/index.d.ts +++ b/types/plotly.js/index.d.ts @@ -1134,7 +1134,8 @@ export interface LayoutAxis extends Axis { automargin: boolean; angle: any; griddash: Dash; - l2p: (v: Datum) => number; + l2p: (v: number) => number; + d2p: (v: Datum, clip?: any, calendar?: any) => number; autotickangles: number[]; insiderange: any[]; @@ -1270,7 +1271,6 @@ export type ModeBarDefaultButtons = | "zoomOutGeo" | "resetGeo" | "hoverClosestGeo" - | "hoverClosestGl2d" | "hoverClosestPie" | "toggleHover" | "toImage" @@ -1286,7 +1286,27 @@ export type ModeBarDefaultButtons = | "togglehover" | "hovercompare" | "hoverclosest" - | "v1hovermode"; + | "v1hovermode" + | "sendChartToCloud" + | "drawclosedpath" + | "drawopenpath" + | "drawline" + | "drawrect" + | "drawcircle" + | "eraseshape" + | "resetViewSankey" + | "zoom" + | "pan" + | "select" + | "lasso" + | "zoomin" + | "zoomout" + | "autoscale" + | "resetscale" + | "resetCameraDefault" + | "resetCameraLastSave" + | "reset" + | "resetView"; export type ButtonClickEvent = (gd: PlotlyHTMLElement, ev: MouseEvent) => void; diff --git a/types/plotly.js/test/index-tests.ts b/types/plotly.js/test/index-tests.ts index ff343506acd0f9..07753942b759ec 100644 --- a/types/plotly.js/test/index-tests.ts +++ b/types/plotly.js/test/index-tests.ts @@ -61,6 +61,8 @@ const config: Partial = { modeBarButtonsToAdd: [ "togglespikelines", "togglehover", + "drawrect", + "zoom", { name: "customButton", title: "Custom Action", @@ -1658,3 +1660,11 @@ function rand() { Plotly.newPlot("myDiv", data, layout); })(); + +(() => { + const axis = {} as Plotly.LayoutAxis; + const dataPixel: number = axis.d2p(2.5); + const logPixel: number = axis.d2p(2.5, true); + const datePixel: number = axis.d2p("2024-01-01", undefined, "gregorian"); + const linearizedPixel: number = axis.l2p(2.5); +})(); diff --git a/types/plotly.js/v2/index.d.ts b/types/plotly.js/v2/index.d.ts index 93097447bd5521..95e77f6fef3a48 100644 --- a/types/plotly.js/v2/index.d.ts +++ b/types/plotly.js/v2/index.d.ts @@ -1289,7 +1289,26 @@ export type ModeBarDefaultButtons = | "togglehover" | "hovercompare" | "hoverclosest" - | "v1hovermode"; + | "v1hovermode" + | "drawclosedpath" + | "drawopenpath" + | "drawline" + | "drawrect" + | "drawcircle" + | "eraseshape" + | "resetViewSankey" + | "zoom" + | "pan" + | "select" + | "lasso" + | "zoomin" + | "zoomout" + | "autoscale" + | "resetscale" + | "resetCameraDefault" + | "resetCameraLastSave" + | "reset" + | "resetView"; export type ButtonClickEvent = (gd: PlotlyHTMLElement, ev: MouseEvent) => void; diff --git a/types/plotly.js/v2/test/index-tests.ts b/types/plotly.js/v2/test/index-tests.ts index 05127f1d89c3e0..336561d020c76a 100644 --- a/types/plotly.js/v2/test/index-tests.ts +++ b/types/plotly.js/v2/test/index-tests.ts @@ -61,6 +61,8 @@ const config: Partial = { modeBarButtonsToAdd: [ "togglespikelines", "togglehover", + "drawrect", + "zoom", { name: "customButton", title: "Custom Action",