Inertia.js lets you quickly build modern single-page React, Vue and Svelte apps using classic server-side routing and controllers.
6.3k
stars
423
forks
source link
TypeScript types are not exported properly #1793
Open
irshadahmad21 opened 7 months ago
Versions:
@inertiajs/core
version:1.0.14@inertiajs/react
version: 1.0.14Describe the problem:
When importing types in a project with
NodeNext
asmodule
andmoduleResolution
intsconfig.json
, the types are not being resolved properly because.Steps to reproduce:
Error:
Similarly, there are other such errors for all the types when
strict
model is enabled intsconfig.json
"Parameter 'title' implicitly has an 'any' type."
"Binding element 'el' implicitly has an 'any' type."
"Binding element 'App' implicitly has an 'any' type."
"Binding element 'props' implicitly has an 'any' type."
"Parameter 'name' implicitly has an 'any' type."
Reason
arethetypeswrong correctly points out the problems with the exported types
@inertiajs/core@1.0.14
"@inertiajs/core"
"@inertiajs/core/server"
node10
node16
(from CJS)🚭 Unexpected module syntax
🥴 Internal resolution error (6)
❗️ Incorrect default export
🚭 Unexpected module syntax
🥴 Internal resolution error
node16
(from ESM)bundler
@inertiajs/react@1.0.14
"@inertiajs/react"
"@inertiajs/react/server"
node10
node16
(from CJS)🚭 Unexpected module syntax
🥴 Internal resolution error (6)
❗️ Incorrect default export
🚭 Unexpected module syntax
node16
(from ESM)bundler