displaying bar graph, fetching distributions message
This commit is contained in:
9
src/shared/messages/CourseDataMessages.ts
Normal file
9
src/shared/messages/CourseDataMessages.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { Course } from '../types/Course';
|
||||
|
||||
export default interface CourseDataMessages {
|
||||
/**
|
||||
* Gets the distribution of grades for the given course
|
||||
* @returns an array of the number of students in each grade range from A+ to F, with the index of the array corresponding to the grade range
|
||||
*/
|
||||
getDistribution: (data: { course: Course }) => number[] | undefined;
|
||||
}
|
||||
@@ -1,6 +1,4 @@
|
||||
/**
|
||||
* This is a type with all the message definitions that can be sent TO specific tabs
|
||||
*/
|
||||
export default interface TAB_MESSAGES {
|
||||
reAnalyzePage: (data: { url: string }) => void;
|
||||
}
|
||||
export default interface TAB_MESSAGES {}
|
||||
|
||||
@@ -3,18 +3,21 @@ import TAB_MESSAGES from './TabMessages';
|
||||
import BrowserActionMessages from './BrowserActionMessages';
|
||||
import HotReloadingMessages from './HotReloadingMessages';
|
||||
import TabManagementMessages from './TabManagementMessages';
|
||||
import CourseDataMessages from './CourseDataMessages';
|
||||
|
||||
/**
|
||||
* This is a type with all the message definitions that can be sent TO the background script
|
||||
*/
|
||||
export type BACKGROUND_MESSAGES = BrowserActionMessages & TabManagementMessages & HotReloadingMessages;
|
||||
export type BACKGROUND_MESSAGES = BrowserActionMessages &
|
||||
TabManagementMessages &
|
||||
HotReloadingMessages &
|
||||
CourseDataMessages;
|
||||
|
||||
/**
|
||||
* A utility object that can be used to send type-safe messages to the background script
|
||||
*/
|
||||
export const bMessenger = createMessenger<BACKGROUND_MESSAGES>('background');
|
||||
|
||||
|
||||
/**
|
||||
* A utility object that can be used to send type-safe messages to specific tabs
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user