Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

typed-dom

Package Overview
Dependencies
Maintainers
1
Versions
350
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typed-dom - npm Package Compare versions

Comparing version 0.0.265 to 0.0.266

10

dom.ts

@@ -113,5 +113,11 @@ import { Symbol, document } from 'spica/global';

export function define<T extends Element | DocumentFragment | ShadowRoot>(node: T, attrs?: Attrs | Children, children?: Children): T {
// Need the next type assertions to suppress an impossible type error on dependent projects.
// Probably caused by typed-query-selector.
//
// typed-dom/dom.ts(113,3): Error TS2322: Type 'ParentNode & Node' is not assignable to type 'T'.
// 'T' could be instantiated with an arbitrary type which could be unrelated to 'ParentNode & Node'.
//
return isChildren(attrs)
? defineChildren(node, attrs)
: defineChildren(defineAttrs(node as Element, attrs) as T, children);
? defineChildren(node, attrs) as T
: defineChildren(defineAttrs(node as Element, attrs), children) as T;
}

@@ -118,0 +124,0 @@ function defineAttrs<T extends Element>(el: T, attrs: Attrs): T {

2

package.json
{
"name": "typed-dom",
"version": "0.0.265",
"version": "0.0.266",
"description": "A value-level and type-level DOM builder.",

@@ -5,0 +5,0 @@ "private": false,

@@ -113,5 +113,11 @@ import { Symbol, document } from 'spica/global';

export function define<T extends Element | DocumentFragment | ShadowRoot>(node: T, attrs?: Attrs | Children, children?: Children): T {
// Need the next type assertions to suppress an impossible type error on dependent projects.
// Probably caused by typed-query-selector.
//
// typed-dom/dom.ts(113,3): Error TS2322: Type 'ParentNode & Node' is not assignable to type 'T'.
// 'T' could be instantiated with an arbitrary type which could be unrelated to 'ParentNode & Node'.
//
return isChildren(attrs)
? defineChildren(node, attrs)
: defineChildren(defineAttrs(node as Element, attrs) as T, children);
? defineChildren(node, attrs) as T
: defineChildren(defineAttrs(node as Element, attrs), children) as T;
}

@@ -118,0 +124,0 @@ function defineAttrs<T extends Element>(el: T, attrs: Attrs): T {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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