I\'m able to do something like the following in TypeScript
class Foo { private constructor () {} }
so this constructor is access
constructor
Just create a named constructor that starts with _
_
class Foo { Foo._() {} }
then the constructor Foo._() will be accessible only from its class (and library).
Foo._()