serialport / node-serialport

Access serial ports with JavaScript. Linux, OSX and Windows. Welcome your robotic JavaScript overlords. Better yet, program them!
https://serialport.io
MIT License
5.82k stars 1.01k forks source link

how to correctly import Delimiter in typescript #2203

Closed thosil closed 3 years ago

thosil commented 3 years ago

Summary of Problem

Code to Reproduce the Issue

import SerialPort from 'serialport';
import Delimiter from '@serialport/parser-delimiter';

Complete error message:

Could not find a declaration file for module '@serialport/parser-delimiter'. '/home/tsi/Projects/userfriendly/wow/wow-git/apps/server/node_modules/@serialport/parser-delimiter/lib/index.js' implicitly has an 'any' type.

Versions, Operating System and Hardware

thosil commented 3 years ago

Sorry, I found the right way in the doc: https://serialport.io/docs/api-serialport#serialportparsers