Skip to content

Conversation

lihsai0
Copy link
Contributor

@lihsai0 lihsai0 commented Apr 21, 2025

Summary

  • Add literal ID for TypeScript

Fixes #873

Usage

import { BootstrapIconsId } from "bootstrap-icons";

interface ComponentProps {
  icon: BootstrapIconsId,
}

@lihsai0
Copy link
Contributor Author

lihsai0 commented Apr 21, 2025

cc @XhmikosR

@XhmikosR
Copy link
Member

@lihsai0 please commit the new file and make sure lint passes

@lihsai0
Copy link
Contributor Author

lihsai0 commented May 19, 2025

@XhmikosR Done.

And npm run test says No issues detected.

@XhmikosR
Copy link
Member

@lihsai0 Thanks!

Have you used it yet? I'm not sure if it really fixes the linked issue or not.

@lihsai0
Copy link
Contributor Author

lihsai0 commented May 19, 2025

@XhmikosR I use it by 'npm link' in my local environment and it works fine. In my case, it is react component not angular component. But I think that isn't related. This should work with all TypeScript projects.

@XhmikosR XhmikosR merged commit e58efe4 into twbs:main May 19, 2025
7 checks passed
@XhmikosR XhmikosR added enhancement New feature or request build labels May 19, 2025
@lihsai0 lihsai0 deleted the feat/ts-literal-id branch May 20, 2025 11:35
@ffried ffried mentioned this pull request Jun 3, 2025
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Provide TypeScript types
2 participants