Skip to content

Commit

Permalink
feat: update params typing
Browse files Browse the repository at this point in the history
  • Loading branch information
aeksandla committed Jan 16, 2025
1 parent 2cabece commit eab3518
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 3 deletions.
13 changes: 12 additions & 1 deletion src/blocks/Slider/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,18 @@ const LoadableProps = {
type: 'object',
patternProperties: {
'.*': {
type: ['string', 'number', 'boolean'],
oneOf: [
{
type: ['string', 'number', 'boolean'],
},
{
type: 'object',
additionalProperties: true,
},
{
type: 'array',
},
],
},
},
},
Expand Down
13 changes: 12 additions & 1 deletion src/blocks/SliderNew/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,18 @@ const LoadableProps = {
type: 'object',
patternProperties: {
'.*': {
type: ['string', 'number', 'boolean'],
oneOf: [
{
type: ['string', 'number', 'boolean'],
},
{
type: 'object',
additionalProperties: true,
},
{
type: 'array',
},
],
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion src/models/constructor-items/blocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export interface LoadableProps {
* @deprecated Will be moved to params
*/
serviceId?: number;
params?: Record<string, string | number | boolean>;
params?: Record<string, string | number | boolean | object>;
}

export interface LoadableChildren {
Expand Down

0 comments on commit eab3518

Please sign in to comment.