Closed borracciaBlu closed 1 year ago
Merging #6 (92f3f70) into main (2947b1e) will not change coverage. The diff coverage is
n/a
.:exclamation: Current head 92f3f70 differs from pull request most recent head b1aec60. Consider uploading reports for the commit b1aec60 to get more accurate results
@@ Coverage Diff @@
## main #6 +/- ##
=======================================
Coverage 95.06% 95.06%
=======================================
Files 56 56
Lines 588 588
=======================================
Hits 559 559
Misses 29 29
Help us with your feedback. Take ten seconds to tell us how you rate us.
Hi @medikoo ,
yes, it is possible using typesVersions.
// for ts version higher than 3.1 use the declaration within the ts-types folder
"typesVersions": {
">=3.1": { "*": ["ts-types/*"] }
},
would you like me to use a separate folder instead of the current file disposition?
if so, instead of ts-types
would you like to use ts3.1
with reference to the ts version?
would you like me to use a separate folder instead of the current file disposition?
@borracciaBlu yes, definitely, that sounds great.
One thing that is not clear to me is why we're referring to the v3.1 version? Is this the lowest TS version that supports the typesVersions
filed?
Can't we just do it as follows?
"typesVersions": {
"*": { "*": ["ts-types/*"] }
},
Concerning folder name, ts-types
feels best to me, but if you have a better idea, let me know. Still, I wouldn't include the TS version in the folder name (I assume there'll never be the case to host different typings for different TS versions - I would definitely want to avoid that)
Yes, that was because typesVersion
was introduced in version 3.1.
I've put the *
notation anyway, older version of ts will ignore it.
@medikoo the rest should be fine, except:
Let me know for the rest if it's ok pls.
Hi @medikoo pls have a look and let me know.
to test this i've use the
npm run test type
inDefinitelyTyped
to check the signatures.To test the types in a project:
Then within the code you may have:
To debug ts resolution:
Let me know if you want me to add some example within the
README.md
.