Skip to content

Commit

Permalink
refactor(api-server): update routeOption type to Required<DefineRoute…
Browse files Browse the repository at this point in the history
…Option>
  • Loading branch information
alimd committed Sep 13, 2024
1 parent 6426345 commit e4eb63e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/api-server/src/api-client-request.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import {createLogger} from '@alwatr/logger';

import {NanotronServerResponse} from './api-server-response.js';
import {HttpStatusCodes} from './const.js';

import type {DefineRouteOption, NativeClientRequest, NativeServerResponse} from './type.js';
import type {DefineRouteOption, HttpRequestHeaders, NativeClientRequest, NativeServerResponse} from './type.js';
import type {NanotronUrl} from './url.js';
import type {Dictionary} from '@alwatr/type-helper';

Expand All @@ -11,7 +12,7 @@ export class NanotronClientRequest {

readonly serverResponse: NanotronServerResponse;

readonly routeOption: DefineRouteOption | null;
readonly routeOption: Required<DefineRouteOption> | null;

/**
* A flag to indicate if the running handlers queue has been terminated.
Expand Down Expand Up @@ -41,7 +42,7 @@ export class NanotronClientRequest {
url: NanotronUrl,
nativeClientRequest: NativeClientRequest,
nativeServerResponse: NativeServerResponse,
routeOption: DefineRouteOption | null,
routeOption: Required<DefineRouteOption> | null,
) {
// Store public properties.
this.raw_ = nativeClientRequest;
Expand Down

0 comments on commit e4eb63e

Please sign in to comment.