openapi-ts
openapi-ts copied to clipboard
Using `lint: "eslint"` with @typescript-eslint/consistent-type-definitions is breaking types
trafficstars
Description
When my eslint is running, it changes type to interface, breaking types for body.
this works:
export type PredictRequest = {
inputs: string;
};
export type HfPredictData = {
body: PredictRequest;
};
export const hfPredict = <ThrowOnError extends boolean = false>(
options: Options<HfPredictData, ThrowOnError>,
) => {
return (options?.client ?? client).post<
HfPredictResponse,
HfPredictError,
ThrowOnError
>({
...options,
url: "/api/v1/hf/predict",
});
};
this breaks it:
export interface PredictRequest {
inputs: string;
}
Reproducible example or configuration
No response
OpenAPI specification (optional)
No response
System information (optional)
No response