diff --git a/src/common/utils/__tests__/bind.test.ts b/src/common/utils/__tests__/bind.test.ts deleted file mode 100644 index 77850a88d9..0000000000 --- a/src/common/utils/__tests__/bind.test.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Copyright (c) OpenLens Authors. All rights reserved. - * Licensed under MIT License. See LICENSE in root directory for more information. - */ -import { bind } from "../index"; - -describe("bind", () => { - it("should work correctly", () => { - function foobar(bound: number, nonBound: number): number { - expect(typeof bound).toBe("number"); - expect(typeof nonBound).toBe("number"); - - return bound + nonBound; - } - const foobarBound = bind(foobar, null, 5); - - expect(foobarBound(10)).toBe(15); - }); -}); diff --git a/src/common/utils/index.ts b/src/common/utils/index.ts index 1eb50e2857..d349bd3b14 100644 --- a/src/common/utils/index.ts +++ b/src/common/utils/index.ts @@ -10,13 +10,6 @@ export function noop(...args: T): void { return void args; } -/** - * A typecorrect version of .bind() - */ -export function bind(fn: (...args: [...BoundArgs, ...NonBoundArgs]) => ReturnType, thisArg: any, ...boundArgs: BoundArgs): (...args: NonBoundArgs) => ReturnType { - return fn.bind(thisArg, ...boundArgs); -} - export * from "./app-version"; export * from "./autobind"; export * from "./camelCase";