Skip to content

Commit

Permalink
Merge pull request #1484 from silx-kit/config-warnings
Browse files Browse the repository at this point in the history
Fix TS errors in toolbar configs reported only in VS Code
  • Loading branch information
axelboc authored Aug 30, 2023
2 parents e53129e + 768b909 commit 56f7253
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion packages/app/src/vis-packs/core/complex/config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export interface ComplexConfig {
function createComplexConfigStore() {
return createStore<ComplexConfig>()(
persist(
(set) => ({
(set): ComplexConfig => ({
visType: ComplexVisType.Amplitude,
setVisType: (visType: ComplexVisType) => set(() => ({ visType })),
}),
Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/vis-packs/core/complex/lineConfig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export interface ComplexLineConfig {
function createComplexLineConfigStore() {
return createStore<ComplexLineConfig>()(
persist(
(set) => ({
(set): ComplexLineConfig => ({
visType: ComplexVisType.Amplitude,
setVisType: (visType: ComplexLineVisType) => set(() => ({ visType })),
}),
Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/vis-packs/core/heatmap/config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export interface HeatmapConfig {
function createHeatmapConfigStore() {
return createStore<HeatmapConfig>()(
persist(
(set) => ({
(set): HeatmapConfig => ({
customDomain: [null, null],
setCustomDomain: (customDomain: CustomDomain) => set({ customDomain }),

Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/vis-packs/core/line/config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export interface LineConfig {
function createLineConfigStore() {
return createStore<LineConfig>()(
persist(
(set) => ({
(set): LineConfig => ({
curveType: CurveType.LineOnly,
setCurveType: (type: CurveType) => set({ curveType: type }),

Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/vis-packs/core/matrix/config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export interface MatrixVisConfig {
function createMatrixConfigStore() {
return createStore<MatrixVisConfig>()(
persist(
(set) => ({
(set): MatrixVisConfig => ({
sticky: false,
toggleSticky: () => set((state) => ({ sticky: !state.sticky })),

Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/vis-packs/core/rgb/config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export interface RgbVisConfig {
function createRgbConfigStore() {
return createStore<RgbVisConfig>()(
persist(
(set) => ({
(set): RgbVisConfig => ({
showGrid: false,
toggleGrid: () => set((state) => ({ showGrid: !state.showGrid })),

Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/vis-packs/core/scatter/config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export interface ScatterConfig {
function createScatterConfigStore() {
return createStore<ScatterConfig>()(
persist(
(set) => ({
(set): ScatterConfig => ({
customDomain: [null, null],
setCustomDomain: (customDomain: CustomDomain) => set({ customDomain }),

Expand Down
4 changes: 2 additions & 2 deletions packages/app/src/vis-packs/core/surface/config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ export interface SurfaceConfig {

function createSurfaceConfigStore() {
return createStore<SurfaceConfig>()(
persist<SurfaceConfig>(
(set) => ({
persist(
(set): SurfaceConfig => ({
customDomain: [null, null],
setCustomDomain: (customDomain: CustomDomain) => set({ customDomain }),

Expand Down

0 comments on commit 56f7253

Please sign in to comment.