5
bun.lock
5
bun.lock
@@ -39,7 +39,6 @@
|
||||
"version": "0.1.0",
|
||||
"dependencies": {
|
||||
"react-reconciler": "~0.33.0",
|
||||
"type-fest": "^5.3.1",
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react-reconciler": "~0.32.0",
|
||||
@@ -321,8 +320,6 @@
|
||||
|
||||
"supports-preserve-symlinks-flag": ["supports-preserve-symlinks-flag@1.0.0", "", {}, "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w=="],
|
||||
|
||||
"tagged-tag": ["tagged-tag@1.0.0", "", {}, "sha512-yEFYrVhod+hdNyx7g5Bnkkb0G6si8HJurOoOEgC8B/O0uXLHlaey/65KRv6cuWBNhBgHKAROVpc7QyYqE5gFng=="],
|
||||
|
||||
"to-regex-range": ["to-regex-range@5.0.1", "", { "dependencies": { "is-number": "^7.0.0" } }, "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ=="],
|
||||
|
||||
"turbo": ["turbo@2.7.2", "", { "optionalDependencies": { "turbo-darwin-64": "2.7.2", "turbo-darwin-arm64": "2.7.2", "turbo-linux-64": "2.7.2", "turbo-linux-arm64": "2.7.2", "turbo-windows-64": "2.7.2", "turbo-windows-arm64": "2.7.2" }, "bin": { "turbo": "bin/turbo" } }, "sha512-5JIA5aYBAJSAhrhbyag1ZuMSgUZnHtI+Sq3H8D3an4fL8PeF+L1yYvbEJg47akP1PFfATMf5ehkqFnxfkmuwZQ=="],
|
||||
@@ -339,8 +336,6 @@
|
||||
|
||||
"turbo-windows-arm64": ["turbo-windows-arm64@2.7.2", "", { "os": "win32", "cpu": "arm64" }, "sha512-tcnHvBhO515OheIFWdxA+qUvZzNqqcHbLVFc1+n+TJ1rrp8prYicQtbtmsiKgMvr/54jb9jOabU62URAobnB7g=="],
|
||||
|
||||
"type-fest": ["type-fest@5.3.1", "", { "dependencies": { "tagged-tag": "^1.0.0" } }, "sha512-VCn+LMHbd4t6sF3wfU/+HKT63C9OoyrSIf4b+vtWHpt2U7/4InZG467YDNMFMR70DdHjAdpPWmw2lzRdg0Xqqg=="],
|
||||
|
||||
"typescript": ["typescript@5.9.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="],
|
||||
|
||||
"unicorn-magic": ["unicorn-magic@0.3.0", "", {}, "sha512-+QBBXBCvifc56fsbuxZQ6Sic3wqqc3WWaqxs58gvJrcOuN83HGTCwz3oS5phzU9LthRNE9VrJCFCLUgHeeFnfA=="],
|
||||
|
||||
@@ -41,8 +41,7 @@
|
||||
"@types/react-reconciler": "~0.32.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"react-reconciler": "~0.33.0",
|
||||
"type-fest": "^5.3.1"
|
||||
"react-reconciler": "~0.33.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@types/react": "^19.2.0",
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import type * as Godot from "godot"
|
||||
import type { CamelCase } from "type-fest"
|
||||
|
||||
|
||||
type NodeClass = {
|
||||
@@ -8,19 +7,20 @@ type NodeClass = {
|
||||
: never
|
||||
}[keyof typeof Godot]
|
||||
|
||||
type PropsFromInstance<T> = {
|
||||
// biome-ignore lint/complexity/noBannedTypes: it's completely fine
|
||||
[K in keyof T as T[K] extends Function ? never : K]?: T[K]
|
||||
}
|
||||
|
||||
type GodotIntrinsicElements = {
|
||||
[K in NodeClass as CamelCase<K>]: PropsFromInstance<InstanceType<(typeof Godot)[K]>>
|
||||
[K in NodeClass as PascalToCamel<K>]: PropsFromInstance<InstanceType<(typeof Godot)[K]>>
|
||||
} & {
|
||||
custom: {
|
||||
class: new (...args: any[]) => Godot.Node
|
||||
}
|
||||
}
|
||||
|
||||
type PascalToCamel<S extends string> = S extends `${infer F}${infer R}` ? `${Lowercase<F>}${R}` : S
|
||||
type PropsFromInstance<T> = {
|
||||
// biome-ignore lint/complexity/noBannedTypes: it's completely fine
|
||||
[K in keyof T as T[K] extends Function ? never : K]?: T[K]
|
||||
}
|
||||
|
||||
declare global {
|
||||
namespace React {
|
||||
namespace JSX {
|
||||
|
||||
Reference in New Issue
Block a user