Skip to content

guards.TypeAlias.Constructor

github-actions[bot] edited this page Jun 8, 2026 · 1 revision

@zenstone/ts-utils / guards / Constructor

Type Alias: Constructor<T>

Constructor<T> = (...args) => T

Defined in: src/guards/index.ts:289

new 调用的构造函数类型

Type Parameters

T

T = object

Parameters

args

...any[]

Returns

T

Example

function create<T>(ctor: Constructor<T>): T {
  return new ctor();
}

Clone this wiki locally