Skip to content

PropsWithType lists undefined as possible property when interface has optional property #5

@onebytegone

Description

@onebytegone

Example:

interface TestType {
   readonly prop: string;
   readonly anotherProp: number;
   readonly optionalProp?: string;
}

// results in: "anotherProp" | undefined
PropsWithType<TestType, number>

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions