Fix
Some checks failed
Lint / lint (push) Failing after 38s

This commit is contained in:
Julien Valverdé
2026-01-01 17:47:59 +01:00
parent 93fabb16ba
commit 45f84810b5
2 changed files with 4 additions and 4 deletions

View File

@@ -2,8 +2,8 @@ import type * as Godot from "godot"
import * as React from "react" import * as React from "react"
export type Component<T extends Godot.Node> = React.FunctionComponent<Props<T>> export type Component<T extends Godot.Node<Godot.NodePathMap>> = React.FunctionComponent<Props<T>>
export type Props<T extends Godot.Node> = { export type Props<T extends Godot.Node<Godot.NodePathMap>> = {
// biome-ignore lint/complexity/noBannedTypes: using Function here is completely fine // biome-ignore lint/complexity/noBannedTypes: using Function here is completely fine
[K in keyof T as T[K] extends Function ? never : K]?: T[K] [K in keyof T as T[K] extends Function ? never : K]?: T[K]
} }
@@ -13,7 +13,7 @@ export interface InstrinsicAttributes {
readonly name?: string readonly name?: string
} }
export const make = <T extends Godot.Node>( export const make = <T extends Godot.Node<Godot.NodePathMap>>(
class_: new (...args: any[]) => T class_: new (...args: any[]) => T
): Component<T> => { ): Component<T> => {
const f = (props: Props<T>) => React.createElement("element", { ...props, class: class_ }) const f = (props: Props<T>) => React.createElement("element", { ...props, class: class_ })

View File

@@ -19,7 +19,7 @@ export const renderComponent: {
} = ( } = (
container: Node<NodePathMap>, container: Node<NodePathMap>,
component: React.FC<{}>, component: React.FC<{}>,
props?: Record<string, unknown>, props?: React.Attributes,
): void => { ): void => {
const reconciler = Reconciler.make() const reconciler = Reconciler.make()