(args)
| 15486 | } |
| 15487 | |
| 15488 | function notice(args) { |
| 15489 | var target = args.key || key++; |
| 15490 | var closePromise = new Promise(function (resolve) { |
| 15491 | var callback = function callback() { |
| 15492 | if (typeof args.onClose === 'function') { |
| 15493 | args.onClose(); |
| 15494 | } |
| 15495 | |
| 15496 | return resolve(true); |
| 15497 | }; |
| 15498 | |
| 15499 | getRCNotificationInstance(args, function (_ref) { |
| 15500 | var prefixCls = _ref.prefixCls, |
| 15501 | instance = _ref.instance; |
| 15502 | instance.notice(getRCNoticeProps(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, args), { |
| 15503 | key: target, |
| 15504 | onClose: callback |
| 15505 | }), prefixCls)); |
| 15506 | }); |
| 15507 | }); |
| 15508 | |
| 15509 | var result = function result() { |
| 15510 | if (messageInstance) { |
| 15511 | messageInstance.removeNotice(target); |
| 15512 | } |
| 15513 | }; |
| 15514 | |
| 15515 | result.then = function (filled, rejected) { |
| 15516 | return closePromise.then(filled, rejected); |
| 15517 | }; |
| 15518 | |
| 15519 | result.promise = closePromise; |
| 15520 | return result; |
| 15521 | } |
| 15522 | |
| 15523 | function isArgsProps(content) { |
| 15524 | return Object.prototype.toString.call(content) === '[object Object]' && !!content.content; |
nothing calls this directly
no test coverage detected
searching dependent graphs…