Skip to content

Unhandled type warnigns #8

Open
@yackinn

Description

@yackinn

Describe the bug
We can see a lot of unhandled type warnigns in the terminal output on load of any resource in the admin panel.

Installed libraries and their versions
"@adminjs/express": "^4.1.0"
"@adminjs/mikroorm": "^1.1.0"
"@adminjs/nestjs": "^4.0.0"
"@mikro-orm/core": "^5.0.5"

To Reproduce
Steps to reproduce the behavior:

  1. Login
  2. Click on resource

Expected behavior
No unhandled type warning.

Screenshots
That's the console output.

Unhandled type: string
Unhandled type: string
Unhandled type: Date
Unhandled type: Date
Unhandled type: Date
Unhandled type: Date
Unhandled type: string
Unhandled type: string
Unhandled type: object
Unhandled type: object
Unhandled type: string
Unhandled type: string
Unhandled type: string
Unhandled type: string
Unhandled type: string
Unhandled type: string
Unhandled type: Date
Unhandled type: Date
Unhandled type: Date

AdminJSOptions with schema

@Entity({ customRepository: () => UserRepository })
export class User extends OmputBaseEntity {
  [EntityRepositoryType]?: UserRepository;

  @Property({ unique: true, columnType: 'varchar(255)' })
  @IsEmail()
  email: string;

  @Property({ hidden: true, columnType: 'varchar(255)' })
  password: ComparablePassword;

  @Property({ nullable: true })
  age?: number;

}

Desktop (please complete the following information if relevant):

  • OS: Macos Monterey
  • Browser Chrome
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.
That's our module setup using Nestjs.

AdminModule.createAdminAsync({
      inject: [MikroORM],
      useFactory: async (orm: MikroORM) => {
        return {
          adminJsOptions: {
            rootPath: '/admin',
            resources: [
              {
                resource: {
                  model: User,
                  orm,
                },
              }
            ]
          }
        };
      }
    }),

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions