Skip to content

Readonly<T> not assignable to T with optional properties #12542

Closed
@mhegazy

Description

@mhegazy
type T = { a? : number, b: string };
var y: T;
var x: Readonly<T> = y; // Error: Property 'a' is optional

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFixedA PR has been merged for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions