keycloak/keycloak-nodejs-admin-client

keycloak property has type any

jenny-s51 opened this issue · 4 comments

Describe the bug
A clear and concise description of what the bug is.
See https://github.com/keycloak/keycloak-admin-ui/pull/896#discussion_r684386959

To Reproduce
Steps to reproduce the behavior:

  1. Search adminClient.keycloak in the new admin console repo
  2. See that the type of keycloak is identified as KeycloakAdminClient.keycloak: any

This is because we don't want to import the keycloak-js statically as it will make this package not usable in node. Under normal usage you wouldn't need to access this property

We can still only import the type using a type-only import perhaps?

Something like:

import type { KeycloakInstance } from 'keycloak-js'

export type Foo {
  keycloak: KeycloakInstance
}

right if that works that would be great

fixed with #231