- Error
- Reported by the type checker
TS2694
Namespace '{0}' has no exported member '{1}'.
A qualified name like Ns.Member refers to a member the namespace doesn't export. Check the spelling, or export the member.
What it means
In a qualified type or value name such as Ns.Member, the namespace exists but has no exported member with that name. Members of a namespace that aren't exported aren't visible outside it.
Example
namespace Shapes {
export interface Circle { r: number }
}
let s: Shapes.Square;
export {};
ts-r-check -p tsconfig.json --pretty false ts-r outputindex.ts(4,15): error TS2694: Namespace 'Shapes' has no exported member 'Square'.
Recorded by node scripts/verify-examples.mjs with ts-r built from commit 6deaf01. The example uses the default tsconfig: strict, target: es2022, module: esnext, moduleResolution: bundler.
How to fix
- Fix the member name.
- Add
exportto the member inside the namespace. - If the namespace comes from a package, check that the version you have installed declares it.