The following were generated using common.xml:
enums/
messages/
message-registry.ts
tsconfig.json
Inside of message-registry.ts:
import {MAVLinkMessage} from 'node-mavlink';
TypesScript gives the following error: Cannot find module 'node-mavlink'.ts(2307)
When changing the line to import @ifrunistuttgart/node-mavlink instead of node-mavlink:
import {MAVLinkMessage} from '@ifrunistuttgart/node-mavlink';
...
/*
All lines following the export now throw a complaint
*/
export const messageRegistry: Array<[number, new (system_id: number, component_id: number) => MAVLinkMessage]> = [
The type error where {MAVLink type} is any type coming from common.xml:
Type 'typeof {MAVLink Type}' is not assignable to type 'new (system_id: number, component_id: number) => MAVLinkMessage'.
Type 'Heartbeat' is missing the following properties from type 'MAVLinkMessage': _system_id, _component_id, _payload_length, _extension_length, and 2 more.ts(2322)
The following were generated using
common.xml:enums/messages/message-registry.tstsconfig.jsonInside of
message-registry.ts:TypesScript gives the following error:
Cannot find module 'node-mavlink'.ts(2307)When changing the line to import
@ifrunistuttgart/node-mavlinkinstead ofnode-mavlink:The type error where {MAVLink type} is any type coming from common.xml: