Library public API snapshot testing for runtime exports and type declarations.
by antfuTypeScript
Last 12 weeks · 51 commits
Clear and concise description of the problem Would be great to have a way to surface methods. Suggested solution When removing comments, if we have a , prefix the function with ? Alternative _No response_ Additional context _No response_ Validations [x] Follow our Code of Conduct [x] Read the Contributing Guide. [x] Check that there isn't already an issue that request the same feature to avoid creating a duplicate. BTW, I'm happy to send a PR 👍
The dts extractor collects interfaces, type aliases, enums, classes, functions and variables when resolving specifiers, but not (namespaces). So , where is a local , collapses to a bare re-export with no body. This collects into the declaration map, adds a kind (KIND_ORDER, KIND_LABELS, kindFromDeclType), and handles it in by renaming the namespace id to the export alias and prefixing / (mirroring the class/function branches). Includes a regression test.
Repository: antfu/tsnapi. Description: Library public API snapshot testing for runtime exports and type declarations. Stars: 188, Forks: 3. Primary language: TypeScript. License: MIT. Topics: snapshot, snapshot-testing. Open PRs: 0, open issues: 0. Last activity: 1h ago. Top contributors: antfu, jycouet.