Skip to content

[TypeScript] Improve public API configuration option types - #1521

Merged
Kocal merged 1 commit into
symfony:typescript-migrationfrom
Kocal:typescript/improve-public-api-types
Jul 23, 2026
Merged

[TypeScript] Improve public API configuration option types#1521
Kocal merged 1 commit into
symfony:typescript-migrationfrom
Kocal:typescript/improve-public-api-types

Conversation

@Kocal

@Kocal Kocal commented Jul 22, 2026

Copy link
Copy Markdown
Member
Q A
Bug fix? no
New feature? no
Deprecations? no
Issues Fix #...
License MIT

Retype the configuration methods that used a bare object.

Options now resolve to the real loader/plugin types:

  • reused via inline import() where the package ships them (friendly-errors, manifest, dev-server, babel presets, fork-ts-checker, vue-loader, webpack-notifier, ts-loader, split-chunks),
  • and hand-written interfaces aligned with the supported peerDependency ranges for the loaders that ship no usable types (css/style/sass/less/stylus/postcss/handlebars-loader).

Retype the configuration methods that used a bare `object`. Options now resolve to the real loader/plugin types: reused via inline `import()` where the package ships them (friendly-errors, manifest, dev-server, babel presets, fork-ts-checker, vue-loader, webpack-notifier, ts-loader, split-chunks), and hand-written interfaces aligned with the supported peerDependency ranges for the loaders that ship no usable types (css/style/sass/less/stylus/postcss/handlebars-loader).
@Kocal Kocal self-assigned this Jul 22, 2026
@Kocal
Kocal marked this pull request as ready for review July 22, 2026 05:15
@carsonbot carsonbot added the Status: Needs Review Needs to be reviewed label Jul 22, 2026
@Kocal
Kocal merged commit 0ce3fd6 into symfony:typescript-migration Jul 23, 2026
38 checks passed
@Kocal
Kocal deleted the typescript/improve-public-api-types branch July 23, 2026 18:50
Kocal added a commit that referenced this pull request Jul 23, 2026
This PR was squashed before being merged into the main branch.

Discussion
----------

Migrate project to TypeScript ✨

| Q              | A
| -------------- | ---
| Bug fix?       | no
| New feature?   | yes <!-- please update CHANGELOG.md file -->
| Deprecations?  | no <!-- please update CHANGELOG.md file -->
| Issues         | Fix #816 <!-- prefix each issue number with "Fix #", no need to create an issue if none exists, explain below instead -->
| License        | MIT

<!--
Replace this notice by a description of your feature/bugfix.
This will help reviewers and should be a good start for the documentation.

Additionally (see https://symfony.com/releases):
 - Always add tests and ensure they pass.
 - Features and deprecations must be submitted against the latest branch.
 - For new features, provide some code snippets to help understand usage.
 - Changelog entry should follow https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry
 - Never break backward compatibility.
-->

Commits
-------

53a691a [TypeScript] Improve public API configuration option types (#1521)
bbebcee Minor improvements
c1e0ecc [TypeScript] Use .js import specifiers and drop TS-extension tsconfig options (#1512)
283f574 [TypeScript] Migrate `index.js` (#1511)
4715f6e [TypeScript] Migrate `lib/*` (#1510)
aabcc9e [TypeScript] Migrate `lib/webpack/*` (#1509)
91ee952 [TypeScript] Migrate `lib/config/*` (#1508)
26451d4 [TypeScript] Improve "too weak" types
2077a7c [TypeScript] Migrate `lib/plugins/*` (#1507)
5546c1a [TypeScript] Migrate `lib/loaders/*` (#1506)
e14a18f [TypeScript] Migrate `lib/plugins/*` (#1505)
21db592 [TypeScript] Migrate `lib/utils/*` (#1504)
3e3c786 Prepare TypeScript migration (#1502)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Status: Needs Review Needs to be reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants