* Clones an object and replaces its function properties with throws. * @param {!T} original * @param {!T=} opt_dest * @return {!T} * @template T * @private
(original, opt_dest)
| 923 | * @private |
| 924 | */ |
| 925 | function cloneWithoutFunctions(original, opt_dest) { |
| 926 | const clone = opt_dest || map(); |
| 927 | for (const prop in original) { |
| 928 | const value = original[prop]; |
| 929 | if (typeof value === 'function') { |
| 930 | clone[prop] = notImplemented; |
| 931 | } else { |
| 932 | clone[prop] = original[prop]; |
| 933 | } |
| 934 | } |
| 935 | return clone; |
| 936 | } |
| 937 | |
| 938 | /** @private */ |
| 939 | function notImplemented() { |