rusackas opened a new pull request, #37923:
URL: https://github.com/apache/superset/pull/37923

   ## Summary
   
   The `extendedDayjs` export was typed as `typeof dayjs` which didn't include 
the plugin methods (`utc`, `tz`, `duration`, `updateLocale`, etc.) added at 
runtime via `dayjs.extend()`. This caused TS2339 errors in consuming code:
   
   ```
   Property 'utc' does not exist on type 'typeof 
import(".../dayjs/index.d.ts")'.
   ```
   
   This PR adds explicit `ExtendedDayjs` and `ExtendedDayjsFactory` interfaces 
that include all the plugin methods, making the types match the runtime 
behavior.
   
   ## Changes
   
   - Added `ExtendedDayjs` interface extending `Dayjs` with instance methods 
from plugins (`utc`, `local`, `isUTC`, `tz`, `fromNow`, `toNow`, `from`, `to`, 
`calendar`)
   - Added `ExtendedDayjsFactory` interface with static methods from plugins 
(`utc`, `tz`, `duration`, `isDuration`, `unix`, `locale`, `updateLocale`, 
`extend`, `isDayjs`)
   - Exported additional types (`Duration`, `ConfigType`) for consumers
   
   ## Test plan
   
   - [x] Pre-commit type checking passes on previously failing files
   - [x] Generated `.d.ts` file includes the new interfaces
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to