How to fix Type is not a constructor type in TypeScript

TypeScriptINTERMEDIATEMEDIUMUpdated Dec 11, 2025ยท 111 views

This error occurs when you try to use the `new` operator with a type that lacks a constructor signature. TypeScript requires types used with `new` to have explicit construct signatures.

Quick fix

Fixes Type is not a constructor type

// Before (incorrect)
type Constructor = () => Object;

// After (correct)
type Constructor = new () => Object;
  1. Add construct signature to type definition
  2. Constrain generic type parameters to constructors
  3. Use interface with construct signature
  4. Ensure you're importing the class, not just its type
typescript โ€” error
// Before (incorrect)
type Constructor = () => Object;
// After (correct)
type Constructor = new () => Object;
Type is not a constructor type

What this error means

This TypeScript error happens when you attempt to instantiate a type using the `new` operator, but the type definition doesn't include a constructor signature. TypeScript distinguishes between regular types and constructor types - only types with construct signatures (indicated by the `new` keyword) can be instantiated. The error typically appears when working with generic types, type aliases, or interfaces that represent values rather than classes. TypeScript's type system requires explicit constructor signatures to ensure type safety when creating new instances. At compile time, TypeScript validates that any type used with `new` has a proper construct signature matching the arguments provided. This prevents runtime errors where non-constructor values are mistakenly called as constructors.

Typical symptoms

  • Compiler error when using `new` operator with a generic type parameter
  • Error appears when trying to instantiate a type alias or interface
  • Type checking fails in factory functions that create class instances
  • Build fails with constructor signature validation errors
  • IDE shows red squiggly lines under `new` expressions

Common causes

  1. Using a type alias or interface without a construct signature with the `new` operator
  2. Generic type parameter not constrained to have a constructor
  3. Attempting to instantiate a value type rather than a class type
  4. Missing `new` keyword in constructor type definition
  5. Importing a type-only declaration instead of the actual class
  6. Using `typeof` incorrectly when defining constructor types

How to fix "Type is not a constructor type"

1Add construct signature to type definition

If you're defining a type that should be constructable, add a construct signature using the new keyword:

typescript
// Before (incorrect)
type Constructor = () => Object;

// After (correct)
type Constructor = new () => Object;

For types that accept constructor parameters:

typescript
type Constructor<T> = new (...args: any[]) => T;
2Constrain generic type parameters to constructors

When using generics with the new operator, constrain the type parameter to ensure it has a constructor:

typescript
// Before (causes error)
function create<T>(type: T): T {
  return new type(); // Error: Type is not a constructor type
}

// After (correct)
function create<T>(type: new () => T): T {
  return new type();
}

// Usage
class MyClass {}
const instance = create(MyClass);

For constructors with parameters:

typescript
function create<T>(type: new (...args: any[]) => T, ...args: any[]): T {
  return new type(...args);
}
3Use interface with construct signature

Define an interface specifically for constructor types:

typescript
interface Constructable<T> {
  new (...args: any[]): T;
}

function instantiate<T>(ctor: Constructable<T>, ...args: any[]): T {
  return new ctor(...args);
}

class Person {
  constructor(public name: string) {}
}

const person = instantiate(Person, "Alice");
4Ensure you're importing the class, not just its type

TypeScript allows importing types separately from values. Make sure you're importing the actual class:

typescript
// Before (type-only import)
import type { MyClass } from './my-class';
const instance = new MyClass(); // Error: cannot use type-only import

// After (value import)
import { MyClass } from './my-class';
const instance = new MyClass(); // Works

Check your import statements and remove the type keyword if you need the runtime value.

5Use typeof for class constructor types

When referencing the constructor type of an existing class, use typeof:

typescript
class Animal {
  constructor(public name: string) {}
}

// Correct way to type the constructor
function createAnimal(ctor: typeof Animal, name: string): Animal {
  return new ctor(name);
}

// Or with generics
function create<T>(ctor: new (...args: any[]) => T): T {
  return new ctor();
}
6Verify type definition structure

Ensure your type definitions properly separate static and instance types:

typescript
// Define instance type
interface ClockInterface {
  currentTime: Date;
  setTime(d: Date): void;
}

// Define constructor type
interface ClockConstructor {
  new (hour: number, minute: number): ClockInterface;
}

// Use both together
function createClock(
  ctor: ClockConstructor,
  hour: number,
  minute: number
): ClockInterface {
  return new ctor(hour, minute);
}

class DigitalClock implements ClockInterface {
  constructor(h: number, m: number) {}
  currentTime: Date = new Date();
  setTime(d: Date) {
    this.currentTime = d;
  }
}

const clock = createClock(DigitalClock, 12, 17);

Advanced notes

Constructor Signatures vs Call Signatures: TypeScript distinguishes between call signatures () and construct signatures new (). A type can have both, allowing it to be called as a function or instantiated as a constructor. JavaScript built-ins like Date have both signatures.

Abstract Classes: Abstract classes cannot be instantiated directly, even though they have constructors. If you're getting this error with an abstract class, ensure you're instantiating a concrete subclass instead.

Mixin Patterns: When working with class mixins, constructor signatures become more complex. TypeScript 2.2+ improved support for mixin patterns with constructor types like new (...args: any[]) => {}.

Generic Constraints: You can combine constructor types with other constraints: <T extends BaseClass>(ctor: new () => T) ensures the type is both constructable and extends a base class.

Type vs Value Space: This error often reveals confusion between TypeScript's type space (compile-time) and value space (runtime). The new operator works in value space, so the type must represent a runtime constructor function, not just a compile-time type definition.

Frequently asked questions

What does "Type is not a constructor type" mean?
This TypeScript error happens when you attempt to instantiate a type using the new operator, but the type definition doesn't include a constructor signature. TypeScript distinguishes between regular types and constructor types - only types with construct signatures (indicated by the new keyword) can be instantiated. The error typically appears when working with generic types, type aliases, or interfaces that represent values rather than classes.
How do I fix "Type is not a constructor type"?
This error occurs when you try to use the new operator with a type that lacks a constructor signature. TypeScript requires types used with new to have explicit construct signatures.
What causes "Type is not a constructor type"?
Using a type alias or interface without a construct signature with the new operator Generic type parameter not constrained to have a constructor Attempting to instantiate a value type rather than a class type
Is the "Type is not a constructor type" error serious?
It is a medium-severity error โ€” more of a blocker than a risk. The steps above resolve it.

Official resources & further reading