CodeQL library for JavaScript/TypeScript
codeql/javascript-all 1.0.1 (changelog, source)
Search

Member predicate ES2015Module::hasBothNamedAndDefaultExports

Holds if this module contains both named and default exports.

This is used to determine whether a default-import of the module should be reinterpreted as a namespace-import, to accommodate the non-standard behavior implemented by some compilers.

When a module has both named and default exports, the non-standard interpretation can lead to ambiguities, so we only allow the standard interpretation in that case.

predicate hasBothNamedAndDefaultExports()