Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

imp(index.d.ts): correct export ts types #338

Merged
merged 1 commit into from
Oct 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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