-
Notifications
You must be signed in to change notification settings - Fork 527
Open
Labels
1.xbugSomething isn't workingSomething isn't workingtypescriptRelated to TypeScript implementationRelated to TypeScript implementation
Description
Versions:
@inertiajs/core
version:1.0.14@inertiajs/react
version: 1.0.14
Describe the problem:
When importing types in a project with NodeNext
as module
and moduleResolution
in tsconfig.json
, the types are not being resolved properly because.
Steps to reproduce:
// app.ts
import { VisitOptions } from '@inertiajs/core';
Error:

Module '"@inertiajs/core"' has no exported member 'VisitOptions'.
Similarly, there are other such errors for all the types when strict
model is enabled in tsconfig.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" | "@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) |
🥴 Internal resolution error (6) | 🥴 Internal resolution error |
bundler |
✅ | ✅ |
"@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) |
🥴 Internal resolution error (6) | ✅ (ESM) |
bundler |
✅ | ✅ |
Metadata
Metadata
Assignees
Labels
1.xbugSomething isn't workingSomething isn't workingtypescriptRelated to TypeScript implementationRelated to TypeScript implementation