polaris icon indicating copy to clipboard operation
polaris copied to clipboard

TabDescriptor type not available from typings

Open nirvdrum opened this issue 4 years ago • 1 comments

Issue summary

I have some code to build up tabs from some other object. I wanted to annotate the return type of that function to be TabDescriptor[], but it looks like TabDescriptor isn't exported as a type in components/index.d.ts even though the interface is exported.

Expected behavior

I thought import { TabDescriptor } from "@shopify/polaris"; would work.

Actual behavior

I get an error from TypeScript saying TS2305: Module '"@shopify/polaris"' has no exported member 'TabDescriptor'.

Reduced test case

import { TabDescriptor } from "@shopify/polaris";

function buildTabs(): TabDescriptor[] {
  return []
}

Specifications

Or run npx envinfo --system --binaries --browsers --npmPackages react,react-dom,@shopify/polaris to provide specifications on your environment including version numbers, browser, device, and operating system.

Paste the results here:

  System:
    OS: macOS 11.4
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 75.94 MB / 32.00 GB
    Shell: 3.3.1 - /usr/local/bin/fish
  Binaries:
    Node: 16.5.0 - /usr/local/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 7.19.1 - /usr/local/bin/npm
  Browsers:
    Chrome: 92.0.4515.107
    Firefox: 90.0.2
    Safari: 14.1.1
  npmPackages:
    @shopify/polaris: ^6.6.0 => 6.6.0 
    react: ^17.0.2 => 17.0.2 
    react-dom: ^17.0.2 => 17.0.2 

nirvdrum avatar Jul 27 '21 02:07 nirvdrum

👋 Thanks for opening your first issue. A contributor should give feedback soon. If you haven’t already, please check out the contributing guidelines.

ghost avatar Jul 27 '21 02:07 ghost

This issue seems inactive. If it's still relevant, please add a comment saying so. Otherwise, take no action. → If there's no activity within a week, then a bot will automatically close this. Thanks for helping to improve Shopify's design system and dev experience.

github-actions[bot] avatar Apr 16 '23 03:04 github-actions[bot]

I'm unable to look into it this week. To the best of my knowledge, it's still an issue, but I'll verify when I'm back.

nirvdrum avatar Apr 17 '23 01:04 nirvdrum

Hi! We noticed there hasn’t been activity on this issue in a while. After 30 days, it will close automatically.

If it’s still relevant, or you have updates, comment and let us know. And don’t worry, you can always re-open later if needed.

github-actions[bot] avatar Oct 15 '23 03:10 github-actions[bot]