Skip to content

odiglet/v1.0.141

  • odiglet/v1.0.141
  • 8e9e2a7
  • Partially verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
  • Compare
    Choose a tag to compare
  • odiglet/v1.0.141
  • 8e9e2a7
  • Compare
    Choose a tag to compare
  • Partially verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
@alonkeyval alonkeyval tagged this 08 Jan 15:22
This pull request includes several changes to improve type safety and
code clarity in the `frontend/webapp` directory. The most important
changes include adding type annotations, refactoring object
construction, and updating TypeScript configuration for stricter type
checking.

Improvements to type safety:

*
[`frontend/webapp/components/notification/toast-list.tsx`](diffhunk://#diff-c6ead7587d1e5c52295c921dde2a1a5b9b06977ab3900c7dbf475c47cc1c664cL39-R39):
Added type annotations to the `onClose` function parameter to ensure it
is an object with a boolean `asSeen` property.
*
[`frontend/webapp/containers/main/destinations/destination-drawer/build-card.ts`](diffhunk://#diff-ce1c4d3c06218dab699d84dac4690cc261b1209716055609b79e97ab930e6862L7-R7):
Updated the `filter` method to use a type-safe key lookup on
`ExportedSignals`.
*
[`frontend/webapp/containers/main/destinations/destination-modal/choose-destination-body/destinations-list/index.tsx`](diffhunk://#diff-0fc3893b30022c16fec91cb64d38fa36de0dc4e8eabbbbb7a3b94701b45a4badL58-R58):
Added type annotations for `SupportedSignals` in the `monitors` filter
method.

Code clarity improvements:

*
[`frontend/webapp/containers/main/destinations/destination-drawer/build-drawer-item.ts`](diffhunk://#diff-0a1f42815db27054a5330d48db69f3c86c12948854b1f4c2db7611dbc3088ffeL7-R12):
Refactored the construction of `fieldsStringified` by first building an
object and then converting it to a JSON string.

TypeScript configuration update:

*
[`frontend/webapp/tsconfig.json`](diffhunk://#diff-5414aabe0cae671212009d85c7bff3f80ae87557c3cfeb2ebf363e39a5dfb19fL31-R32):
Enabled the `noImplicitAny` compiler option to enforce explicit type
annotations, improving overall type safety.

---------

Co-authored-by: alonkeyval <[email protected]>
Co-authored-by: Ben Elferink <[email protected]>
Assets 2
Loading