ENGLISH·COURSE API
    Preparing search index...

    Port: the tickets a learner has earned, one per lesson.

    A ticket is earned the first time its lesson counts as complete and is kept from then on — un-marking the lesson never takes it back (capability learner-achievements). So the port can only add: earn records a batch, skipping lessons already held, and there is no way to remove one.

    earn takes a batch because tickets are recorded for every complete lesson a page knows about at once, such as the Achievements page catching up on lessons completed before tickets were stored.

    interface EarnedTicketRepository {
        list(): Promise<ReadonlySet<string & $brand<"LessonId">>>;
        earn(lessonIds: readonly (string & $brand<"LessonId">)[]): Promise<void>;
    }

    Implemented by

    Index

    Methods

    Methods