A namespace can be created using the namespace … Not to be confused with the import x … Typescript build error: Cannot use namespace … typescript cannot use namespace as a type TypeScript Namespaces - TutorialsTeacher welcome TypeScript v3.8 with import type {} from ''. You can use your User class normally inside your namespace. TypeScript - Namespaces. Typescript Cannot Since the above syntax cannot be used in .tsx files, an alternate type assertion operator should be used: as. Because this library is loaded through a