typeit
Advanced tools
Comparing version 8.8.2 to 8.8.3
@@ -1,2 +0,2 @@ | ||
declare const _default: (el: HTMLElement) => boolean; | ||
declare const _default: (el: HTMLElement) => el is HTMLInputElement; | ||
export default _default; |
@@ -347,3 +347,5 @@ // TypeIt by Alex MacArthur - https://typeitjs.com | ||
const isInput = (el) => "value" in el; | ||
const isInput = (el) => { | ||
return "value" in el; | ||
}; | ||
@@ -350,0 +352,0 @@ let getAllChars = (element) => { |
@@ -59,6 +59,5 @@ /// <reference types="web-animations-js" /> | ||
export type QueueMapPair = [Symbol, QueueItem]; | ||
export interface El extends HTMLElement { | ||
value: string | number; | ||
export type El = (HTMLElement | HTMLInputElement) & { | ||
originalParent?: HTMLElement; | ||
} | ||
}; | ||
export type Sides = "START" | "END"; |
{ | ||
"name": "typeit", | ||
"version": "8.8.2", | ||
"version": "8.8.3", | ||
"description": "The most versatile animated typing utility on the planet.", | ||
@@ -5,0 +5,0 @@ "author": "Alex MacArthur <alex@macarthur.me> (https://macarthur.me)", |
@@ -1,1 +0,3 @@ | ||
export default (el: HTMLElement): boolean => "value" in el; | ||
export default (el: HTMLElement): el is HTMLInputElement => { | ||
return "value" in el; | ||
} |
@@ -329,3 +329,3 @@ import Queue, { QueueI } from "./Queue"; | ||
if (this.#elementIsInput()) { | ||
this.element.value = ""; | ||
(this.element as HTMLInputElement).value = ""; | ||
return; | ||
@@ -531,3 +531,3 @@ } | ||
#elementIsInput() { | ||
#elementIsInput(): boolean { | ||
return isInput(this.element); | ||
@@ -677,3 +677,3 @@ } | ||
if (this.#isInput) { | ||
this.element.value = (this.element.value as string).slice(0, -1); | ||
(this.element as HTMLInputElement).value = ((this.element as HTMLInputElement).value as string).slice(0, -1); | ||
} else { | ||
@@ -680,0 +680,0 @@ this.#removeNode(this.#allChars[this.cursorPosition]); |
@@ -80,7 +80,6 @@ export type Character = { | ||
export interface El extends HTMLElement { | ||
value: string | number; | ||
originalParent?: HTMLElement; | ||
} | ||
export type El = (HTMLElement | HTMLInputElement) & { originalParent?: HTMLElement }; | ||
// export type NewEl = (HTMLElement | HTMLInputElement) & { originalParent?: HTMLElement }; | ||
export type Sides = "START" | "END"; |
Copyleft License
License(Experimental) Copyleft license information was found
Found 1 instance in 1 package
SPDX disjunction
LicenseSPDX disjunction for an artifact's license information
Found 1 instance in 1 package
Non-permissive License
License(Experimental) A license not known to be considered permissive was found
Found 1 instance in 1 package
SPDX disjunction
LicenseSPDX disjunction for an artifact's license information
Found 1 instance in 1 package
91903
2598
3
70