Skip to main content
Home

A universal testing module that works seamlessly across Deno, Node.js, and Bun runtimes. Write tests once, run them anywhere - from mobile to desktop, and 3D/spatial environments!

This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
This package works with Browsers
JSR Score
58%
Published
3 months ago (0.7.1)
type alias AssertGetConstructorTypeProp

Gets the type of thing a class creates. Helps you work with the result of creating a new thing from a class.

Example:

import { AssertGetConstructorTypeProp } from '@in/test';

class Player {
  name: string = "Player 1";
  score: number = 0;
}

// This will be the type of a Player instance
type PlayerInstance = AssertGetConstructorTypeProp<typeof Player>;

// Now TypeScript knows this has name and score
const player: PlayerInstance = new Player();

Type Parameters

Definition

InstanceType<T>

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@in/test

Import symbol

import { type AssertGetConstructorTypeProp } from "@in/test/assert";
or

Import directly with a jsr specifier

import { type AssertGetConstructorTypeProp } from "jsr:@in/test/assert";

Add Package

pnpm i jsr:@in/test
or (using pnpm 10.8 or older)
pnpm dlx jsr add @in/test

Import symbol

import { type AssertGetConstructorTypeProp } from "@in/test/assert";

Add Package

yarn add jsr:@in/test
or (using Yarn 4.8 or older)
yarn dlx jsr add @in/test

Import symbol

import { type AssertGetConstructorTypeProp } from "@in/test/assert";

Add Package

vlt install jsr:@in/test

Import symbol

import { type AssertGetConstructorTypeProp } from "@in/test/assert";

Add Package

npx jsr add @in/test

Import symbol

import { type AssertGetConstructorTypeProp } from "@in/test/assert";

Add Package

bunx jsr add @in/test

Import symbol

import { type AssertGetConstructorTypeProp } from "@in/test/assert";