Convert packages to TypeScript
Opened by @manzoorwanijk · Assignees: @manzoorwanijk
Solve & Merge Reward: Up to +710 XP & +60 Coins
+30 XP on PR open · +180 XP & +60 coins on merge · +500 star XP (11,803 stars)
Claim Status & GitHub Signal
Assigned on GitHub (@manzoorwanijk). Check recent comments before starting duplicate work.
Estimated from issue labels (Good First Issue, [Status] In Progress, [Type] Tracking Issue, [Package] Block editor), TypeScript context, and discussion depth. There are 47 GitHub comments to review for maintainer clarifications. Note: this is an estimate, not a guarantee.
What It's About
Convert packages to TypeScript. _Last updated: 2026-12-02_ This issue tracks the progress in adding native TypeScript support to the @wordpress/ packages. How to help 1. Pick an unchecked item under [Ready to pick](ready-to-pick) or [Tests](tests). Every item there has all its in-repo depend
Why It Matters
Resolving #67691 improves reliability and developer experience in WordPress/gutenberg.
Expected Outcome
A focused pull request addressing #67691 with relevant checks or tests verified locally.
Log in to compare this issue's requirements against your profile skills. Required concepts: TypeScript, JavaScript, React / Next.js, HTTP & REST APIs, SQL & Databases, Docker & Containers.
Progressive AI Hints
Hint #1 is always free and calibrated to your experience level. Extra hints unlock with coins without spoiling the full solution.
Skill-Gap Learning
Relational modeling, joins, constraints, and query optimization.
Addresses skill gap: SQL & Databases
Images, containers, volumes, and reproducible dev environments.
Addresses skill gap: Docker & Containers
Strong typing, interfaces, generics, and safer JavaScript/TypeScript code.
Addresses skill gap: TypeScript
Issue Description
Last updated: 2026-12-02
This issue tracks the progress in adding native TypeScript support to the @wordpress/* packages.
How to help
- Pick an unchecked item under Ready to pick or Tests. Every item there has all its in-repo dependencies typed, so it converts without suppressions.
- Comment here with the item you are taking, so nobody else starts it.
- Open one PR per item against
trunk, following the rules and file-level rules, and link this issue. End the PR description with@coderabbitai review as per the rules given in #67691or add it to a PR comment so CodeRabbit reviews the PR. - Blocked items list what blocks them. Converting a blocker is the fastest way to unblock them.
Ready to pick
Packages and tail items:
-
editor(298 files): convert, then remove"checkJs": false.-
#87822
-
#87823
-
#87825
-
<details><summary>More</summary>
- #87829
- #87831
-
-
edit-post(35 files): blocked byeditor. -
edit-widgets(46 files) -
customize-widgets(38 files) -
block-directory(24 files): blocked byeditor. -
edit-site(116 files): blocked byeditor. - The open follow-ups at the end of this issue.
- The optional Node tooling track, see rule 6.
Tests
Tests convert with their sources (file-level rule 10), so a package still being converted needs no separate test PR. These packages have their source fully in TypeScript but still have JavaScript tests or test helpers, so their tests can convert now, one PR per package:
-
api-fetch(1 file) - #85145 -
blocks(34 files)- #87126
- #87129
- #87140
-
components(1 file) - #85150 -
core-data(5 files) - #86174 -
data(17 files)-
#86152
-
#86156
-
#86616
-
<details><summary>More</summary>
- #86621
- #86846
- #86847
- #86931
- #86973
- #86975
- #86987
- #86988
- #86989
- #86994
- #87677
- #87678
- #87679
- #87682
- #87708
- #87709
- #87715
- #87716
- #87718
- #87719
-
-
data-controls(1 file) - #84852 -
dataviews(1 file) - #84836 -
date(1 file) - #84830 -
dom(8 files) - #85161 -
element(5 files) - #85159 -
format-library(2 files) - #85032 -
global-styles-ui(7 files) - #87122 -
hooks(1 file) - #85141 -
kebab-case(1 file) - #84825 -
latex-to-mathml(1 file) - #85084 -
plugins(2 files) - #85088 -
preferences-persistence(13 files) - #85162 -
private-apis(1 file) - #84901 -
redux-routine(3 files) - #85121 -
rich-text(30 files) - #86730 -
style-engine(2 files) - #85205, #85097 -
undo-manager(1 file) - #84895 -
upload-media(1 file) - #84930 -
url(1 file) - #84916 -
viewport(4 files) - #85115 -
warning(1 file) - #85085
A package with a single tsconfig.json first splits it into tsconfig.build.json and a dev tsconfig.json with the test types, following the TypeScript section of packages/README.md. Convert deliberate invalid input with a narrow @ts-expect-error (file-level rule 14), and keep fixtures and snapshots as they are.
Plan
Every runtime package under packages/ converts to TypeScript without consumers ever suppressing errors caused by an untyped dependency. Packages convert dependency-first: one is scheduled once every in-repo package it depends on is typed. Inside a package, files convert leaf first: the files nothing imports come before the files they import.
The conversion removes the three mechanisms that hide untyped dependencies:
pathsintools/monorepo/tsconfig/tsconfig.base.jsonthat resolve an untyped package toany-module.d.ts.@ts-expect-erroron imports from those packages in their consumers."checkJs": falsein the build project of a partially converted package.
Rules
- A dependency counts as typed when it is fully TypeScript or at 90% or above with its build project emitting declarations. Packages at 90% or above do not block anything and are converted last.
- Packages with no TypeScript are scheduled before partially converted ones at the same depth of the graph. A partial package below 25% is treated as unconverted for scheduling because it blocks its consumers in the same way.
- Within a package, convert leaf files first. A file that other files import converts after them, so its types are written against real TypeScript callers. A TypeScript file cannot import a JavaScript file in the build project (TS6307), so a PR also converts the JavaScript files its files import, and the rest of a shared module converts later. Once the exported surface type checks, drop the package's
pathsmapping and the consumers'@ts-expect-errordirectives in the same PR. - Follow the file-level rules in the next section. In short: no runtime changes,
git mv, minimal diffs, types in a siblingtypes.ts, JSDoc preserved. - Each conversion PR must leave
npm run typecheck,npm run lint:tsconfig,npm run lint:jsandnpm run buildgreen, and must not add entries totools/eslint/suppressions.jsonor a@ts-expect-errorfor an in-repo import. Adding a suppression means the dependency should have been converted first. - Node tooling that runs untranspiled is exempt by the coding guidelines and is not on the critical path:
babel-plugin-*,babel-preset-default,browserslist-config,create-block*,dependency-extraction-webpack-plugin,docgen,e2e-tests,env,eslint-plugin,npm-package-json-lint-config,postcss-*,prettier-config,project-management-automation,readable-js-assets-webpack-plugin,scripts,stylelint-config.block-serialization-spec-parseris generated from a grammar.wp-buildis.mjsunderlib/already type checked through anoEmitproject, andbase-stylesis SCSS only.nuxandreusable-blocksare deprecated no-op shims. These form an optional separate track.
File-level rules
These apply to every converted file and are checked in review.
- Rename with
git mvand keep the content change in the same commit small enough that Git detects the rename. Do not reformat, reorder imports, rename variables or restructure code in a conversion PR. Moving type declarations intotypes.ts(rule 3) is the one allowed structural change. If a refactor is needed, land it as a separate PR before or after the conversion. After every commit, rungit show -M --stat <sha>and confirm each renamed file shows as{x.js => x.ts}; if one shows as a delete plus an add, keep cosmetic content such as JSDoc{Type}braces until the rename is detected again, but never keep residue for it. - No runtime changes. The emitted JavaScript must be equivalent. Type-only constructs (
import type,satisfies,as const, type assertions, non-null assertions) are fine. Changing a default value, a return value, an early return, an argument check or a dependency array is not. If the types reveal a real bug, fix it in a separate PR and link it. - Keep the implementation file lean. Put interfaces, prop types, option objects and unions in a sibling
types.tsin the same directory and import them withimport type. Only short aliases and function-local types stay inline. A directory with several components shares onetypes.ts. Re-export a prop type from the component'sindexwhen consumers already import it from there. - Preserve JSDoc. Move the description of every
@param,@return,@propertyand@typedefonto the corresponding type member or signature. Strip only the{Type}braces, unless rule 15 needs them kept. Descriptions of props go on the property intypes.ts, descriptions of functions stay on the function. Never delete a JSDoc type without adding the equivalent TypeScript annotation. - Drop the
WPprefix. A JSDoc typedef such asWPBlock,WPBlockSelection,WPFormatorWPDropOperationbecomesBlock,BlockSelection,Format,DropOperationintypes.ts. Where the owning package already exports the unprefixed type (BlockandBlockTypefromblocks,DataRegistryandStoreDescriptorfromdata), import that instead of creating a new one. Keep the prefixed name only when it is part of the public runtime API, such as an exported value or a deprecated alias, and add a/** @deprecated */alias pointing at the new name. TheWPprefix sentence indocs/contributors/code/coding-guidelines.mdapplies to JSDoc typedefs in unmigrated files only;WP*types already exported by converted packages (keycodes,priority-queue,rich-text,core-data) stay as they are. - Type exactly what the JSDoc said. Do not widen or narrow the public surface while converting. If the JSDoc was wrong, match the runtime behavior and note the correction in the PR description.
- No
any. Useunknownand narrow, generics, or a precise union. Useasonly where the value genuinely arrives untyped, such as a REST response or a third-party API returningunknown, and keep the cast at the boundary. - No new suppressions. No
@ts-expect-error,@ts-ignore,@ts-nocheckor ESLint disable for an in-repo import or a type that a dependency should provide. Needing one means a dependency must be converted first, or the imported file in the same package must be converted in the same PR. - Reuse exported types. Import
Block,StoreDescriptor,DataRegistry, component prop types and similar from the owning package instead of redeclaring them. Export a type fromtypes.tsor the packageindexwhen a consumer needs it. - Convert the tests with their sources. A PR that converts source files also converts the tests covering them, following rule 14 for any deliberate invalid input. Stories and fixtures stay
.jsunless the rename needs no content change beyond the extension. - Keep dependencies honest. When a converted file imports a type from a package not in
dependencies, add it rather than relying on hoisting, and runnpm run lint:published-deps. Types used only bysrcgo independenciesbecause they end up inbuild-types. - Lock-unlock and private APIs are typed through
@wordpress/private-apisgenerics; keep thelock-unlock.tsshape used by already converted packages such aspreferencesorrich-text. - One concern per PR. A PR converts a coherent set of files (a store, a directory, a component group), updates the tsconfigs and consumers' references it needs, and prunes the suppressions it makes obsolete. It does not mix conversion with features, fixes or formatting.
- Narrow every
@ts-expect-error. The directive silences every error on the next line, so place it directly above the argument, property or JSX prop that is deliberately wrong, splitting the expression over several lines if needed, never above a whole call or statement. Give it a description saying what is wrong and why. See You're probably using @ts-expect-error wrong. - Prefer Git history over clean JSDoc. Gutenberg squash-merges, so a file's history survives only if Git detects the rename in the whole PR diff, not only in each commit. Run
git diff -M --stat $(git merge-base origin/trunk HEAD)and confirm each converted file shows as{x.js => x.ts}. If one shows as a delete plus an add, move its types totypes.tsand keep the JSDoc@paramand@return{Type}braces until Git detects the rename. A follow-up PR strips those braces after the conversion lands.
Dependency waves
Each wave lists packages whose in-repo dependencies are all typed under rule 1 after the previous wave. Packages inside a wave are independent and can run in parallel. Sorted by no-TS first, then by number of dependents.
| Wave | Package | Status | Dependents | Unblocks | Blocked by | PRs |
|---|---|---|---|---|---|---|
| 1 | primitives | ✅ Done | 8 | components, editor, block-library, two widgets. | #84309 | |
| 1 | commands | ✅ Done | 6 | Removes the hand-written stub and its paths entry. Needed by block-editor and editor. | #84315 | |
| 1 | dom | ✅ Done | 14 | rich-text, compose, components, block-editor, editor. | #84317 | |
| 1 | preferences-persistence | ✅ Done | 0 | Leaf, no consumers. | #84312 | |
| 1 | workflow | ✅ Done | 0 | Private package, trivial. | #84311 | |
| 2 | rich-text | ✅ Done | 8 | block-editor, core-data, blocks, format-library, annotations. | #84324, #84365, #84378 | |
| 3 | block-editor | ✅ Done | 16 | Removes the any-module mapping and about 50 @ts-expect-error directives across the repo. Single largest blocker. | #84615 to #85213 | |
| 4 | core-data | ✅ Done | 41 | Remove "checkJs": false from its build project. | #85058 to #85078 | |
| 5 | patterns | ✅ Done | 6 | Removes the any-module mapping; unblocks fields and the pattern-list route suppressions. | #85253 to #85256 | |
| 5 | widgets | ✅ Done | 4 | edit-post, edit-site, edit-widgets, customize-widgets. 19 files. | #87195, #87196, #87197 | |
| 5 | core-commands | ✅ Done | 0 | Leaf. | #84385 | |
| 6 | editor | 🟢 Ready | 13 | Remove "checkJs": false. Unblocks lazy-editor and 8 routes. 298 files. | ||
| 6 | block-library | ✅ Done | 5 | Removes the any-module mapping. Converted per block directory, leaf blocks first. 810 files. | #87018 to #87802 | |
| 7 | edit-site | ⛔ Blocked | 0 | Leaf application. v1 site editor. | editor | |
| 7 | edit-widgets | 🟢 Ready | 0 | Leaf application. | ||
| 7 | customize-widgets | 🟢 Ready | 0 | Leaf application. | ||
| 7 | edit-post | ⛔ Blocked | 0 | Leaf application. | editor | |
| 7 | block-directory | ⛔ Blocked | 0 | Leaf application. | editor | |
| tail | components | ✅ Done | 48 | Clears up to 48 directives. | #84611 | |
| tail | compose | ✅ Done | 37 | #84382 | ||
| tail | global-styles-ui | ✅ Done | 4 | Vendored font-library libs (lib-font.browser.js, inflate.js, unbrotli.js); add a .d.ts instead of converting. Remove "checkJs": false. Add the missing types field. | #86354 | |
| tail | media-utils | ✅ Done | 4 | components/media-upload/index.js. Remove "checkJs": false. | #85854 | |
| tail | e2e-test-utils-playwright | ✅ Done | 1 | set-browser-viewport.js, request-utils/widgets.js. | #84917 |
Packages
- #67667
- #70362
-
a11y: #70680 -
annotations: #70602 -
api-fetch: #67669 -
block-serialization-default-parser: #70766 -
block-editor:- #84615
- ...
- #85036
-
block-library:-
#87018
-
#87411
-
#87485
-
<details><summary>More</summary>
- #87489
- #87527
- #87543
- #87544
- #87546
- #87548
- #87549
- #87557
- #87570
- #87571
- #87574
- #87577
- #87578
- #87585
- #87586
- #87587
- #87592
- #87593
- #87594
- #87596
- #87599
- #87600
- #87601
- #87602
- #87603
- #87604
- #87605
- #87606
- #87607
- #87609
- #87610
- #87611
- #87612
- #87613
- #87614
- #87615
- #87616
- #87617
- #87618
- #87625
- #87626
- #87627
- #87635
- #87636
- #87637
- #87645
- #87647
- #87649
- #87653
- #87654
- #87655
- #87677
- #87678
- #87679
- #87682
- #87708
- #87709
- #87715
- #87716
- #87718
- #87719
- #87743
- #87744
- #87747
- #87748
- #87749
- #87758
- #87759
- #87784
- #87785
- #87786
- #87787
- #87798
- #87801
- #87802
-
-
blocks: #76312 -
browserslist-config: #70521 -
commands: #84315 -
components: #84611 -
compose:- #70618
- #84382
-
core-commands#84385 -
core-data:- #85058
- …
- #85078
-
data: #76149 -
date: #67665 -
dom: #84317 -
dom-ready: #67671 -
element: #70886 -
format-library: #79486 -
html-entities: #69326 -
hooks: #70488 -
i18n: #70843 -
icons: #70456 -
interface: #82753 -
is-shallow-equal: #70407 -
jest-console: #70538 -
jest-puppeteer-axe: #70523 -
keycodes: #70466 -
keyboard-shortcuts: #76287 -
lazy-import: #70475 -
list-reusable-blocks: #70518 -
notices: #67670 -
patterns:- #85253
- #85254
- #85255
- #85256
-
plugins: #70773 -
preferences: #71915 -
preferences-persistence: #84312 -
priority-queue: #70469 -
prettier-config: #70533 -
primitives: #84309 -
project-management-automation: #71193 -
redux-routine: #70686 -
rich-text:- #84324
- #84365
- #84378
-
server-side-render: #71383 -
shortcode: #74522 -
sync: #71099 -
undo-manager: #70757 -
url: #70496 -
viewport: #71118 -
widgets:- #87195
- #87196
- #87197
-
wordcount: #70501 -
workflow: #84311 - #67666
- #79323
Follow-ups
Bugs and wrong types the conversions found, and left untouched to keep them free of runtime changes:
-
commands: fixed in #84377. -
dom: fixed in #84374. -
preferences-persistence: fixed in #84375. -
rich-text: fixed in #84610. -
workflow: fixed in #84361. -
compose:useMergeRefsrejectsfalserefs, anduseStateWithHistoryreturnsvalueasunknown(comment). - #85029, #85090 -
block-editor:isValueSpacingPresetreturns a non-boolean (comment), fix in #84730. -
block-editor: theorderreducer readsblockOrder[ '' ]on aMap. - #85818 -
block-editor: a stale controlled client ID makesgetBlockTreeBlockreturn a block without a client ID. - #87312 -
block-editor:useSettingpassesnotetodeprecated, which ignores it. - #85100 -
block-editor:getSliderValueFromPresetpasses a radix toparseFloat- #85163 -
block-editor:getAllPatternsDependantsreads astate.blockPatternsthat does not exist - #85198 -
block-editor:__experimentalGetAllowedBlockscalls agetDependantsthat registry selectors lack, so it throws. - #85851 -
block-editor:hasAllowedPatternsreadsnamefrom grammar blocks, which only haveblockName. - #85758 -
block-editor: move actions passnullroot client IDs, which the reducer does not default to''. - #85760 -
block-editor:persistoncreateReduxStorestays behind a@ts-expect-erroruntil the persistence plugin is deprecated (#39632). -
block-editor:StyleStateInspectorSlotsgets noblockName, so it cannot exclude template parts from the restricted section controls (comment). - #86084 -
block-editor: turning on a hooked block throws for filter-hooked blocks withoutblockHooks(comment). - #86452 -
block-editor: the patterns explorer and search results pass the pattern name as the insertion meta, unwrapped (comment). - #86745 -
block-editor: RichText hands completers anonReplacethat may be missing, and pattern completions replace the field with a nested block array (comment). - #87152 -
block-editor: withwithSlider,TextIndentControldrops theUnitControlprops it forwards without the slider (comment). - #86832 -
blocks: the types lacktransforms.ungroup, whichisUngroupablereads. - #86748 -
data: the persistence plugin throws without options, though the README callsuse( plugins.persistence )without them, found in #86846 during review. - #87060 -
data:coreDataStoreis typed asStoreDescriptor< AnyConfig >, soselect( coreDataStore ).hasFinishedResolution( 'demo', 'getValue' )gets the metadata signature( selectorName, args )instead of its runtime( storeName, selectorName, ...args ), found in #86989 during review. - #87190 -
patterns:RenamePatternCategoryModalsaves withoutthrowOnError, so a failed save callsonSuccess( undefined )and still announces the rename. - #85730 -
block-editortests: a registry selectors test passes a state as the root client ID, and avalidateBlocksToTemplatetest passes the wrong arguments - #85165 -
blocks:BlockBlockTransformis not discriminated onisMultiBlock, soisMatch,transformand__experimentalConverttakeX | X[]even when the factory always passes arrays (or never does), found in #87195 during review. -
blocks:BlockConfiguration[ 'transforms' ]typesfromwith the block's ownAttributesandtowith the generic ones, butfromtransforms receive the source block's attributes andtotransforms receive this block's, found in #87196 during review. -
core-data:getEditedEntityRecordnever reads a query, so the{ context: 'view' }that the template part preview passes only changes which records its memo watches, found in #87489 during review. -
block-library: the Categories block destructuresisResolvingTaxonomies, whichuseEntityRecordsdoes not return (it returnsisResolving), so it is alwaysundefined; found in #87551 during review. -
block-library: the Comment Date block checksdate instanceof Date, but the commentdatefromuseEntityPropis a string, so the formatted branch never runs and the editor shows the raw date; found in #87593 during review. -
block-library: the Comment Template block destructurescommentIdout of each comment, then keys oncomment.commentId, which is alwaysundefined, so the key is always the index; found in #87602 during review. -
block-library: the Query Pagination block deprecation omitsattributesandsupports, which deprecations do not inherit, so a migrated block losespaginationArrowand its support attributes; found in #87606 during review. -
block-library: the Avatar block takesminSizefrom the first avatar URL key, which is a string, and passes it to the numericRangeControlmin, where the reset fill math concatenates it; found in #87625 during review. -
block-library: the Unsupported block readsoriginalBlockType.settings.title, butgetBlockTypereturns the block type withtitleat the top level, so its accessibility label throws when the original block type is registered; found in #87645 during review. -
block-library: the Pattern Placeholder block test for self-referencing patterns putsslugat the top level of the fixture block instead of inattributes, so it passes on aTypeErrorfrom readingattributes.slug, not on the cycle error; found in #87645 during review. -
block-library: the Quote block'smigrateToQuoteV2returns a single paragraph block instead of an array as the inner blocks when the legacyvalueis empty, since d70856b4b0ce; found in #87655 during review. -
block-library: the List block's multi-block transform from paragraphs and headings readsblockAttributes.anchoron the array of attributes, so the source anchor is always lost, since d54e248bbb2d; found in #87678 during review. - #87842 -
block-library: the Pullquote block's multi-block transform from paragraphs readsattributes.anchoron the array of attributes, so the source anchor is always lost, since 21709e3c533e; found in #87679 during review. - #87842 -
block-library: the Playlist block'sgetTrackAttributesfalls back to the media URL for the trackid, whichblock.jsontypes as a number, so the parser drops it on reload, since fcce7f5efe74; found in #87718 during review. -
block-library: the Site Logo block's Settings and MediaToolsPanels omit the requiredresetAllprop, since 22c55f658ed3 and 8a9281f582f0; found in #87748 during review. -
block-library: the Page List block sets each item'slinkfrompage.url, which is not a page field and is not in the requested_fields, so the editor's page list item links render without anhref, since 9f2fe7d3467; found in #87786 during review. -
block-library: the Navigation block placeholder rendersNavigationMenuSelectorwithoutonCreateNew, so its "Create new Menu" item throws aTypeErrorwhen clicked, since 710a5b7cf84; found in #87798 during review. -
block-library: the Navigation block'sNavigationMenuSelectorsetsariaLabelon its menu choices, butMenuItemsChoicereadsaria-label, so theactionLabel(such as "Switch to '%s'") never reaches the navigation menu items, since 710a5b7cf84; found in #87798 during review. -
editor: the editor'smediaUploadpassesonSuccesstouploadMedia, which has noonSuccessoption, so theonSuccessthat theupload-mediaqueue passes is never called, since 2d7f2d8f0d3; found in #87823 during review.
Linked Pull Requests (0)
No linked or cross-referenced pull requests detected via GitHub timeline. Check comments below for informal claims before starting.
GitHub Comments (25)
@gziolo Is there a chance to get some of these package conversions reviewed and merged into trunk?
A few missing that need review + approval: #69314 #67671
I'm happy to pick any of these up and get them up to trunk head.
It seems that TypeScript conversion is underway in various packages, not just the @wordpress/block-editor package. Let's treat this issue as a tracking issue for all packages.
Thanks to everyone working on this issue.
I recommend reading https://github.com/WordPress/gutenberg/discussions/67781 once in relation to this issue. Perhaps it would be a good idea to proceed with converting low-level packages.
From https://github.com/WordPress/gutenberg/discussions/67781#discussion-7648178:
Avoid big scale migration of all packages: This is going to create a lot of noise in open PRs... instead focus on typing as we fix bugs and implement features. Some targeted package migrations can be beneficial though: Especially the low level ones (blocks, rich-text)
I just started working on migrating commands to TS at https://github.com/WordPress/gutenberg/pull/76286. I need to some more cleanup but I think it's honestly pretty close.
I just started working on migrating commands to TS at #76286. I need to some more cleanup but I think it's honestly pretty close.
I will soon start reviewing the PRs for this. Let us finish this job. 💪
Hi @manzoorwanijk As discussed here - https://github.com/WordPress/gutenberg/pull/82836#issuecomment-6357644726, I would be picking up packages/block to add the ts config and convert one test to ts, so we are unblocked on the PR - https://github.com/WordPress/gutenberg/pull/82836
Thanks,
Hi @manzoorwanijk, as Discussed here -- https://github.com/WordPress/gutenberg/issues/67691#issuecomment-6358162804, PR https://github.com/WordPress/gutenberg/pull/85534 is ready to be reviwed converting a single file to ts with config and unblocking https://github.com/WordPress/gutenberg/pull/82836.
Thanks,
I am taking the follow-up fix for block-editor: hasAllowedPatterns reads name from grammar blocks, which only have blockName. Opening a PR shortly.
I am taking the follow-up fix for block-editor: move actions pass null root client IDs, which the reducer does not default to ''. Opening a PR shortly.
I am taking the follow-up fix for block-editor: __experimentalGetAllowedBlocks calls a getDependants that registry selectors lack, so it throws. Opening a PR shortly.
I am working on converting the remaining test files in packages/data/src/redux-store/ to TypeScript. Opened #86152 for the metadata tests and #86156 for the reducer tests.
I am taking the core-data tests conversion (5 files): test/entity-sync.jsdom.test.js, test/sync.jsdom.test.js, utils/test/rtc-rich-text-cursor-scope.jsdom.test.js, utils/test/rtc-rich-text-offset-space.jsdom.test.js and utils/test/sync-undo-levels.test.js. Opening a PR shortly.
global-styles-ui: a .d.ts for the vendored font-library libs (lib-font.browser.js, inflate.js, unbrotli.js), then remove "checkJs": false and add the types field.
I am working on this now.
Who can pick up those follow up items related to data?
data: the persistence plugin throws without options, though the README callsuse( plugins.persistence )without them, found in #86846 during review.data:coreDataStoreis typed asStoreDescriptor< AnyConfig >, soselect( coreDataStore ).hasFinishedResolution( 'demo', 'getValue' )gets the metadata signature( selectorName, args )instead of its runtime( storeName, selectorName, ...args ), found in #86989 during review.
Who can pick up those follow up items related to
data?
data: the persistence plugin throws without options, though the README callsuse( plugins.persistence )without them, found in Data: Convert persistence plugin tests to TypeScript #86846 during review.[ ]data:coreDataStoreis typed asStoreDescriptor< AnyConfig >, soselect( coreDataStore ).hasFinishedResolution( 'demo', 'getValue' )gets the metadata signature( selectorName, args )instead of its runtime( storeName, selectorName, ...args ), found in Data: Convert registry tests to TypeScript #86989 during review.
I can take these up.
If there are no first-time contributors to take these up.
Thank you so much @manzoorwanijk for reviewing and merging all the @wordpress/data test conversion PRs! 🙌
Please let me know if anything else is needed or remaining around the @wordpress/data tests.
Otherwise, I would love to take up the next test conversion items: global-styles-ui (7 files), followed by blocks (34 files). Please let me know if anyone else is already working on these or if I can proceed!
Let us create a PR to add tsconfig.json and tsconfig.build.json files to the packages which aren't properly configured for TypeScript, e.g. block-directory, edit-post, edit-site, widgets, etc. We can set checkJs to false where necessary. This will allow us to start using TypeScript in those packages. Other packages that are not fully in TS yet can be helpful for set up.
Thanks @manzoorwanijk! That sounds like a great plan.
I would love to take this up and prepare a PR adding the split TypeScript configuration (tsconfig.json and tsconfig.build.json) with "checkJs": false for block-directory, edit-post, edit-site, widgets, and any other packages lacking them. I will link the PR here once ready!
I'll take the embed block directory, since audio, cover, image and video wait on it.
I'll take breadcrumbs and template-part next (since navigation and navigation-link wait on template-part).
I'll take archives next.
I'll take rss next.
I'll take tag-cloud next.
I'll take loginout, read-more, calendar, and categories next.
Issue Troubleshooting Threads (0)
No troubleshooting threads opened for this issue yet. If you hit a test, build, or navigation blocker, post what you've tried so fellow contributors can help.
PR Verification & Rewards
Sign in and link GitHub to verify your PR against this issue and earn XP + coins.
Contribution Workflow
Track your local progress before opening a pull request on GitHub.
Repository Context
Top Repository Paths
CONTRIBUTING.md Excerpt
Contributing Guidelines
Welcome to WordPress' Gutenberg project! We hope you join us in creating the future platform for publishing; all are welcome here.
How can I contribute?
To learn all about contributing to the Gutenberg project, see the Contributor Guide. The handbook includes all the details you need to get setup and start shaping the future of web publishing.
-
Code? See the developer section.
-
Design? See the design section.
-
Documentation? See the documentation section.
-
Triage? We need help reviewing existing issues to make sure they’re relevant and actionable. Triage is an important contribution because it allows us to work on the highest priority issues. To learn more, please see the triaging issues section.
Guidelines
-
As with all WordPress projects, we want to ensure a welcoming environment for everyone. With that in mind, all contributors are expected to follow our Code of Conduct.
-
Contributors should review the overall process and best practices for pull requests, adhering to WordPress' JavaScript coding standards and accessibility coding standards.
-
Accessibility should be top of mind and thoroughly tested by following the accessibility testing instructions.
-
The React Native Mobile Editor has been removed from
trunk. The previous integration was unmaintained and known to be broken following the upgrade to React 19 (#61521). Fixes for the existing Gutenberg Mobile build should be made by branching from the most recent React Native release — tagrnmobile/1.121.0at commit [e63b8b8](https://github.com/WordPress/gutenberg/commit/e63b8b8be7bd
... (truncated)
Advisory PR Assistant
Helps structure your PR description or unpack reviewer feedback. Does not perform GitHub actions.