Comments (2)
We created types for theme in our React application that uses Typescript. Some issues are not identified by Typescript because of bracket notation. Example:
theme.colors["red:20"] //This should not give a typescript error and doesn't and works as expected
theme.colors["gsdfgn"] //This should give me a typescript error but doesn't
The problem is we can't use keys like "red:20" without bracket notation and if we use bracket notation, typescript doesn't throw errors for any invalid values.
With dot notation we get typescript errors if we try to access any random value:
theme.colors.gsdfgn //This gives the typescript error and works as expected
from tonic-ui.
Close this issue because we don't have resource for adding TypeScript support so far.
from tonic-ui.
Related Issues (20)
- Change the color for informative toast
- Duplicate click events on Checkbox with `data-track` attribute in Matomo Tag Manager HOT 1
- Enhance `TableColumnResizeHandle` component to meet the visual specification
- Enhance examples by replacing code blocks with the render function
- Upgrade to Lerna 7
- Improve accessibility with targeted `:focus-visible` focus styles for non-pointer devices
- Enhancing Table examples by implementing `OverflowTooltip` for tooltip display on truncation
- Input cursor position changes to end in SearchInput when controlled usage HOT 5
- Optimize bundle size by modularizing large icon set
- Should UseToastManager methods be safe to use in useEffect? HOT 2
- Idea: Scrollbar component supports scrolling to position HOT 2
- The string is truncated, but the OverflowTooltip is not displayed
- Should open prop to ToastContainer when using ToastManager HOT 5
- Simplify release notes access with a single-page view
- Provide an example of how to rearrange table columns in a drawer
- The `Switch` component renders incorrect background color in checked and disabled states
- Documentation for v0 broken HOT 1
- @tonic-ui/react-hooks needs to declare the dependency of @tonic-ui/utils
- docs: Add `Preview` examples
- Incorporate `checkbox`, `radio`, and `switch` roles into their respective control box components
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tonic-ui.