lwc icon indicating copy to clipboard operation
lwc copied to clipboard

Fix `className` types in `engine-core`

Open nolanlawson opened this issue 5 months ago • 0 comments

If you set a breakpoint in this function:

https://github.com/salesforce/lwc/blob/3665f31e94ee8b990036c7caaa4be4d4496d77ca/packages/%40lwc/engine-core/src/framework/modules/computed-class-attr.ts#L23

and run the Karma tests, you'll find that className can be a string, null, undefined, a number... Lots of things. But TypeScript thinks it can only be a string or undefined. We should fix these types to reflect reality.

nolanlawson avatar Mar 27 '24 01:03 nolanlawson