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

Document the requirement of tooling support for package.exports #845

Closed
jasonkuhrt opened this issue May 10, 2024 · 8 comments
Closed

Document the requirement of tooling support for package.exports #845

jasonkuhrt opened this issue May 10, 2024 · 8 comments

Comments

@jasonkuhrt
Copy link
Member

jasonkuhrt commented May 10, 2024

Perceived Problem

Lots of issues like this thinking there is a bug:

Ideas / Proposed Solution(s)

  • Document the required modern TS setup that would support reading types from package.exports.

Related

Also please vote here :) #863

@jakeleventhal

This comment was marked as off-topic.

@jasonkuhrt
Copy link
Member Author

jasonkuhrt commented May 14, 2024

@jakeleventhal Your moduleResolution looks correct. If you want to share a repro repo I'll take a look at some point. You can make a new issue for that. Your comment is off topic from this issue which is about documentation mentioning the necessary TS setup.

@jasonkuhrt
Copy link
Member Author

Thanks @jakeleventhal! I'll try to take a look this week.

@jonkoops
Copy link
Collaborator

@jasonkuhrt it might be worth it to integrate publint and @arethetypeswrong/cli to automate the quality checks on CI.

@jasonkuhrt
Copy link
Member Author

Nice I'll take a look!

@jasonkuhrt
Copy link
Member Author

@jakeleventhal The issue is your config, its literally in the message you put in your README.

> src/index.ts:1:31 - error TS2307: Cannot find module 'graphql-request' or its corresponding type declarations.
  There are types at '/Users/jakeleventhal/Code/graphql-request-type-issue/packages/test/integrations/node_modules/graphql-request/build/entrypoints/main.d.ts', but this result could not be resolved under your current 'moduleResolution' setting. Consider updating to 'node16', 'nodenext', or 'bundler'.

1 import { GraphQLClient } from "graphql-request";

CleanShot 2024-05-15 at 22 59 59@2x

@jasonkuhrt
Copy link
Member Author

I'm locking this issue as it has been resolved.

@graffle-js graffle-js locked as resolved and limited conversation to collaborators May 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants