Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

BigInt should not be a subtype of an object type #36155

Copy link
Copy link
@Vbitz

Description

@Vbitz
Issue body actions

TypeScript Version: 3.8.0-dev.20200111

Search Terms: "BigInt"

Code

declare function test<A, B extends A>(): void;

test<{t?: string}, object>();
test<{t?: string}, bigint>();
test<{t?: string}, number>();

Expected behavior: bigint should behave like number.

Actual behavior: BigInt instead behaves like a object.

Playground Link: https://www.typescriptlang.org/play/?target=99&ts=3.8.0-dev.20200111#code/CYUwxgNghgTiAEAzArgOzAFwJYHtXwxAGcMAeAQQBp4AheEAD0NWCPnID4AKASgC54ANxxZgAbgBQEwiVIBvDAH4BJGFlQBzAL7UcAIwBW4DNx6SZZBcvir126nqwb1J3ueKWlKjGs074qMgAtnogMKZiQA

Related Issues:

Main BigInt Issue: #33871

Reactions are currently unavailable

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptA bug in TypeScriptDesign LimitationConstraints of the existing architecture prevent this from being fixedConstraints of the existing architecture prevent this from being fixed

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.