Skip to content

Commit ac1d51a

Browse files
authored
fix: export site public API to be used in the VS Code extension (#21165)
1 parent 493f771 commit ac1d51a

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

site/src/api/api.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2827,7 +2827,8 @@ interface ClientApi extends ApiMethods {
28272827
getAxiosInstance: () => AxiosInstance;
28282828
}
28292829

2830-
class Api extends ApiMethods implements ClientApi {
2830+
/** @public Exported for use by external consumers (e.g., VS Code extension). */
2831+
export class Api extends ApiMethods implements ClientApi {
28312832
constructor() {
28322833
const scopedAxiosInstance = getConfiguredAxiosInstance();
28332834
super(scopedAxiosInstance);

site/src/api/errors.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ export const isApiError = (err: unknown): err is ApiError => {
3131
);
3232
};
3333

34-
const isApiErrorResponse = (err: unknown): err is ApiErrorResponse => {
34+
/** @public Exported for use by external consumers (e.g., VS Code extension). */
35+
export const isApiErrorResponse = (err: unknown): err is ApiErrorResponse => {
3536
return (
3637
typeof err === "object" &&
3738
err !== null &&

0 commit comments

Comments
 (0)