• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

RobotWebTools / rclnodejs / 26875247620
86%

Build:
DEFAULT BRANCH: develop
Ran 03 Jun 2026 09:30AM UTC
Jobs 1
Files 64
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

03 Jun 2026 09:13AM UTC coverage: 85.523% (+0.03%) from 85.492%
26875247620

push

github

web-flow
 Infer concrete types from constructor TypeClass forms (#1526)

Support the constructor form of `TypeClass` (the value returned by `rclnodejs.require(...)`) with full type inference for messages, services, and actions, bringing it on par with the existing string and object-descriptor forms, and make the runtime loader accept that form so it works end to end.

## Types
- `TypeClass` now recognizes message, service (`{ Request, Response }`), and action (`{ Goal, Feedback, Result }`) constructor shapes (`types/node.d.ts`, `types/service.d.ts`, `types/action_client.d.ts`).
- `ServiceRequestMessage` / `ServiceResponseMessage` and `ActionGoal` / `ActionFeedback` / `ActionResult` infer the concrete payload types from the constructor.
- `ServiceType` / `ActionType` and the `rostsd_gen` generator (`rostsd_gen/index.js`) handle the constructor form.

## Runtime
- `lib/interface_loader.js`: `loadInterface()` accepts an already-loaded interface constructor and returns it as-is (idempotent), validated via the generated class's static `type()` method. Arbitrary functions still fall through to the existing `MESSAGE_NOT_FOUND` error. This fixes the `MESSAGE_NOT_FOUND` failure when a constructor was passed to `ActionServer` / `ActionClient`, which call `loadInterface` unconditionally.

## Tests
- `test/types/index.test-d.ts`: `tsd` coverage for every `TypeClass` form — message, service, and action via constructor, string, and object descriptor.
- `test/test-action-server.js`, `test/test-service.js`: runtime regression tests that pass the constructor form to `ActionServer` / `ActionClient` and `createService` / `createClient` and exercise a full round-trip.
- `test/test-message-type.js`: unit tests for `loadInterface()` idempotency and the arbitrary-function rejection path.

## Demos
- `topics`, `services`, and `actions` TypeScript demos updated to demonstrate both the string-name and message/service/action-class styles, with typed callbacks via `typeof Ctor`.
- All th... (continued)

1848 of 2346 branches covered (78.77%)

Branch coverage included in aggregate %.

4 of 4 new or added lines in 1 file covered. (100.0%)

3658 of 4092 relevant lines covered (89.39%)

408.01 hits per line

Jobs
ID Job ID Ran Files Coverage
1 26875247620.1 03 Jun 2026 09:30AM UTC 64
85.52
GitHub Action Run
Source Files on build 26875247620
  • Tree
  • List 64
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #26875247620
  • fce926b3 on github
  • Prev Build on develop (#26732478215)
  • Next Build on develop (#26941889863)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc