You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello! Really enjoying using this :)
I was looking for a way to iterate over the union type, was wondering what your thoughts were on using a const assertions to declare the SvgName type.
So, instead of having:
export {}
declare global {
export type SvgName = 'plus' | 'minus' | 'cross' | 'default' | etc…
}
the module would generate:
export const svgName = ['plus', 'minus', 'cross', 'default', etc…] as const
declare global {
type SvgName = typeof svgName[number]
}
The text was updated successfully, but these errors were encountered:
Hello! Really enjoying using this :)
I was looking for a way to iterate over the union type, was wondering what your thoughts were on using a
const assertions
to declare the SvgName type.So, instead of having:
the module would generate:
The text was updated successfully, but these errors were encountered: