i'm studying TS and building a microconfig file like:
import { __prod__ } from './constants'
import { Options, MikroORM } from '@mikro-orm/core'
import path from 'path'
const config: Options = {
migrations: {
path: path.join(__dirname, './migrations'),
pattern: /^[\w-]+\d+\.[tj]s$/,
},
entities: [Post],
dbName: 'lireddit',
user: 'postgres',
password: 'StrongPassword',
type: 'postgresql',
debug: !__prod__,
} as Parameters<typeof MikroORM.init>[0];
export default config;
when i try to compile the console gives me this:
src/mikro-orm.config.ts:6:7 - error TS2322: Type 'Options<IDatabaseDriver<Connection>> | Configuration<IDatabaseDriver<Connection>> | undefined' is not assignable to type 'Options<IDatabaseDriver<Connection>>'.
Trying to create mikroConfig file to MikroORM with typescript and i got this error message, when i try to compile, that's a type error, but i cant figure out whats the problem.