-
Notifications
You must be signed in to change notification settings - Fork 86
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
Typescript #25
Typescript #25
Conversation
This comment has been minimized.
This comment has been minimized.
ad412a5
to
68c7664
Compare
This is pretty much in-line with the other octokit packages. I believe it's ready for a review |
|
Ha, yes. I completely forgot those ones. Will fix
|
0f55540
to
59fc388
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops looks like I started a review but never submitted it.
What’s left?
.travis.yml
Outdated
@@ -27,28 +27,23 @@ jobs: | |||
env: Node 10, coverage upload |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove the env:
key, it’s no longer needed. I use it as label but now we just test Node 10
There's only one problem left that is kinda annoying. The one with `Object.keys(). reduce`
I'm not sure I have the right types for function parameters, could you double check them all?
|
Yeah this is tricky. I spent some time on it but to no avail. It feels like Typescript is really getting into the way of a simple implementation here. I wonder if it would be easier to have all type definitions within the repository for now (remove the I think down the road I’d like to move all typescript definitions for |
src/error.ts
Outdated
import { GraphQlQueryResponse } from "./types"; | ||
|
||
export class GraphqlError<T extends GraphQlQueryResponse> extends Error { | ||
public request: Request; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
error.request
is not the @octokit/request
method, but request options (what @octokit/endpoint
returns, an object with just method
, url
, headers
and optionally body
and request
Any updates on this ? it would be really good to have TS for this lib. |
@giovannidegani you can look into the remaining open issues you can send a pull request against this branch if you like |
I have read through previous conversations, and I agree, let's deal with de-duplication later and do whats needed to get this working and make it easier |
👋 I'm looking into this now and will try to finish it up, as it blocks octokit/core.js#3 |
This comment has been minimized.
This comment has been minimized.
As far as I can see the only breaking change is the named export const { graphql } = require('@octokit/graphql') instead of const graphql = require('@octokit/graphql')
```
Which aligns with the other modules we converted to Typescript/ES Modules using Pika |
I ran the built version against the current test in |
🎉 This PR is included in version 4.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
ping @kevinpollet for updates and review when @wolfy1339 is ready