mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix: export site public API to be used in the VS Code extension (#21165)
This commit is contained in:
+2
-1
@@ -2827,7 +2827,8 @@ interface ClientApi extends ApiMethods {
|
||||
getAxiosInstance: () => AxiosInstance;
|
||||
}
|
||||
|
||||
class Api extends ApiMethods implements ClientApi {
|
||||
/** @public Exported for use by external consumers (e.g., VS Code extension). */
|
||||
export class Api extends ApiMethods implements ClientApi {
|
||||
constructor() {
|
||||
const scopedAxiosInstance = getConfiguredAxiosInstance();
|
||||
super(scopedAxiosInstance);
|
||||
|
||||
@@ -31,7 +31,8 @@ export const isApiError = (err: unknown): err is ApiError => {
|
||||
);
|
||||
};
|
||||
|
||||
const isApiErrorResponse = (err: unknown): err is ApiErrorResponse => {
|
||||
/** @public Exported for use by external consumers (e.g., VS Code extension). */
|
||||
export const isApiErrorResponse = (err: unknown): err is ApiErrorResponse => {
|
||||
return (
|
||||
typeof err === "object" &&
|
||||
err !== null &&
|
||||
|
||||
Reference in New Issue
Block a user