Skip to content

Commit

Permalink
more naming
Browse files Browse the repository at this point in the history
  • Loading branch information
shakyShane committed Jan 25, 2025
1 parent 7bb0c38 commit d75d7d3
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions special-pages/pages/new-tab/app/activity/ActivityProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,17 +126,18 @@ export function ActivityProvider(props) {
*/

/**
* @typedef Normalized
* @typedef NormalizedActivity
* @property {Record<string, Item>} items
* @property {Record<string, HistoryEntry[]>} history
* @property {Record<string, TrackingStatus>} trackingStatus
* @property {Record<string, boolean>} favorites
*/

/**
* @param {Normalized} prev
* todo: benchmark this, is it too slow with large datasets?
* @param {NormalizedActivity} prev
* @param {ActivityData} data
* @return {Normalized}
* @return {NormalizedActivity}
*/
function normalizeItems(prev, data) {
return {
Expand Down Expand Up @@ -208,7 +209,7 @@ export function shallowDiffers(a, b) {
}

export const SignalStateContext = createContext({
activity: signal(/** @type {Normalized} */ ({})),
activity: signal(/** @type {NormalizedActivity} */ ({})),
keys: signal(/** @type {string[]} */ ([])),
});

Expand Down

0 comments on commit d75d7d3

Please sign in to comment.