Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(path): export private types used in public API #4645

Merged
merged 1 commit into from
Apr 24, 2024
Merged

fix(path): export private types used in public API #4645

merged 1 commit into from
Apr 24, 2024

Conversation

jsejcksn
Copy link
Contributor

The ParsedPath type is used as the return type for the function parse, which is part of the public API… yet it is only exported from the "private" module _interface.ts. Item number 4 in the Recommended Usage states this…

Do not import modules with a directory or filename prefixed by an underscore (they're not intended for public use).

…which means that it's currently impossible to import the type in a recommended way. This PR re-exports the type from the parse modules which use it so that the parse function and the ParsedPath type can now be imported together:

import { parse, type ParsedPath } from "@std/path/parse";

@jsejcksn jsejcksn requested a review from kt3k as a code owner April 24, 2024 15:00
@github-actions github-actions bot added the path label Apr 24, 2024
Copy link

codecov bot commented Apr 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.93%. Comparing base (acc1d06) to head (9e34174).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4645   +/-   ##
=======================================
  Coverage   90.93%   90.93%           
=======================================
  Files         478      478           
  Lines       37394    37394           
  Branches     5309     5309           
=======================================
  Hits        34003    34003           
  Misses       3329     3329           
  Partials       62       62           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@iuioiua iuioiua left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@iuioiua iuioiua merged commit fc035e9 into denoland:main Apr 24, 2024
15 checks passed
@jsejcksn jsejcksn deleted the fix/path/export-types branch April 25, 2024 01:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants