Review main Merged

80943[TASK] Prune global TypeScript types

Benjamin Franzke CR +2 V +2 Hard +169 −116 updated 09/13/23, 11:14

Commit message

* Only define type definitions via "types"
  that need to be globally available.
  See  https://www.typescriptlang.org/tsconfig#types
  > If `types` is specified, only packages listed will
  > be included in the global scope

  Those whose exports are (and can be) imported locally
  are *not* included globally bot only explicitly via
  `import` by the typescript modules that make actually
  use of these dependencies.

* Move declarations from global into local scope that were
  actually only defined and used in specific files (draguploader)
  or move to inline code (disablePagingAction)
  or replace by modern code ($.escapeSelector => CSS.escape)

* Remove unnecessary `declare module` statements that
  shadowed type definitions that are avaiable right now:
  * This means muuri is now type checked, which revealed
    wrong usage in the dashboard grid and is fixed right away.

* Remove `any` where possible and use actual types instead

Left for later cleanups are:

* The ckeditor5-bundle should ideally be written in TypeScript
  to avoid the need for a handcrafted .d.ts file and the bundle
  itself would be compile time type-checked.

* chart.js flatpickr and shortcut-buttons-flatpickr usage should be
  adapted to allow their natively provided types to kick it, but that
  needs upstream fixes for shortcut-buttons-flatpickr first and we
  need to stop mapping flatpickr and chart.js to pseudo package names.

Review

  • Code review CR +2 Done
    • Benjamin Franzke +2
    • Andreas Nedbal +1
    • Benni Mack +1
  • Verified V +2 Done
    • Benjamin Franzke +2
    • Andreas Nedbal +1
    • Benni Mack +1
    • core-ci +1 CI

Issues 1

Files 26

Show 6 more files

Review log 811

  1. Benjamin Franzke uploaded patch set 1 09/11/23, 06:35

  2. Benjamin Franzke marked it work in progress 09/11/23, 06:35

  3. core-ci voted on patch set 1 V +1 09/11/23, 06:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/46454

  4. Benjamin Franzke uploaded patch set 2 V +1 09/11/23, 07:01

  5. core-ci voted on patch set 2 V +1 09/11/23, 07:09 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/46456

  6. Benjamin Franzke uploaded patch set 3 V +1 09/11/23, 18:16

  7. core-ci voted on patch set 3 V +1 09/11/23, 18:23 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/46487

  8. Benni Mack voted on patch set 3 V +1 CR +1 09/12/23, 11:29

  9. Andreas Nedbal voted on patch set 3 V +1 CR +1 09/13/23, 08:52

  10. Benjamin Franzke voted on patch set 3 V +2 CR +2 09/13/23, 11:03

  11. Benjamin Franzke merged patch set 4 09/13/23, 11:14