Skip to content

Conversation

@sindresorhus
Copy link
Member

Fixes #839

@sindresorhus sindresorhus requested a review from spence-s October 26, 2025 07:04
@xojs xojs deleted a comment from claude bot Oct 26, 2025
@xojs xojs deleted a comment from claude bot Oct 26, 2025
@xojs xojs deleted a comment from claude bot Oct 26, 2025
@xojs xojs deleted a comment from claude bot Oct 26, 2025
@sindresorhus sindresorhus marked this pull request as draft October 26, 2025 07:12
@xojs xojs deleted a comment from claude bot Oct 26, 2025
@sindresorhus sindresorhus force-pushed the simplify-ts branch 2 times, most recently from 8e7f90b to ec16ef7 Compare October 26, 2025 07:54
@sindresorhus sindresorhus marked this pull request as ready for review October 26, 2025 07:57
@xojs xojs deleted a comment from claude bot Oct 26, 2025
@xojs xojs deleted a comment from claude bot Oct 26, 2025
@xojs xojs deleted a comment from claude bot Oct 26, 2025
@xojs xojs deleted a comment from claude bot Oct 26, 2025
try {
const compilerOptions = getFallbackCompilerOptions(cwd);
const program = ts.createProgram(files, {...compilerOptions});
Object.defineProperty(program, 'toJSON', {
Copy link
Contributor

Choose a reason for hiding this comment

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

Always got stuck on the serialization errors in the past with this. This is really cool.

Copy link
Contributor

@spence-s spence-s left a comment

Choose a reason for hiding this comment

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

Looks good to me! This is awesome.

I didn't run it, but looked through it thoroughly, I think its a better approach.

It's unfortunate we still have to write the virtual files to disk.

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.

Simplify TypeScript handling

3 participants