Skip to content

Commit

Permalink
type fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
bmschmidt committed Apr 6, 2024
1 parent 947618f commit 1c36112
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
1 change: 0 additions & 1 deletion src/label_rendering.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { select } from 'd3-selection';
import { drag } from 'd3-drag';
import type * as DS from './shared';
import { Color } from './aesthetics/ColorAesthetic';
import type { Zoom } from './interaction';

const handler = drag<SVGRectElement, BBox>();

Expand Down
9 changes: 7 additions & 2 deletions src/scatterplot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -525,12 +525,17 @@ export class Scatterplot {
if (this.prefs.encoding && prefs.encoding) {
for (const k of Object.keys(
this.prefs.encoding,
) as (keyof DS.Encoding)[]) {
) as (keyof typeof this.prefs.encoding)[]) {
if (prefs.encoding[k] !== undefined) {
this.prefs.encoding[k] = prefs.encoding[k];
const v = prefs.encoding[k];
// TODO: fix
// @ts-expect-error -- I can't make this work.
this.prefs.encoding[k] =
v as (typeof this.prefs.encoding)[keyof typeof this.prefs.encoding];
}
}
}

merge(this.prefs, prefs);
}
/**
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"noUnusedLocals": true,
"experimentalDecorators": true,
"sourceMap": true,
"strict": true,
"strict": false,
"target": "es2020",
"isolatedModules": true,
"outDir": "./dist",
Expand Down

0 comments on commit 1c36112

Please sign in to comment.