Skip to content

Commit

Permalink
refactor: get types from abslog directly
Browse files Browse the repository at this point in the history
  • Loading branch information
wkillerud committed May 14, 2024
1 parent 6f087f2 commit b087fbf
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions lib/podlet.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ const pkg = JSON.parse(pkgJson);
const { template } = utils;

/**
* @typedef {(...args: any) => void} LogFunction
* @typedef {{ trace: LogFunction, debug: LogFunction, info: LogFunction, warn: LogFunction, error: LogFunction, fatal: LogFunction }} AbsLogger
*
* @typedef {Object} PodletOptions
* @property {string} name - (required) podlet name
* @property {string} version - (required) podlet version
Expand All @@ -40,7 +37,7 @@ const { template } = utils;
* @property {string} [content] - path where the podlet content HTML markup is served from (default '/')
* @property {string} [fallback] - path where the podlet fallback HTML markup is served from (default '/fallback')
* @property {boolean} [development] - a boolean flag that, when true, enables additional development setup (default false)
* @property {Console | AbsLogger} [logger] - a logger to use when provided. Can be the console object if console logging is desired but can also be any Log4j compatible logging object as well. Nothing is logged if no logger is provided. (default null)
* @property {import('abslog').AbstractLoggerOptions} [logger] - a logger to use when provided. Can be the console object if console logging is desired but can also be any Log4j compatible logging object as well. Nothing is logged if no logger is provided. (default null)
* @property {import("@podium/proxy").PodiumProxyOptions} [proxy] - options that can be provided to configure the @podium/proxy instance used by the podlet. See that module for details.
*
* @typedef {{ debug: 'true' | 'false', locale: string, deviceType: string, requestedBy: string, mountOrigin: string, mountPathname: string, publicPathname: string }} PodletContext
Expand Down Expand Up @@ -131,7 +128,7 @@ export default class PodiumPodlet {
* podlet.log.fatal('fatal log to the console')
* ```
*
* @type {AbsLogger}
* @type {import('abslog').ValidLogger}
*/
log;

Expand Down

0 comments on commit b087fbf

Please sign in to comment.