Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@octokit/types

Package Overview
Dependencies
Maintainers
3
Versions
211
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@octokit/types - npm Package Compare versions

Comparing version 2.8.2 to 2.9.0

2

package.json
{
"name": "@octokit/types",
"version": "2.8.2",
"version": "2.9.0",
"publishConfig": {

@@ -5,0 +5,0 @@ "access": "public"

@@ -11,2 +11,19 @@ # types.ts

Get parameter and response data types for a REST API endpoint
```ts
import { Endpoints } from "./src";
type listUserReposParameters = Endpoints["GET /repos/:owner/:repo"]["parameters"];
type listUserReposResponse = Endpoints["GET /repos/:owner/:repo"]["response"];
async function listRepos(
options: listUserReposParameters
): listUserReposResponse["data"] {
// ...
}
```
Get parameter types for a REST API endpoint
Get response types from endpoint methods

@@ -13,0 +30,0 @@

@@ -26,5 +26,5 @@ import { EndpointDefaults } from "./EndpointDefaults";

options?: R extends keyof Endpoints
? Endpoints[R][0] & RequestParameters
? Endpoints[R]["parameters"] & RequestParameters
: RequestParameters
): R extends keyof Endpoints ? Endpoints[R][1] : RequestOptions;
): R extends keyof Endpoints ? Endpoints[R]["request"] : RequestOptions;

@@ -31,0 +31,0 @@ /**

@@ -20,1 +20,2 @@ export * from "./AuthInterface";

export * from "./GetResponseTypeFromEndpointMethod";
export * from "./generated/Endpoints";

@@ -26,6 +26,6 @@ import { EndpointInterface } from "./EndpointInterface";

options?: R extends keyof Endpoints
? Endpoints[R][0] & RequestParameters
? Endpoints[R]["parameters"] & RequestParameters
: RequestParameters
): R extends keyof Endpoints
? Promise<OctokitResponse<Endpoints[R][2]>>
? Promise<Endpoints[R]["response"]>
: Promise<OctokitResponse<any>>;

@@ -32,0 +32,0 @@

@@ -1,1 +0,1 @@

export const VERSION = "2.8.2";
export const VERSION = "2.9.0";

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc