3 ms·
Why not use annotation instead? const props: ['foo'] = ['foo']
by pverheggen 1y ago
Why not use annotation instead?
const props: ['foo'] = ['foo']
- halflife 1y agoOr: cons foo = [‘foo’] as const;
- wk_end 1y ago> In a case like that `as const` doesn't work, since the function doesn't expect a readonly argument.
- halflife 1y agoAh, missed that. Sorry.
- cat-whisperer 1y agoI don’t get this? why do I need to say as const?
- fenomas 1y agoDidn't occur to me, that's certainly more defensible! Though maybe less humorous.