We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
version
.withDefaults()
In a nutshell I want octokitGhes31_v1 and octokitGhes31_v2 to have both the internal version type set to "ghes-3.1."
octokitGhes31_v1
octokitGhes31_v2
"ghes-3.1."
const OctokitWithDefaultVersion = Octokit.withDefaults({ version: "ghes-3.1" }); const octokitGhes31_v1 = new OctokitWithDefaultVersion(); const octokitGhes31_v2 = new Octokit({ version: "ghes-3.1" });
Here is a TypeScript test file that should compile, but currently has several errors
import { Octokit } from "@octokit-next/core"; import "@octokit-next/types-rest-api-ghes-3.0"; export async function run() { const octokit = new Octokit({ version: "ghes-3.1", }); const response = await octokit.request("GET /ghes-only"); expectType<boolean>(response.data.ok); const OctokitGHES31 = Octokit.withDefaults({ version: "ghes-3.1", }); const octokitGhes31 = new OctokitGHES31(); expectType<never>(await octokitGhes31.request("GET /dotcom-only")); const octokitGhes30ViaConstructorOptions = new OctokitGHES31({ version: "ghes-3.0", }); expectType<never>( await octokitGhes30ViaConstructorOptions.request("GET /new-ghes-only") ); const OctokitGHES30 = OctokitGHES31.withDefaults({ version: "ghes-3.0", }); const octokitGhes30ViaChainedDefaults = new OctokitGHES30(); expectType<never>( await octokitGhes30ViaChainedDefaults.request("GET /new-ghes-only") ); } function expectType<T>(value: T): void {}
The text was updated successfully, but these errors were encountered:
octokit.request
Octokit.ApiVersions
authStrategy
See also #20. version and authStrategy are special options that way
Sorry, something went wrong.
🎉 This issue has been resolved in version 1.5.4 🎉
The release is available on:
Your semantic-release bot 📦🚀
Successfully merging a pull request may close this issue.
In a nutshell I want
octokitGhes31_v1
andoctokitGhes31_v2
to have both the internal version type set to"ghes-3.1."
Here is a TypeScript test file that should compile, but currently has several errors
The text was updated successfully, but these errors were encountered: