Skip to content

fix(create-package): remove unneeded ts-expect-error directives #6019

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ccharly
Copy link
Contributor

@ccharly ccharly commented Jun 23, 2025

Explanation

It seems those directives are not required anymore. If we keep them as is, invoking yarn create-package ... does fail with the following error:

/path/to/core/node_modules/ts-node/src/index.ts:859
    return new TSError(diagnosticText, diagnosticCodes, diagnostics);
           ^
TSError: ⨯ Unable to compile TypeScript:
scripts/create-package/cli.ts:23:5 - error TS2578: Unused '@ts-expect-error' directive.

23     // @ts-expect-error: The CommandModule<T, U>[] signature does in fact exist,
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
scripts/create-package/cli.ts:46:5 - error TS2578: Unused '@ts-expect-error' directive.

46     // @ts-expect-error: This does in fact exist, but it is missing from our yargs types.
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    at createTSError (/path/to/core/node_modules/ts-node/src/index.ts:859:12)
    at reportTSError (/path/to/core/node_modules/ts-node/src/index.ts:863:19)
    at getOutput (/path/to/core/node_modules/ts-node/src/index.ts:1077:36)
    at Object.compile (/path/to/core/node_modules/ts-node/src/index.ts:1433:41)
    at Module.m._compile (/path/to/core/node_modules/ts-node/src/index.ts:1617:30)
    at Module._extensions..js (node:internal/modules/cjs/loader:1422:10)
    at Object.require.extensions.<computed> [as .ts] (/path/to/core/node_modules/ts-node/src/index.ts:1621:12)
    at Module.load (node:internal/modules/cjs/loader:1203:32)
    at Function.Module._load (node:internal/modules/cjs/loader:1019:12)
    at Module.require (node:internal/modules/cjs/loader:1231:19) {
  diagnosticCodes: [ 2578, 2578 ]
}

References

N/A

Changelog

N/A

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed, highlighting breaking changes as necessary
  • I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant