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

Dissallow non-standard event properties as extendedProps to improve type-checking of standard event properties #7636

Open
1 task done
its-dibo opened this issue Mar 18, 2024 · 0 comments
Labels
Discussing Event Model How event data is parsed and represented in models TypeScript

Comments

@its-dibo
Copy link

Reduced Test Case

.

Do you understand that if a reduced test case is not provided, we will intentionally delay triaging of your ticket?

  • I understand

Which connector are you using (React/Angular/etc)?

Angular

Bug Description

the docs says that you can add "any other properties" that are moved into extendedProps{} object of events properties.

however, this causes a couple of issues

  • that the type-checking can not detect typos for existing props
  • properties in extendedProps can be overridden by those props (or maybe the vice versa) which causes unexpected result
let calenderOptions: CalenderOptions = {
 events: {
   //<-- typo: should be 'title', but the type-checking accepted it as it is an extra prop
   tilte: "event title",
   extendedProp:{
    //<--- this may be unintentionally overridden
     isActive: true
  },
isActive: false
}
}
@acerix acerix changed the title remove extra props for type checking Dissallow non-standard event properties as extendedProps to improve type-checking of standard event properties Mar 19, 2024
@acerix acerix added Discussing Event Model How event data is parsed and represented in models TypeScript labels Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Discussing Event Model How event data is parsed and represented in models TypeScript
Projects
None yet
Development

No branches or pull requests

2 participants