Skip to content
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

fix: added TypeScript project references for VSCode #1708

Merged
merged 1 commit into from
Mar 13, 2023

Conversation

KevinGhadyani-Okta
Copy link
Contributor

Description

VSCode would require a "TS Server" reset each time we ran a build or ran typecheck. With project references, that's no longer an issue.

Also, our type exports were looking at dist/index.d.ts which doesn't exist instead of dist/src/index.d.ts.

@@ -7,11 +7,11 @@
"sideEffects": false,
"main": "dist/index.js",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"types": "dist/src/index.d.ts",
Copy link
Contributor

Choose a reason for hiding this comment

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

src folder in dist? That is not common, right? Can we avoid that?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. Only the TS files because isolateModules: true.

Copy link
Contributor Author

@KevinGhadyani-Okta KevinGhadyani-Okta Mar 10, 2023

Choose a reason for hiding this comment

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

That's how it was the whole time. I don't think it's easy or necessary to fix.

Most libraries export a single index.d.ts, but if you saw ours, this makes more sense. In the timeframe, I wasn't able to get a single index.d.ts working with outFile.

@KevinGhadyani-Okta KevinGhadyani-Okta merged commit 44e2783 into develop Mar 13, 2023
@KevinGhadyani-Okta KevinGhadyani-Okta deleted the kg/OKTA-581346 branch March 13, 2023 16:32
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.

2 participants