Constant declaration
Opened this issue · 2 comments
btzr-io commented
How can I fix this error ?
// @if TARGET='web'
const finalSource = useStream(stream);
// @endif
// @if TARGET='app'
const finalSource = useFileStream(file);
// @endif
error Parsing error: Identifier 'finalSource' has already been declared
scholtzm commented
One possible way would be to do something like this:
let finalSource;
// @if TARGET='web'
finalSource = useStream(stream);
// @endif
// @if TARGET='app'
finalSource = useFileStream(file);
// @endif
btzr-io commented
Thanks, that's what I did 👍