Definitelytyped: serialport: Types for parser-readline (and probably others) are missing

Created on 6 Nov 2018  路  4Comments  路  Source: DefinitelyTyped/DefinitelyTyped

Authors: @codefoster @apearson

Those modules are installed as @serialport/parser-readline

import ReadlineParser = require("@serialport/parser-readline");

I am not sure, how / if it would be correct to include them into the serialport definitions or seperately. However, what would the name for modules which have a namespace be, as @types/@serialport/parser-readline probably is not possible.

Most helpful comment

What about a PR to get the types into the packages so that people get types automatically without having to use the @types package? This is, in my experience, the better option if the core library will accept the PR.

All 4 comments

From the FAQs, it looks like they should be their own new type located at types/serialport__parser-readline.

To install them the user would have to do
npm install @types/serialport__parser-readline

https://github.com/DefinitelyTyped/DefinitelyTyped#what-about-scoped-packages

It looks like the serialport package has been broken up into it's many components along with a major version release (7.0.0). We'd want to release a new version of the type and have the breakup along with it.

https://serialport.io/docs/api-overview

What about a PR to get the types into the packages so that people get types automatically without having to use the @types package? This is, in my experience, the better option if the core library will accept the PR.

any follow up since then?

Was this page helpful?
0 / 5 - 0 ratings