Skip to content

build: Enable exactOptionalPropertyTypes#175

Closed
SimonAlling wants to merge 3 commits into
masterfrom
exactOptionalPropertyTypes
Closed

build: Enable exactOptionalPropertyTypes#175
SimonAlling wants to merge 3 commits into
masterfrom
exactOptionalPropertyTypes

Conversation

@SimonAlling
Copy link
Copy Markdown
Owner

@SimonAlling SimonAlling commented May 11, 2025

I'm considering introducing Semantic Versioning for TypeScript Types, which requires exactOptionalPropertyTypes (and noUncheckedIndexedAccess, which was enabled in #174).

Without skipLibCheck, we get this compilation error:

node_modules/@types/webpack/index.d.ts:2264:23 - error TS2430: Interface 'Options' incorrectly extends interface 'MinifyOptions'.
  Types of property 'sourceMap' are incompatible.
    Type 'boolean | undefined' is not assignable to type 'boolean | SourceMapOptions'.
      Type 'undefined' is not assignable to type 'boolean | SourceMapOptions'.

2264             interface Options extends UglifyJS.MinifyOptions {
                           ~~~~~~~

Maybe we can disable skipLibCheck again in the future, but for now it has to go.

@SimonAlling SimonAlling marked this pull request as ready for review May 11, 2025 18:53
SimonAlling added a commit that referenced this pull request May 11, 2025
I'm considering introducing [Semantic Versioning for TypeScript Types][semver-ts], which requires `exactOptionalPropertyTypes` (and `noUncheckedIndexedAccess`, which was enabled in #174).

Without `skipLibCheck`, we get this compilation error:

    node_modules/@types/webpack/index.d.ts:2264:23 - error TS2430: Interface 'Options' incorrectly extends interface 'MinifyOptions'.
      Types of property 'sourceMap' are incompatible.
        Type 'boolean | undefined' is not assignable to type 'boolean | SourceMapOptions'.
          Type 'undefined' is not assignable to type 'boolean | SourceMapOptions'.

    2264             interface Options extends UglifyJS.MinifyOptions {
                               ~~~~~~~

Maybe we can disable `skipLibCheck` again in the future, but for now it has to go.

[semver-ts]: https://www.semver-ts.org/#for-package-authors
@SimonAlling
Copy link
Copy Markdown
Owner Author

Uh, it was merged in 18def6e. 😵‍💫

@SimonAlling SimonAlling deleted the exactOptionalPropertyTypes branch May 11, 2025 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant