Had the same problem, could solve it bij including the keycloak type to the tsconfig.
{ "extends": "./tsconfig.json", ... "include": [ "src/**/*.d.ts", "./lib/keycloak.d.ts" ] }