mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
8 lines
256 B
TypeScript
8 lines
256 B
TypeScript
import defined = require('defined');
|
|
|
|
const opts = { x: undefined, y : false, w : 4 };
|
|
// $ExpectType number | boolean | undefined
|
|
defined<boolean | number | undefined>(opts.x, opts.y, opts.w, 100);
|
|
// $ExpectType any
|
|
defined(opts.x, opts.y, opts.w, 100);
|