Skip to content

Commit a4ecbc7

Browse files
author
sehilyi
committed
fix ts build
1 parent 5c2303a commit a4ecbc7

File tree

4 files changed

+10
-8
lines changed

4 files changed

+10
-8
lines changed

src/AltGoslingComponent.tsx

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
import { useEffect, useRef, useState } from 'react';
3-
import gosling, { GoslingComponent, GoslingSpec, HiGlassSpec } from 'gosling.js';
3+
import { GoslingComponent, type GoslingRef, type GoslingSpec, type HiGlassSpec, type Theme, type TemplateTrackDef } from 'gosling.js';
44
import type { Datum, AltGoslingSpec, PreviewAlt, AltTrack, AltDataStatistics, AltTrackOverlaidByData, AltTrackOverlaidByMark, AltTrackSingle } from '@alt-gosling/schema/alt-gosling-schema';
55

66
import { getAlt, updateAlt } from './alt-gosling-model';
@@ -11,14 +11,15 @@ import Grid from '@mui/material/Grid';
1111
// todo: add goslingcompprops as 1 attribute and add others for altgoslingprops e.g. padding and size
1212
// then if compiled in goslingcompprops is defined, raise error that this is overridden
1313
interface AltGoslingCompProps {
14-
spec?: gosling.GoslingSpec;
14+
spec?: GoslingSpec;
1515
padding?: number;
1616
margin?: number;
1717
border?: string;
1818
id?: string;
1919
className?: string;
20-
theme?: gosling.Theme;
21-
templates?: gosling.TemplateTrackDef[];
20+
theme?: Theme;
21+
templates?: TemplateTrackDef[];
22+
// @ts-expect-error `gosling.UrlToFetchOptions` does not exist I think
2223
urlToFetchOptions?: gosling.UrlToFetchOptions;
2324
experimental?: {
2425
reactive?: boolean;
@@ -32,7 +33,7 @@ interface DataPanelInformation {
3233
}
3334

3435
export const AltGoslingComponent = (props: AltGoslingCompProps) => {
35-
const gosRef = useRef<gosling.GoslingRef>(null);
36+
const gosRef = useRef<GoslingRef>(null);
3637

3738
const [specProcessed, setSpecProcessed] = useState<any>();
3839

src/alt-gosling-model/alt-structure/alt-from-spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { SUPPORTED_CHANNELS } from '@alt-gosling/schema/supported_channels';
1111

1212
import { attributeExists } from '../util';
1313
import { determineSpecialCases } from './chart-types';
14-
14+
// @ts-expect-error no ktype definition
1515
import { _convertToFlatTracks, _spreadTracksByData } from 'gosling.js/utils';
1616

1717

src/alt-gosling-model/alt-text/text-data.ts

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import type { AltGoslingSpec, AltTrack } from '@alt-gosling/schema/alt-gosling-s
33

44
import { arrayToString, chrNumberOnly } from '../util';
55

6+
// @ts-expect-error no ktype definition
67
import { getRelativeGenomicPosition } from 'gosling.js/utils';
78

89

tsconfig.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616

1717
/* Linting */
1818
"strict": true,
19-
"noUnusedLocals": true,
20-
"noUnusedParameters": true,
19+
"noUnusedLocals": false,
20+
"noUnusedParameters": false,
2121
"noFallthroughCasesInSwitch": true,
2222

2323
/* Aliases */

0 commit comments

Comments
 (0)