Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: Incorrect type definition for StyleManagerConfig.sectors.properties #5613

Closed
2 tasks done
SachinPuthiyoth opened this issue Jan 12, 2024 · 0 comments
Closed
2 tasks done

Comments

@SachinPuthiyoth
Copy link

GrapesJS version

  • I confirm to use the latest version of GrapesJS

What browser are you using?

Chrome

Reproducible demo link

None

Describe the bug

How to reproduce the bug?

  1. As per the definition for sectors in
    addProperty(sectorId: string, property: PropertyTypes, opts: AddOptions = {}): Property | undefined {
    properties are of type PropertyTypes
  2. The type definition in
    sectors?: (Omit<SectorProperties, 'properties'> & { properties?: (string | PropertyProps)[] })[];
    is of type PropertyProps and hence is missing properties like options

What is the expected behavior?
The type declaration in StyleManagerConfig.sectors.properties has to be of type PropertyTypes to accommodate options.

What is the current behavior?
The type declaration in StyleManagerConfig.sectors.properties is PropertyProps and compiler complains since the property options is missing.

Code of Conduct

  • I agree to follow this project's Code of Conduct
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant