Skip to content

assertIsDefined vs assertDefined #248362

@bpasero

Description

@bpasero

I think for a developer on VS Code its impossible to understand the difference, given the names are so similar. Can we make this more explicit to distinguish?

export function assertIsDefined<T>(arg: T | null | undefined): NonNullable<T> {

export function assertDefined<T>(value: T, error: string | NonNullable<Error>): asserts value is NonNullable<T> {

Metadata

Metadata

Assignees

Labels

debtCode quality issuesinsiders-releasedPatch has been released in VS Code Insiders

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions