web: add check compile test to prevent compile errors/warnings
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
@ -35,7 +35,10 @@ export class Diagram extends AKElement {
|
||||
const matcher = window.matchMedia("(prefers-color-scheme: light)");
|
||||
const handler = (ev?: MediaQueryListEvent) => {
|
||||
mermaid.initialize({
|
||||
logLevel: "fatal",
|
||||
// The type definition for this says number
|
||||
// but the example use strings
|
||||
// and numbers don't work
|
||||
logLevel: "fatal" as unknown as number,
|
||||
startOnLoad: false,
|
||||
theme: ev?.matches || matcher.matches ? "default" : "dark",
|
||||
flowchart: {
|
||||
|
||||
@ -202,7 +202,7 @@ export abstract class Table<T> extends AKElement {
|
||||
let comp = (item: T) => {
|
||||
return JSON.stringify(item) === jsonRes;
|
||||
};
|
||||
if ("pk" in res) {
|
||||
if (Object.hasOwn(res as object, "pk")) {
|
||||
comp = (item: T) => {
|
||||
return (
|
||||
(item as unknown as { pk: string | number }).pk ===
|
||||
|
||||
Reference in New Issue
Block a user