typesWithProtectedConstructor.ts(5,9): error TS2674: Constructor of class 'C' is protected and only accessible within the class declaration.
typesWithProtectedConstructor.ts(6,5): error TS2322: Type 'Function' is not assignable to type '() => void'.
  Type 'Function' provides no match for the signature '(): void'.
typesWithProtectedConstructor.ts(13,10): error TS2674: Constructor of class 'C2' is protected and only accessible within the class declaration.
typesWithProtectedConstructor.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'.


==== typesWithProtectedConstructor.ts (4 errors) ====
    class C {
        protected constructor() { }
    }
    
    var c = new C(); // error C is protected
            ~~~~~~~
!!! error TS2674: Constructor of class 'C' is protected 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 {
        protected constructor(x: number);
        protected constructor(x: any) { }
    }
    
    var c2 = new C2(); // error C2 is protected
             ~~~~~~~~
!!! error TS2674: Constructor of class 'C2' is protected 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'.