blob: 0503e408ac4e8bf1e40247c70f68caf3e3a6b8d8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
import type { Graduation } from "./graduation-common.ts";
import { Student } from "./student-common.ts";
import { fetchStudentsMock as fetchStudents, fetchGraduationMock } from "./mock.ts";
declare module "./student-common.ts" {
interface Student {
getGraduation(): Promise<Graduation>;
getIconUrl(): Promise<string>;
}
}
Student.prototype.getGraduation = function () {
return fetchGraduationMock(this);
};
Student.prototype.getIconUrl = async function () {
return "";
};
async function fetchStudent(idFilter?: number, nameFilter?: string) {
const students = await fetchStudents(idFilter, nameFilter);
return students[0];
}
export { Student, fetchStudents, fetchStudent };
|