Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/marks/tip.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<MarkOptions, "tip">, TextStyles {
/**
* The horizontal position channel specifying the tip’s anchor, typically
* bound to the *x* scale.
Expand Down
14 changes: 14 additions & 0 deletions test/tip.test-d.ts
Original file line number Diff line number Diff line change
@@ -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});
});