This package transforms all Eloquent Models defined in
to Typescript definitions
npm i @escolalms/ts-models or yarn add @escolalms/ts-modelsindex.d.ts (if you have one)import "@escolalms/ts-models";
tsconfig in include section "include": ["node_modules/@escolalms/ts-models"]
The above is declaring namespaces, example ns EscolaLms.StationaryEvents.Models.StationaryEvent that are take from PHP namespace.
Below is example
export async function stationaryEvents(
params: API.PaginationParams & {
name?: string;
},
options?: Record<string, any>
) {
return request<
API.DefaultMetaResponse<EscolaLms.StationaryEvents.Models.StationaryEvent>
>(`/api/admin/stationary-events`, {
method: "GET",
params: {
...params,
},
...(options || {}),
});
}
npmre-run all jobsGenerated using TypeDoc