{"map":"{\"version\":3,\"file\":\"_remember.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../../src/operators/foundation/_remember.ts\"],\"names\":[],\"mappings\":\"AAAA;;;;;;;;;;;;;;GAcG;AAUH,OAAO,EACL,aAAa,GACd,MAAM,2BAA2B,CAAC;AAMnC,MAAM,uBAAgE,UAAa;IACjF,MAAM,CAAC,KAAM,SAAQ,UAAU;QAC7B;;;;;;WAMG;QACH,SAAS;YACP,MAAM,MAAM,GAAG,IAAI,aAAa,EAAK,CAAC;YACtC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;YACvB,MAAM,CAAC,MAAM,CAAC;QAChB,CAAC;KACF,CAAC;AACJ,CAAC\"}","code":"/** @license\r\n *  Copyright 2016 - present The Material Motion Authors. All Rights Reserved.\r\n *\r\n *  Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\r\n *  use this file except in compliance with the License. You may obtain a copy\r\n *  of the License at\r\n *\r\n *      http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n *  Unless required by applicable law or agreed to in writing, software\r\n *  distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\r\n *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\r\n *  License for the specific language governing permissions and limitations\r\n *  under the License.\r\n */\r\nimport { MotionSubject, } from '../../observables/proxies';\r\nexport function withRemember(superclass) {\r\n    return class extends superclass {\r\n        /**\r\n         * Remembers the most recent emission and synchronously emits it to all new\r\n         * subscribers.\r\n         *\r\n         * `_remember()` is also useful for ensuring that expensive operations only\r\n         * happen once per emission, sharing the resulting value with all observers.\r\n         */\r\n        _remember() {\r\n            const result = new MotionSubject();\r\n            this.subscribe(result);\r\n            return result;\r\n        }\r\n    };\r\n}\r\n//# sourceMappingURL=_remember.js.map","dts":{"name":"/Users/brentons/Projects/material-motion-js/packages/core/operators/foundation/_remember.d.ts","text":"/** @license\r\n *  Copyright 2016 - present The Material Motion Authors. All Rights Reserved.\r\n *\r\n *  Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\r\n *  use this file except in compliance with the License. You may obtain a copy\r\n *  of the License at\r\n *\r\n *      http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n *  Unless required by applicable law or agreed to in writing, software\r\n *  distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\r\n *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\r\n *  License for the specific language governing permissions and limitations\r\n *  under the License.\r\n */\r\nimport { Constructor, Observable, ObservableWithMotionOperators } from '../../types';\r\nexport interface MotionMemorable<T> extends Observable<T> {\r\n    _remember(): ObservableWithMotionOperators<T>;\r\n}\r\nexport declare function withRemember<T, S extends Constructor<Observable<T>>>(superclass: S): S & Constructor<MotionMemorable<T>>;\r\n"}}
