@podium/utils
Advanced tools
Comparing version 5.0.6 to 5.0.7
@@ -0,1 +1,8 @@ | ||
## [5.0.7](https://github.com/podium-lib/utils/compare/v5.0.6...v5.0.7) (2024-05-15) | ||
### Bug Fixes | ||
* type context and view to Record instead of {} ([#238](https://github.com/podium-lib/utils/issues/238)) ([ab68b88](https://github.com/podium-lib/utils/commit/ab68b88e750f9314457d3b954ca3b954b8e44d61)) | ||
## [5.0.6](https://github.com/podium-lib/utils/compare/v5.0.5...v5.0.6) (2024-05-13) | ||
@@ -2,0 +9,0 @@ |
@@ -14,6 +14,8 @@ import { URL } from 'node:url'; | ||
* @template {Record<string, unknown>} [T=Record<string, unknown>] | ||
* @template {Record<string, unknown>} [U=Record<string, unknown>] | ||
* @template {Record<string, unknown>} [V=Record<string, unknown>] | ||
* @typedef {object} PodiumHttpIncoming | ||
* @property {string} name | ||
* @property {object} context | ||
* @property {object} view | ||
* @property {U} context | ||
* @property {V} view | ||
* @property {URL} url | ||
@@ -27,3 +29,7 @@ * @property {Array<import('./asset-css.js').CssAsset | string>} css | ||
/** @template {Record<string, unknown>} [T=Record<string, unknown>] */ | ||
/** | ||
* @template {Record<string, unknown>} [T=Record<string, unknown>] | ||
* @template {Record<string, unknown>} [U=Record<string, unknown>] | ||
* @template {Record<string, unknown>} [V=Record<string, unknown>] | ||
*/ | ||
export default class HttpIncoming { | ||
@@ -33,6 +39,9 @@ #development; | ||
#request; | ||
/** @type {U} */ | ||
#context; | ||
/** @type {T} */ | ||
#params; | ||
#proxy; | ||
#name; | ||
/** @type {V} */ | ||
#view; | ||
@@ -71,2 +80,3 @@ | ||
this.#request = request; | ||
// @ts-expect-error Not happy about the generics, but this is safe | ||
this.#context = {}; | ||
@@ -76,2 +86,3 @@ this.#params = params; | ||
this.#name = ''; | ||
// @ts-expect-error Not happy about the generics, but this is safe | ||
this.#view = {}; | ||
@@ -78,0 +89,0 @@ this.#url = undefined; |
{ | ||
"name": "@podium/utils", | ||
"version": "5.0.6", | ||
"version": "5.0.7", | ||
"description": "Common generic utility methods shared by @podium modules.", | ||
@@ -5,0 +5,0 @@ "type": "module", |
/// <reference types="node" resolution-mode="require"/> | ||
/** | ||
* @template {Record<string, unknown>} [T=Record<string, unknown>] | ||
* @template {Record<string, unknown>} [U=Record<string, unknown>] | ||
* @template {Record<string, unknown>} [V=Record<string, unknown>] | ||
* @typedef {object} PodiumHttpIncoming | ||
* @property {string} name | ||
* @property {object} context | ||
* @property {object} view | ||
* @property {U} context | ||
* @property {V} view | ||
* @property {URL} url | ||
@@ -15,4 +17,8 @@ * @property {Array<import('./asset-css.js').CssAsset | string>} css | ||
*/ | ||
/** @template {Record<string, unknown>} [T=Record<string, unknown>] */ | ||
export default class HttpIncoming<T extends Record<string, unknown> = Record<string, unknown>> { | ||
/** | ||
* @template {Record<string, unknown>} [T=Record<string, unknown>] | ||
* @template {Record<string, unknown>} [U=Record<string, unknown>] | ||
* @template {Record<string, unknown>} [V=Record<string, unknown>] | ||
*/ | ||
export default class HttpIncoming<T extends Record<string, unknown> = Record<string, unknown>, U extends Record<string, unknown> = Record<string, unknown>, V extends Record<string, unknown> = Record<string, unknown>> { | ||
/** | ||
@@ -39,4 +45,4 @@ * @constructor | ||
get request(): any; | ||
set context(value: {}); | ||
get context(): {}; | ||
set context(value: U); | ||
get context(): U; | ||
/** | ||
@@ -60,4 +66,4 @@ * @type {unknown} | ||
get name(): string; | ||
set view(value: {}); | ||
get view(): {}; | ||
set view(value: V); | ||
get view(): V; | ||
set url(value: URL); | ||
@@ -77,7 +83,7 @@ get url(): URL; | ||
request: any; | ||
context: {}; | ||
context: U; | ||
params: T; | ||
proxy: boolean; | ||
name: string; | ||
view: {}; | ||
view: V; | ||
url: URL; | ||
@@ -90,6 +96,6 @@ css: (string | import("./asset-css.js").CssAsset)[]; | ||
} | ||
export type PodiumHttpIncoming<T extends Record<string, unknown> = Record<string, unknown>> = { | ||
export type PodiumHttpIncoming<T extends Record<string, unknown> = Record<string, unknown>, U extends Record<string, unknown> = Record<string, unknown>, V extends Record<string, unknown> = Record<string, unknown>> = { | ||
name: string; | ||
context: object; | ||
view: object; | ||
context: U; | ||
view: V; | ||
url: URL; | ||
@@ -96,0 +102,0 @@ css: Array<import('./asset-css.js').CssAsset | string>; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
88699
1492