@octokit/types 1.1.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@octokit/types",
3
- "version": "1.1.0",
3
+ "version": "2.0.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -11,7 +11,7 @@
11
11
  "lint": "prettier --check '{src,test}/**/*' README.md package.json !src/generated/*",
12
12
  "lint:fix": "prettier --write '{src,test}/**/*' README.md package.json !src/generated/*",
13
13
  "pretest": "npm run -s lint",
14
- "test": "./node_modules/.bin/tsc --noEmit src/index.ts",
14
+ "test": "./node_modules/.bin/tsc --noEmit --declaration src/index.ts",
15
15
  "update-endpoints": "npm-run-all update-endpoints:*",
16
16
  "update-endpoints:fetch-json": "node scripts/update-endpoints/fetch-json",
17
17
  "update-endpoints:typescript": "node scripts/update-endpoints/typescript"
@@ -12,8 +12,11 @@ import { Route } from "./Route";
12
12
  * For the official implementations of the most common authentication
13
13
  * strategies, see https://github.com/octokit/auth.js
14
14
  */
15
- export interface AuthInterface {
16
- (options?: any): Promise<any>;
15
+ export interface AuthInterface<
16
+ AuthOptions extends any[],
17
+ Authentication extends any
18
+ > {
19
+ (...args: AuthOptions): Promise<Authentication>;
17
20
 
18
21
  hook: {
19
22
  /**
@@ -0,0 +1,9 @@
1
+ import { AuthInterface } from "./AuthInterface";
2
+
3
+ export interface StrategyInterface<
4
+ StrategyOptions extends any[],
5
+ AuthOptions extends any[],
6
+ Authentication extends object
7
+ > {
8
+ (...args: StrategyOptions): AuthInterface<AuthOptions, Authentication>;
9
+ }
package/src/VERSION.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = "1.1.0";
1
+ export const VERSION = "2.0.0";
package/src/index.ts CHANGED
@@ -1,36 +1,18 @@
1
- import { AuthInterface } from "./AuthInterface";
2
- import { EndpointDefaults } from "./EndpointDefaults";
3
- import { EndpointInterface } from "./EndpointInterface";
4
- import { EndpointOptions } from "./EndpointOptions";
5
- import { Fetch } from "./Fetch";
6
- import { OctokitResponse } from "./OctokitResponse";
7
- import { RequestHeaders } from "./RequestHeaders";
8
- import { RequestInterface } from "./RequestInterface";
9
- import { RequestMethod } from "./RequestMethod";
10
- import { RequestOptions } from "./RequestOptions";
11
- import { RequestParameters } from "./RequestParameters";
12
- import { RequestRequestOptions } from "./RequestRequestOptions";
13
- import { ResponseHeaders } from "./ResponseHeaders";
14
- import { Route } from "./Route";
15
- import { Signal } from "./Signal";
16
- import { Url } from "./Url";
1
+ export { AuthInterface } from "./AuthInterface";
2
+ export { EndpointDefaults } from "./EndpointDefaults";
3
+ export { EndpointInterface } from "./EndpointInterface";
4
+ export { EndpointOptions } from "./EndpointOptions";
5
+ export { Fetch } from "./Fetch";
6
+ export { OctokitResponse } from "./OctokitResponse";
7
+ export { RequestHeaders } from "./RequestHeaders";
8
+ export { RequestInterface } from "./RequestInterface";
9
+ export { RequestMethod } from "./RequestMethod";
10
+ export { RequestOptions } from "./RequestOptions";
11
+ export { RequestParameters } from "./RequestParameters";
12
+ export { RequestRequestOptions } from "./RequestRequestOptions";
13
+ export { ResponseHeaders } from "./ResponseHeaders";
14
+ export { Route } from "./Route";
15
+ export { Signal } from "./Signal";
16
+ export { StrategyInterface } from "./StrategyInterface";
17
+ export { Url } from "./Url";
17
18
  export { VERSION } from "./VERSION";
18
-
19
- export {
20
- AuthInterface,
21
- EndpointDefaults,
22
- EndpointInterface,
23
- EndpointOptions,
24
- Fetch,
25
- OctokitResponse,
26
- RequestHeaders,
27
- RequestInterface,
28
- RequestMethod,
29
- RequestOptions,
30
- RequestParameters,
31
- RequestRequestOptions,
32
- ResponseHeaders,
33
- Route,
34
- Signal,
35
- Url
36
- };