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

UX module not exported correctly #1272

Closed
s-palmer opened this issue Dec 17, 2024 · 1 comment · Fixed by #1274
Closed

UX module not exported correctly #1272

s-palmer opened this issue Dec 17, 2024 · 1 comment · Fixed by #1274
Labels
bug Something isn't working

Comments

@s-palmer
Copy link

s-palmer commented Dec 17, 2024

Describe the bug
The action import in the documentation is incorrect: https://github.com/oclif/core/blob/main/src/ux/README.md

It suggests that it should be imported like:

import { action } from "@oclif/core/ux"

However, it has to be imported like:

import { ux } from "@oclif/core/ux"
const { action } = ux

To Reproduce

Minimal repro provided here: https://github.com/s-palmer/oclif-ux-package-repro

Steps to reproduce the behavior:

  1. Clone the above repo
  2. npm install
  3. npm exec tsc
  4. See error below:
src/commands/hello.ts:2:10 - error TS2305: Module '"@oclif/core/ux"' has no exported member 'action'.

ux module imported as per documentation: https://github.com/oclif/core/blob/main/src/ux/README.md

Expected behavior
The UX module should be able to be imported as per the documentation

Screenshots
If applicable, add screenshots to help explain your problem.

image

The suggested import doesn't work. The ux module can be accessed as per the commented out code below:

import { action } from "@oclif/core/ux"
// import ux from "@oclif/core/ux"
// const { action } = ux.ux

Environment (please complete the following information):

  • OS & version: MacOS 14.7.1
  • Shell/terminal & version: zsh 5.9 (x86_64-apple-darwin23.0)
@mdonnalley mdonnalley added the bug Something isn't working label Dec 17, 2024
Copy link

git2gus bot commented Dec 17, 2024

This issue has been linked to a new work item: W-17454648

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants