7👍
✅
To avoid the warning, specify a default value (the 2nd argument to inject()
):
const test = inject<Function>('test', () => {})
Source:stackexchange.com