Add Biome for lint and code quality check #2
10
src/main.ts
10
src/main.ts
|
@ -38,7 +38,7 @@ export default (options: ComponentOptions) => {
|
|||
private _states: Record<string, any> = {}
|
||||
private _stateToElementsMap: Record<string, Set<HTMLElement>> = {}
|
||||
private _currentRenderingElement: HTMLElement | null = null
|
||||
private _statesListeners: Record<string, Function> = {}
|
||||
private _statesListeners: Record<string, (...args: any[]) => void> = {}
|
||||
private _textBindings: Array<{
|
||||
node: Text
|
||||
expr: string
|
||||
|
@ -69,9 +69,9 @@ export default (options: ComponentOptions) => {
|
|||
set: (target: Record<string, any>, keyPath: string, value: any) => {
|
||||
const valueRoute = keyPath.split('.')
|
||||
let currentTarget = target
|
||||
for (let i in valueRoute) {
|
||||
for (const i in valueRoute) {
|
||||
const key = valueRoute[i]
|
||||
if (parseInt(i) === valueRoute.length - 1) {
|
||||
if (Number.parseInt(i) === valueRoute.length - 1) {
|
||||
currentTarget[key] = value
|
||||
} else {
|
||||
if (!currentTarget[key]) {
|
||||
|
@ -110,9 +110,9 @@ export default (options: ComponentOptions) => {
|
|||
|
||||
const valueRoute = keyPath.split('.')
|
||||
let currentTarget = target
|
||||
for (let i in valueRoute) {
|
||||
for (const i in valueRoute) {
|
||||
const key = valueRoute[i]
|
||||
if (parseInt(i) === valueRoute.length - 1) {
|
||||
if (Number.parseInt(i) === valueRoute.length - 1) {
|
||||
return currentTarget[key]
|
||||
} else {
|
||||
if (!currentTarget[key]) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user