Skip to content

Commit

Permalink
TypeScript fix: Use correct ApplicationState interface
Browse files Browse the repository at this point in the history
The `ApplicationState` interface has in the new version of
`@types/hapi__hapi` been split up into:

- `RequestApplicationState`
- `ResponeApplicationState`
- `ServerApplicationState`

See PR for more info:
DefinitelyTyped/DefinitelyTyped#36361

It looks like the one we want to use is `RequestApplicationState`.
  • Loading branch information
watson committed Oct 28, 2020
1 parent 441a1d9 commit a34f502
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/server/http/router/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import { URL } from 'url';
import uuid from 'uuid';
import { Request, RouteOptionsApp, ApplicationState } from '@hapi/hapi';
import { Request, RouteOptionsApp, RequestApplicationState } from '@hapi/hapi';
import { Observable, fromEvent, merge } from 'rxjs';
import { shareReplay, first, takeUntil } from 'rxjs/operators';
import { RecursiveReadonly } from '@kbn/utility-types';
Expand All @@ -42,7 +42,7 @@ export interface KibanaRouteOptions extends RouteOptionsApp {
/**
* @internal
*/
export interface KibanaRequestState extends ApplicationState {
export interface KibanaRequestState extends RequestApplicationState {
requestId: string;
requestUuid: string;
rewrittenUrl?: URL;
Expand Down

0 comments on commit a34f502

Please sign in to comment.