Open lovasoa opened 3 years ago
The documentation contains the following example :
sapper.start({ target: document.querySelector('#sapper') });
However, document.querySelector('#sapper') can return null, but sapper.start does not accept null. It would be great to either
document.querySelector('#sapper')
null
sapper.start
This would allow the documentation examples to be copy-pasted in typescript environment without type errors.
The documentation contains the following example :
However,
document.querySelector('#sapper')
can returnnull
, butsapper.start
does not accept null. It would be great to eithersapper.start
to accept null (and throw an error saying that the target element is missing in this case),This would allow the documentation examples to be copy-pasted in typescript environment without type errors.