fix(base,icon-registry): replace unsafe Function type with explicit signatures#1273
Conversation
…ignatures Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://delightful-beach-055ecb503-1273.westeurope.azurestaticapps.net |
There was a problem hiding this comment.
Pull request overview
This PR addresses @typescript-eslint/no-unsafe-function-type warnings by replacing broad Function types with explicit callback signatures in two exported utilities (Timer in uui-base, and UUIIconHost in uui-icon-registry).
Changes:
- Tighten
UUIIconHost’s internalresolveand publicrejecttypes to explicit promise resolver/rejector signatures. - Tighten
Timer’s constructor callback type fromFunctionto() => void.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/uui-icon-registry/lib/UUIIconHost.ts | Replaces Function with explicit resolve/reject function signatures. |
| packages/uui-base/lib/utils/Timer.ts | Replaces Function with an explicit no-arg callback signature for the timer completion callback. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@iOvergaard seems like good changes, I think (this as any) could be removed then. I dont feel super streong about the second co-pilot comment, I think its fair that we take no arguments and that it does not return anything. So okay with me to pass that comment. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://delightful-beach-055ecb503-1273.westeurope.azurestaticapps.net |



Summary
Functiontype with() => voidinTimerconstructor (uui-base)Functiontypes with explicit(value: string) => voidand(reason?: unknown) => voidinUUIIconHost(uui-icon-registry)Fixes
@typescript-eslint/no-unsafe-function-typewarnings.Test plan
🤖 Generated with Claude Code