sebinside / StreamAwesome

Stream Awesome - The Stream Deck Icon Generator using Font Awesome
MIT License
52 stars 15 forks source link

refactor: simplify ref types #198

Closed MichaHuhn closed 5 months ago

MichaHuhn commented 5 months ago

Such ref types:

let availableIcons: Ref<FontAwesomeIconType[]> = ref([])

can be simplified like this:

let availableIcons = ref<FontAwesomeIconType[]>([])

If a ref() has an initial value, the type is inferred automagically.

const currentHue: Ref<Number> = ref(color.hsl()[0])

Ref<Number> is usually omitted like this:

image