Skip to content

Commit

Permalink
update jsdoc for deps
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiTenno committed Jan 28, 2024
1 parent 9dd7945 commit f76f990
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion handlers/events/cycleLike.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { between, lastUpdated, fromNow } from '../../utilities/index.js';
/**
* CylceData parser
* @param {CycleLike} cycleData data for parsing all cycles like this
* @param deps
* @param {Deps} deps dependencies for processing
* @returns {*[]}
*/
export default (cycleData, deps) => {
Expand Down
2 changes: 1 addition & 1 deletion handlers/events/kuva.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import objectLike from './objectLike.js';

/**
* Process kuva fields
* @param {Object} deps dependencies for processing
* @param {Deps} deps dependencies for processing
* @param {Object[]} packets packets to emit
* @returns {Object|Object[]} object(s) to emit from kuva stuff
*/
Expand Down
13 changes: 11 additions & 2 deletions handlers/events/parse.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,18 @@ import cycleLike from './cycleLike.js';
import * as eKeyOverrides from './eKeyOverrides.js';
import { lastUpdated } from '../../utilities/index.js';

/**
* @typedef {Object} Deps
* @property {string} key event key being parsed
* @property {string} platform platform the event is on
* @property {string} language language the event is in
* @property {Date} cycleStart start of the current cycle
* @property {Object|Array} data data to parse
*/

/**
* Set up current cycle start if it's not been initiated
* @param {Object} deps dependencies for processing
* @param {Deps} deps dependencies for processing
*/
const initCycleStart = (deps) => {
if (!lastUpdated[deps.platform][deps.language]) {
Expand All @@ -19,7 +28,7 @@ const initCycleStart = (deps) => {

/**
* Parse new events from the provided worldstate
* @param {Object} deps dependencies to parse out events
* @param {Deps} deps dependencies to parse out events
* @returns {Packet|Packet[]} packet(s) to emit
*/
export default (deps) => {
Expand Down
2 changes: 1 addition & 1 deletion utilities/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'colors';

import { transports, createLogger, format } from 'winston';
import { LOG_LEVEL } from "./env.js";
import { LOG_LEVEL } from './env.js';

let tempLogger;
try {
Expand Down

0 comments on commit f76f990

Please sign in to comment.