alit-element
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -11,3 +11,3 @@ import 'reflect-metadata'; | ||
*/ | ||
$(id: string): HTMLElement | null; | ||
$(id: string): HTMLElement; | ||
/** | ||
@@ -17,3 +17,3 @@ * Find first element macthing the slector in the element's shadow root. | ||
*/ | ||
$$(selector: string): HTMLElement | null; | ||
$$(selector: string): HTMLElement; | ||
/** | ||
@@ -20,0 +20,0 @@ * Find all elements matching the selector in the element's shadow root. |
@@ -20,5 +20,2 @@ import 'reflect-metadata'; | ||
} | ||
else { | ||
return null; | ||
} | ||
} | ||
@@ -25,0 +22,0 @@ return this._$[id]; |
@@ -81,1 +81,4 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
export { AlitCard }; | ||
// export function as<T extends GuildElement>(node: HTMLElement): T { | ||
// return (node as any) as T; | ||
// } |
{ | ||
"name": "alit-element", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "A simple wrapper for lit-element with some enhanced functions", | ||
@@ -5,0 +5,0 @@ "main": "dist/alit-element.js", |
@@ -13,3 +13,3 @@ import 'reflect-metadata'; | ||
*/ | ||
$(id: string): HTMLElement | null { | ||
$(id: string): HTMLElement { | ||
if (!this._$[id]) { | ||
@@ -19,4 +19,2 @@ const e = this.shadowRoot.querySelector(`#${id}`); | ||
this._$[id] = e; | ||
} else { | ||
return null; | ||
} | ||
@@ -31,3 +29,3 @@ } | ||
*/ | ||
$$(selector: string): HTMLElement | null { | ||
$$(selector: string): HTMLElement { | ||
return this.shadowRoot.querySelector(selector); | ||
@@ -34,0 +32,0 @@ } |
@@ -51,2 +51,6 @@ import { AlitElement, html, TemplateResult, element, property } from '../alit-element'; | ||
} | ||
} | ||
} | ||
// export function as<T extends GuildElement>(node: HTMLElement): T { | ||
// return (node as any) as T; | ||
// } |
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
15603
435