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

Moved web.d.ts in /src folder to fix import in Index.d.ts #15

Closed
wants to merge 1 commit into from

Conversation

Aekk0
Copy link

@Aekk0 Aekk0 commented Aug 18, 2022

No description provided.

@tony-go
Copy link
Member

tony-go commented Sep 1, 2022

Hey @Aekk0 👋

Thanks for submitting a pull request 🙌

Could you please fill the description with:

  • a bit of context
  • what is the output of the PR

Cheers ^^

@Aekk0
Copy link
Author

Aekk0 commented Sep 5, 2022

Hey @tony-go

  • The export in index.d.ts is wrong since web.d.ts isn't in the src folder but at the root of the project. Instead of changing this line of export, It came to me that it was more logical to move the web.d.ts file into the src folder as others types are exported in it.
  • Fixing the error from @nodesecure/scanner related to the export of types definitions as shown below.

image

@tony-go
Copy link
Member

tony-go commented Sep 7, 2022

Hey @Aekk0 👋

Thanks for providing these details.

I experienced the same yesterday: https://github.com/NodeSecure/preview/pull/28/files

I had a chat with @fraxken, and it seems that it's volunteered to make the lib compatible with nodejs and browsers.

So I think that import { FlagObject } from "@nodesecure/flags/web" will be the new way to go.

@fraxken
Copy link
Member

fraxken commented Sep 7, 2022

@tony-go I don't think it was the same problem.

I discussed the subject this morning with @Rossb0b on discord. The web.d.ts was at the root because of an issue with TypeScript being not able to read the exports field in the package.json (So it was not providing intellisense in VSCode).

For context I had a discussion in french in the community:
image

microsoft/TypeScript#33079

Maybe this has been resolved in recent version of TS (this need to be tested).

@tony-go
Copy link
Member

tony-go commented Sep 19, 2022

Thanks for your answer @fraxken 👍

Could you test with a different version of ts and tell us if it fixes the bug? @Aekk0?

@fraxken
Copy link
Member

fraxken commented Jan 6, 2023

Closing for inactivity

@fraxken fraxken closed this Jan 6, 2023
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.

3 participants