First: visibility is only checked during compile time, so bear in mind that there's no way to throw an error at runtime if you want to block access to a method. If this is your use-case, try something else.
If you want compile-time checking, what you're properly really after is better types.
So you have your class Foo:
class Foo {
method1() {}
method2() {}
}
If in parts of your code you don't want method1 to be called, it just means you'll need to define a type or interface that doesn't have that method.
type FooMethod2Only {
method2: () => void;
}
method1 not being visible in some contexts really means you're working with a type that doesn't have that method.
So if you use a function as such:
function doSomething(foo: FooMethod2Only) {
foo.method1();
}
doSomething(new Foo());
Then typescript will complain, because despite Foo having a method1, the argument type does not have it.
So instead of thinking about this in property/method visibility, think of it as using different types/interfaces for different purposes.
method1visible, the other with both.