This package transforms all Eloquent Models defined in
to Typescript definitions
npm i @escolalms/ts-models
or yarn add @escolalms/ts-models
index.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 || {}),
});
}
npm
re-run all jobs
Generated using TypeDoc