TeselaGen / tg-oss

Teselagen Open Source modules
https://teselagen.github.io/tg-oss/
MIT License
37 stars 18 forks source link

Double and Teselagen.bio.orf.ORF types for sequence-utils don’t exist #59

Closed ryan-stackwave closed 5 months ago

ryan-stackwave commented 5 months ago

We get the following errors when importing from @teselagen/sequence-utils:

node_modules\@teselagen\sequence-utils\calculateTm.d.ts(1,102): error TS2304: Build:Cannot find name 'Double'. 

node_modules\@teselagen\sequence-utils\findOrfsInPlasmid.d.ts(1,129): error TS2503: Build:Cannot find namespace 'Teselagen'. 

The types seem to be generated from these comments: https://github.com/TeselaGen/tg-oss/blob/master/packages/sequence-utils/src/getOrfsFromSequence.js#L11 https://github.com/TeselaGen/tg-oss/blob/master/packages/sequence-utils/src/calculateTm.js#L21

We were able to work around the error by defining global types:

declare namespace Teselagen {
   namespace bio {
       namespace orf {
           type ORF = string;
       }
   }
}

type Double = number;

@tnrich

tnrich commented 5 months ago

@ryan-stackwave hmm.. not sure why those comments are in there like that. Cleaned them up to hopefully prevent this issue for you and published a new version of @teselagen/sequence-utils

tnrich commented 5 months ago

Closing, reopen if necessary