Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 
 
 

35 Zeilen
1.3 KiB

  1. /** @license
  2. * Copyright 2016 - present The Material Motion Authors. All Rights Reserved.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  5. * use this file except in compliance with the License. You may obtain a copy
  6. * of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  12. * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  13. * License for the specific language governing permissions and limitations
  14. * under the License.
  15. */
  16. "use strict";
  17. // TypeScript is a pain to use with polymorphic types unless you wrap them in a
  18. // function that returns a single type. So, that's what this is.
  19. //
  20. // If you give it an observer, you get back that observer. If you give it an
  21. // anonymous function, you get back that anonymous function wrapped in an
  22. // observer.
  23. function wrapWithObserver(listener) {
  24. if (typeof listener === 'function') {
  25. return {
  26. next: listener
  27. };
  28. }
  29. else {
  30. return listener;
  31. }
  32. }
  33. Object.defineProperty(exports, "__esModule", { value: true });
  34. exports.default = wrapWithObserver;
  35. //# sourceMappingURL=wrapWithObserver.js.map