Skip to content

fix(typings): set correct typing for tsconfig/tsConfig#2377

Merged
ahnpnl merged 1 commit into26.5.2from
fix-option-types
Feb 18, 2021
Merged

fix(typings): set correct typing for tsconfig/tsConfig#2377
ahnpnl merged 1 commit into26.5.2from
fix-option-types

Conversation

@ahnpnl
Copy link
Copy Markdown
Collaborator

@ahnpnl ahnpnl commented Feb 18, 2021

Summary

  • Generate typing from https://json.schemastore.org/tsconfig in pre-build step and include the generated .d.ts into build asset
  • Use the generated .d.ts for tsconfig and tsConfig options

Closes #2368

Test plan

Green CI

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

N.A.

@ahnpnl ahnpnl linked an issue Feb 18, 2021 that may be closed by this pull request
@ahnpnl ahnpnl marked this pull request as ready for review February 18, 2021 18:24
@ahnpnl ahnpnl requested a review from kulshekhar as a code owner February 18, 2021 18:24
@ahnpnl ahnpnl merged commit d4f6aff into 26.5.2 Feb 18, 2021
@ahnpnl ahnpnl deleted the fix-option-types branch February 18, 2021 18:25
Comment thread src/tsconfig-raw.ts
disableSourceOfProjectReferenceRedirect?: boolean
disableSolutionSearching?: boolean
[k: string]: unknown
}
Copy link
Copy Markdown

@jimisaacs jimisaacs Feb 18, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ahnpnl This is unfortunate that ts-jest has to maintain this. I totally feel typescript package should export, and support a script API with these types.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you make this manually, or did you pull from somewhere?

const path = require('path')

void (async () => {
const response = await fetch('https://json.schemastore.org/tsconfig')
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jimisaacs pull and manually modified.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very cool 👍

This was referenced Mar 18, 2021
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.

Type definition and runtime for tsconfig option does not agree

2 participants