Skip to content

Casting to Partial<x> seems to be errorful #22806

Closed
@ORESoftware

Description

@ORESoftware

I have this:

export interface HavenData {
  timeoutAmount: number;
  throwSync?: boolean;
  timeoutThrow: boolean;
  promiseThrow: boolean;
}

 const qs = {timeout: Math.ceil(30 * Math.random())} as Partial<HavenData>;

shouldn't that be an error since timeout is not a member of the HavenData interface? I am not seeing a problem in my IDE.

Metadata

Metadata

Labels

Working as IntendedThe behavior described is the intended behavior; this is not a bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions