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(js): use outDir to avoid ambient type definition creation #1396

Merged
merged 2 commits into from Jun 9, 2022

Conversation

IanVS
Copy link
Contributor

@IanVS IanVS commented May 26, 2022

Fixes one of the issues reported in #985.

This generates the same kind of definition files as @docsearch/react, not ambient (global) definitions that were being produced previously, which were incorrect (see reproduction: https://stackblitz.com/edit/typescript-decjve?file=index.ts).

I tested this by copying the new dist folder into the node_modules of my own project, and the type error disappeared.

@netlify
Copy link

netlify bot commented May 26, 2022

Deploy Preview for docsearch canceled.

Name Link
🔨 Latest commit a78320a
🔍 Latest deploy log https://app.netlify.com/sites/docsearch/deploys/62a1bd25ad28c90008a860c7

@codesandbox-ci
Copy link

codesandbox-ci bot commented May 26, 2022

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit a78320a:

Sandbox Source
Vanilla Configuration

@IanVS
Copy link
Contributor Author

IanVS commented May 26, 2022

Here's a modified CSB based on the bot's above, that shows the issue is resolved: https://codesandbox.io/s/vanilla-forked-s6o0zl?file=/src/index.ts

@shortcuts shortcuts changed the title Use outDir to avoid ambient type definition creation fix(js): use outDir to avoid ambient type definition creation Jun 9, 2022
Copy link
Member

@shortcuts shortcuts left a comment

Choose a reason for hiding this comment

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

Thanks! ☺️

@shortcuts shortcuts enabled auto-merge (squash) June 9, 2022 09:27
@shortcuts shortcuts disabled auto-merge June 9, 2022 09:34
@shortcuts shortcuts enabled auto-merge (squash) June 9, 2022 09:35
@shortcuts shortcuts disabled auto-merge June 9, 2022 09:47
@shortcuts shortcuts merged commit 4c924bc into algolia:next Jun 9, 2022
@IanVS IanVS deleted the fix-js-types branch June 9, 2022 12:55
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.

None yet

2 participants