Closed klippx closed 1 month ago
👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labled with Status: Up for grabs
. You & others like you are the reason all of this works! So thank you & happy coding! 🚀
What is your tsconfig?
can you test again with the latest version? We had a build config bug that was resolved in v4.0.2
seems stil:
my tsconfig:
{
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "Node",
"esModuleInterop": true,
"strict": true,
"resolveJsonModule": true,
"declaration": true,
"outDir": "dist",
"skipLibCheck": true,
"rootDir": "src"
},
"include": ["src", "types", "bin"]
}
Currently using 4.0.2, works fine on 3.1.2.
Please read up https://www.typescriptlang.org/docs/handbook/modules/reference.html#packagejson-exports and https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
This is an error with your tsconfig.json
, you have to use either node16
or nodenext
modules and moduleresolution
Oh very sorry for taking up your time because of my problem, I made changes based on your suggestions and have fixed the problem, thanks!
The original author hasn't responded, and given that #2676 was resolved and that this seems like a case of misconfigured TypeScript, I will close this
Yes, my project was not correctly in ESM, not in terms of typescript. After applying NodeNext and absolute imports octokit
works fine.
What happened?
TS does not seem to like the
import("@octokit/core/types").Constructor
or any suchimport
, it resolves toany
as you can see in the screenshot when I hover it:This causes my ts-eslint to panic
Unsafe assignment of an
anyvalue.eslint[@typescript-eslint/no-unsafe-assignment](https://typescript-eslint.io/rules/no-unsafe-assignment)
, but since it is opt-in most people might not even notice they start gettingany
all over the place.My
.eslintrc.js
Related to #2676
Versions
Octokit.js 4.0.1
Relevant log output
No response
Code of Conduct