UNPKG

a2r

Version:
15 lines (14 loc) 462 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const _1 = require("."); const useContext = () => { const context = (0, _1.getContext)(); if (context === null) { throw Error(`Something's wrong, context has not been defined`); } if (context === false) { throw Error('Something went wrong, make sure "useContext" is the first line on method'); } return context; }; exports.default = useContext;