typesWithPrivateConstructor.ts(5,9): error TS2673: Constructor of class 'C' is private and only accessible within the class declaration.
typesWithPrivateConstructor.ts(6,5): error TS2322: Type 'Function' is not assignable to type '() => void'.
  Type 'Function' provides no match for the signature '(): void'.
typesWithPrivateConstructor.ts(13,10): error TS2673: Constructor of class 'C2' is private and only accessible within the class declaration.
typesWithPrivateConstructor.ts(14,5): error TS2322: Type 'Function' is not assignable to type '(x: number) => void'.
  Type 'Function' provides no match for the signature '(x: number): void'.


==== typesWithPrivateConstructor.ts (4 errors) ====
    class C {
        private constructor() { }
    }
    
    var c = new C(); // error C is private
            ~~~~~~~
!!! error TS2673: Constructor of class 'C' is private and only accessible within the class declaration.
    var r: () => void = c.constructor;
        ~
!!! error TS2322: Type 'Function' is not assignable to type '() => void'.
!!! error TS2322:   Type 'Function' provides no match for the signature '(): void'.
    
    class C2 {
        private constructor(x: number);
        private constructor(x: any) { }
    }
    
    var c2 = new C2(); // error C2 is private
             ~~~~~~~~
!!! error TS2673: Constructor of class 'C2' is private and only accessible within the class declaration.
    var r2: (x: number) => void = c2.constructor;
        ~~
!!! error TS2322: Type 'Function' is not assignable to type '(x: number) => void'.
!!! error TS2322:   Type 'Function' provides no match for the signature '(x: number): void'.