diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index b3f3a4cbfb..72fda23bd8 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -22,6 +22,9 @@ jobs: - run: npm test env: CI: true - - run: codeclimate-test-reporter < coverage/lcov.info + - run: | + if [ "$CODECLIMATE_REPO_TOKEN" != "" ]; then + codeclimate-test-reporter < coverage/lcov.info + fi env: CODECLIMATE_REPO_TOKEN: ${{ secrets.codeclimate }} diff --git a/packages/express/index.d.ts b/packages/express/index.d.ts index 97bdc40652..05d329d7a2 100644 --- a/packages/express/index.d.ts +++ b/packages/express/index.d.ts @@ -1,4 +1,4 @@ -import { Application as FeathersApplication, Params as FeathersParams, HookContext } from '@feathersjs/feathers'; +import { Application as FeathersApplication, Params as FeathersParams, HookContext, SetupMethod, ServiceMethods } from '@feathersjs/feathers'; import express from 'express'; declare const feathersExpress: FeathersExpress; @@ -47,4 +47,14 @@ declare module 'express-serve-static-core' { data?: any; hook?: HookContext; } + + type FeathersService = Partial & SetupMethod>; + + interface IRouterMatcher { + // tslint:disable-next-line callable-types (Required for declaration merging) +

( + path: PathParams, + ...handlers: (RequestHandler | FeathersService | Application)[] + ): T; + } }