Vue has a inject
function returning either T
or undefined
. An internal function strictInject
was added a while ago returning only T
and throwing an error when the value does not exist in order to indicate an issue likely caused by the developer.
This implementation exists 3 times in the codebase (with and without tests), we need to stop spreading new implementations.