I\'m able to do something like the following in TypeScript
class Foo { private constructor () {} }
so this constructor is access
constructor
A method without any code must be something like this
class Foo { Foo._(); }
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._()