Socket
Socket
Sign inDemoInstall

jsxte

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsxte - npm Package Compare versions

Comparing version 3.3.0 to 3.3.1

29

CHANGELOG.md

@@ -0,1 +1,30 @@

## 3.3.1 (March 16, 2024)
### Features
- #### feat: added an option to extend the allowed attribute type on all tags all at once ([#330](https://github.com/ncpa0/jsxte/pull/330))
Added a new functionality that allows users to define a type that all attributes on all tags will accept.
```ts
class Box<T> {
constructor(public v: T) {}
toString() {
return String(this.v);
}
}
declare global {
namespace JSXTE {
interface AttributeAcceptedTypes {
ALL: Box<any>;
}
}
}
// thanks to the interface declared above, the following will not raise errors:
const div = <div class={new Box(123)}></div>; // ok
```
## 3.3.0 (February 1, 2024)

@@ -2,0 +31,0 @@

5

dist/types/jsx/base-html-tag-props.d.ts

@@ -9,6 +9,9 @@ import type { ComponentApi } from "../component-api/component-api";

] extends [never] ? JSXTE.BaseHTMLTagProps : Partial<T> & JSXTE.BaseHTMLTagProps>>;
type ExtendAllValues<T> = JSXTE.AttributeAcceptedTypes extends {
ALL: infer U;
} ? T | U : T;
type ExtendBaseProps<P> = {
[K in keyof P]: JSXTE.AttributeAcceptedTypes extends {
[E in K]: infer T;
} ? T | P[K] : P[K];
} ? ExtendAllValues<T | P[K]> : ExtendAllValues<P[K]>;
};

@@ -15,0 +18,0 @@ declare global {

6

package.json
{
"name": "jsxte",
"version": "3.3.0",
"version": "3.3.1",
"description": "JSX-based html templating engine for browsers or Node environments.",

@@ -55,4 +55,4 @@ "license": "MIT",

"@types/node": "^20.10.6",
"@typescript-eslint/eslint-plugin": "~6.19.1",
"@typescript-eslint/parser": "~6.19.1",
"@typescript-eslint/eslint-plugin": "~7.0.0",
"@typescript-eslint/parser": "~6.21.0",
"axios": "~1.6.0",

@@ -59,0 +59,0 @@ "dprint": "^0.45.0",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc