UNPKG

type-fns

Version:

A set of types, type checks, and type guards for simpler, safer, and easier to read code.

19 lines 640 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); /* eslint-disable @typescript-eslint/no-unused-vars */ const __1 = require(".."); describe('isNotNull', () => { it('should constrain type correctly', async () => { const maybeNumber = undefined; // valid if ((0, __1.isNotNull)(maybeNumber)) { const defNumber = maybeNumber; // valid } }); }); describe('NotNull', () => { it('should constrain type correctly', async () => { const notMaybeNumber = 821; const onlyNumber = notMaybeNumber; // valid }); }); //# sourceMappingURL=isNotNull.test.js.map