Skip to content

Commit

Permalink
refactor: debounce pointer update listeners
Browse files Browse the repository at this point in the history
  • Loading branch information
nickofthyme committed Jun 24, 2021
1 parent f1118dd commit 5f085b5
Show file tree
Hide file tree
Showing 13 changed files with 996 additions and 850 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"redux": "^4.0.4",
"reselect": "^4.0.0",
"resize-observer-polyfill": "^1.5.1",
"ts-debounce": "^1.0.0",
"ts-debounce": "^3.0.0",
"utility-types": "^3.10.0",
"uuid": "^3.3.2"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/charts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"redux": "^4.0.4",
"reselect": "^4.0.0",
"resize-observer-polyfill": "^1.5.1",
"ts-debounce": "^1.0.0",
"ts-debounce": "^3.0.0",
"utility-types": "^3.10.0",
"uuid": "^3.3.2"
},
Expand Down
27 changes: 27 additions & 0 deletions packages/charts/src/__mocks__/ts-debounce.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

/* eslint-disable unicorn/filename-case */

import { debounce as debounceLodash } from 'lodash';

// Need ability to flush debouncer in unit tests. Otherwise functions the same
export const debounce = debounceLodash;

/* eslint-enable unicorn/filename-case */
Loading

0 comments on commit 5f085b5

Please sign in to comment.