diff --git a/src/marks/tip.d.ts b/src/marks/tip.d.ts index 7faf45b759..6dfa5842d4 100644 --- a/src/marks/tip.d.ts +++ b/src/marks/tip.d.ts @@ -3,7 +3,7 @@ import type {Data, FrameAnchor, MarkOptions, RenderableMark} from "../mark.js"; import type {TextStyles} from "./text.js"; /** Options for the tip mark. */ -export interface TipOptions extends MarkOptions, TextStyles { +export interface TipOptions extends Omit, TextStyles { /** * The horizontal position channel specifying the tip’s anchor, typically * bound to the *x* scale. diff --git a/test/tip.test-d.ts b/test/tip.test-d.ts new file mode 100644 index 0000000000..2b88b50990 --- /dev/null +++ b/test/tip.test-d.ts @@ -0,0 +1,14 @@ +/* eslint-disable @typescript-eslint/ban-ts-comment */ + +import * as Plot from "@observablehq/plot"; +import {it} from "vitest"; + +it("a nested tip option is not allowed", () => { + // @ts-expect-error + Plot.dot([], {x: 0, y: 0, tip: {tip: true}}); +}); + +it("Plot.tip does not accept a tip option", () => { + // @ts-expect-error + Plot.tip([], {x: 0, y: 0, tip: true}); +});