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

Missing type definitions to use "Default string import for icons" in TypeScript #5335

Closed
1 of 4 tasks
C3ntraX opened this issue Jun 7, 2022 · 4 comments · Fixed by #5753
Closed
1 of 4 tasks

Missing type definitions to use "Default string import for icons" in TypeScript #5335

C3ntraX opened this issue Jun 7, 2022 · 4 comments · Fixed by #5753

Comments

@C3ntraX
Copy link

C3ntraX commented Jun 7, 2022

Bug Description

I still cant use the named imports in 1.4 because the type definitions for typescript are missing. Its only working in JS.
So currently this feature is useless for typescript user. Please add support and maybe for the future add TypeScript test cases.

See #5122

Expected Behavior

Use "Default string import for icons" in Typescript

Steps to Reproduce

Use TypeScript.

Isolated Example

Not needed

Context

  • UI5 Web Components version: {...}
  • OS/Platform: {...}
  • Browser: {...}
  • Affected component: {...}

Log Output / Stack Trace / Screenshots

{...}

Priority

  • Low
  • Medium
  • High
  • Very High

The priority indicates the severity of the issue. To set the appropriate priority consider the following criteria:

  • Breaks entire application or system - High or Very High
  • Accessibility issue - Medium or High
  • Functional issue - Medium or High
  • Visual issue - Low or Medium

Note: The priority might be re-evaluated by the issue processor.

Stakeholder Info (if applicable)

  • Organization: {...}
  • Business impact: {...}
@ilhan007
Copy link
Member

ilhan007 commented Jun 7, 2022

related to: #4337

@ilhan007
Copy link
Member

Hello @C3ntraX C3ntraX there is a snapshot version to add ts defs to icons - 0.0.0-cf50976ce

can you give it a try and let us know if now it works fine.

Here you can see a small example:
https://codesandbox.io/s/wcr-ts-template-forked-w9752k?file=/src/App.tsx

ilhan007 pushed a commit that referenced this issue Sep 20, 2022
Created TypeDefinitions for all icon packages. This helps TypeScript users to better use the Icon Name Export feature which was introduced with #5747

Fixes #5335
@C3ntraX
Copy link
Author

C3ntraX commented Sep 20, 2022

Hello @ilhan007,

this snapshot works fine. Thanks!

@ilhan007
Copy link
Member

Hello @C3ntraX thanks for testing, we have merged the related PR, the change will be released with 1.8.0 end of the month/start of Oct

@ilhan007 ilhan007 added this to the 1.8.0 milestone Oct 3, 2022
@petyabegovska petyabegovska moved this to Completed in Planning - Topic Core Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Completed
Development

Successfully merging a pull request may close this issue.

2 participants