You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On V19.0.6, the badge component type definition doesn't allow null assignment for severity, badgeSize and size.
Source code seems to be right, but the type definition after install doesn't have it.
I am in the process of migrating our ui library from v17 to v19 and I cannot set null values anymore.
// node_modules/primeng/badge/badge.d.ts/** * Badge is a small status indicator for another element. * @group Components */exportdeclareclassBadgeextendsBaseComponent{/** * Size of the badge, valid options are "large" and "xlarge". * @group Props */badgeSize: import("@angular/core").InputSignal<"small"|"large"|"xlarge">;/** * Size of the badge, valid options are "large" and "xlarge". * @group Props */size: import("@angular/core").InputSignal<"small"|"large"|"xlarge">;/** * Severity type of the badge. * @group Props */severity: import("@angular/core").InputSignal<"info"|"success"|"warn"|"danger"|"secondary"|"contrast">;// ... }exportdeclareclassBadgeModule{staticɵfac: i0.ɵɵFactoryDeclaration<BadgeModule,never>;staticɵmod: i0.ɵɵNgModuleDeclaration<BadgeModule,never,[typeofBadge,typeofBadgeDirective,typeofi1.SharedModule],[typeofBadge,typeofBadgeDirective,typeofi1.SharedModule]>;staticɵinj: i0.ɵɵInjectorDeclaration<BadgeModule>;}
Pull Request Link
No response
Reason for not contributing a PR
Lack of time
Unsure how to implement the fix/feature
Difficulty understanding the codebase
Other
Other Reason
Most probably doesn't need a fix but an update on the package.
Describe the bug
On V19.0.6, the badge component type definition doesn't allow null assignment for severity, badgeSize and size.
Source code seems to be right, but the type definition after install doesn't have it.
I am in the process of migrating our ui library from v17 to v19 and I cannot set null values anymore.
Pull Request Link
No response
Reason for not contributing a PR
Other Reason
Most probably doesn't need a fix but an update on the package.
Reproducer
https://stackblitz.com/edit/bolt-angular-2u7tud1n?file=.gitignore
Environment
Google chrome
angular 19.1.4
primeng 19.0.6
Angular version
19.1.4
PrimeNG version
v19
Node version
20.15.0
Browser(s)
chrome 132.0.6834.160
Steps to reproduce the behavior
display a badge component with a severity set to null:
<p-badge [value]="2" [severity]="null" />
it triggers a type error
Expected behavior
Should allow for null
The text was updated successfully, but these errors were encountered: