TypeScript/tests/cases/conformance/esnext/logicalAssignment/logicalAssignment5.ts

8 lines
149 B
TypeScript
Raw Normal View History

2020-04-01 10:28:48 +02:00
// @strict: true
// @target: esnext, es2020, es2015
function foo (f: (a: number) => void | undefined) {
f ??= (a => a++)
f ||= (a => a++)
}