A typedef has whatever scope you define it to have.
If you create a global typedef, then the typedef has a global scope and is visible throughout the program.
If you create a typedef within a class declaration, then the typedef is known within that class. It can have public, protected or private visibility depending on where you define it within the class declaration.
If you define a typedef within a function, then it is only visible within that function.