How to use KeycloakAdapter

I need to fill locale property in KeycloakLoginOptions, so that it is visible on the keycloak URL

What is the best way to return value in KeycloakPromise<void, void> inside KeycloakAdapter.

const keycloakAdapter: KeycloakAdapter = {
  login(options: KeycloakCustomLoginOptions): KeycloakPromise<void, void> {
    options.locale = 'it';

    return options;

        initOptions: {
          onLoad: 'login-required',
          checkLoginIframe: false,
          adapter: keycloakAdapter,

Problem is that I always get error on return value