Skip to content

Commit

Permalink
Merge pull request #338 from 0x0a0d/correct-ts
Browse files Browse the repository at this point in the history
imp(index.d.ts): correct export ts types
  • Loading branch information
icebob authored Oct 22, 2023
2 parents c553ac5 + cc2498a commit 835189f
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ declare module "moleculer-web" {
*/
use?: (routeMiddleware | routeMiddlewareError)[];
};
export type ApiRouteSchema = CommonSettingSchema & {
export interface ApiRouteSchema extends CommonSettingSchema {
/**
* You can use alias names instead of action names. You can also specify the method. Otherwise it will handle every method types.<br>
* Using named parameters in aliases is possible. Named parameters are defined by prefixing a colon to the parameter name (:name).
Expand Down Expand Up @@ -591,9 +591,9 @@ declare module "moleculer-web" {
* @see https://moleculer.services/docs/0.14/moleculer-web.html#Whitelist
*/
whitelist?: (string | RegExp)[];
};
}

export type ApiSettingsSchema = CommonSettingSchema & {
export interface ApiSettingsSchema extends CommonSettingSchema {
/**
* It serves assets with the [serve-static](https://github.com/expressjs/serve-static) module like ExpressJS.
* @see https://moleculer.services/docs/0.14/moleculer-web.html#Serve-static-files
Expand Down Expand Up @@ -707,7 +707,7 @@ declare module "moleculer-web" {
* for extra setting's keys
*/
[k: string]: any;
};
}

export class IncomingRequest extends IncomingMessage {
$action: ActionSchema;
Expand All @@ -733,8 +733,6 @@ declare module "moleculer-web" {

const ApiGatewayService: ServiceSchema & {
Errors: ApiGatewayErrors;
IncomingRequest: IncomingRequest;
GatewayResponse: GatewayResponse;
RateLimitStores: RateLimitStores;
};
export default ApiGatewayService;
Expand Down

0 comments on commit 835189f

Please sign in to comment.