Closed
Description
// constants.js
export const {
a: {
// `b` would have been undefined, but we will default the value with a string
b = 'default value',
},
} = {
a: {
// `b` doesn't exist here
c: 'test',
},
};
...
// foo.js
import {b} from './constants';
// And it results in
error b not found in './constants' import/named
It shouldn't throw an error because we have a default value for the key there.