-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Closed
Labels
Milestone
Description
Describe the bug
When using
import * as Keycloak from 'keycloak-js';
const keycloak = Keycloak({
I receive
Type '{ default: (config?: string | KeycloakConfig | undefined) => KeycloakInstance; }' has no call signatures.
Version
15.0.2
Expected behavior
One should be able to import Keycloak and use it with TypeScript without turning on allowSyntheticDefaultImports.
Actual behavior
TS2349: This expression is not callable.
Type '{ default: (config?: string | KeycloakConfig | undefined) => KeycloakInstance; }' has no call signatures.
How to Reproduce?
Import keycloak with import * as Keycloak from 'keycloak-js';
Anything else?
Suggested solution: Export like any other library in 2021 by exporting all functions individually as modules and with a default export.