Dexie has no construct signatures #2219
-
|
I'm working on Svelte & Neutralino application, and I'm encountering an error while roughly following this tutorial. /* db.ts */
import Dexie, { type Table } from 'dexie';
interface Event {
id: string,
name: string
}
const db = new Dexie('calendar') as Dexie & {
events: Table<Event, string>
}
db.version(1).stores({
events: '&id, name'
});
export type { Event };
export { db };So
While
I am unsure what the problem is here. This is what my tsconfig.json looks like: {
"extends": "./.svelte-kit/tsconfig.json",
"compilerOptions": {
"allowImportingTsExtensions": true,
"allowJs": true,
"checkJs": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"sourceMap": true,
"strict": true,
"module": "NodeNext",
"moduleResolution": "NodeNext",
"verbatimModuleSyntax": true,
"isolatedModules": true
}
} |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
Try import { Dexie, type Table } from "dexie" |
Beta Was this translation helpful? Give feedback.
-
|
That works. I suppose it would be wise to update the tutorial. |
Beta Was this translation helpful? Give feedback.
Try