Skip to content
This repository was archived by the owner on Mar 30, 2021. It is now read-only.

Commit d87e3bc

Browse files
committed
functions with names
This is a [bug in typescript](microsoft/TypeScript#6433)
1 parent 0db0d60 commit d87e3bc

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/decorators.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
export const withKeyCap = (...keyCodes: string[]): void => {
1+
export function withKeyCap(...keyCodes: string[]): void {
22
if (!keyCodes.length) {
33
return;
44
}
55

66
return;
7-
};
7+
}

src/hooks.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ import {
55
unregisterCallback,
66
} from './common';
77

8-
export const useKeyCap = (callback: KeyboardCallback): void => {
8+
export function useKeyCap(callback: KeyboardCallback): void {
99
useEffect(() => {
1010
registerCallback();
1111

1212
return (): void => unregisterCallback();
1313
});
14-
};
14+
}

test/decorator.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { withKeyCap } from '../src/decorators';
22

3-
describe('withKeyCap', () => {
3+
describe(withKeyCap, () => {
44
it.todo('tests stuff');
55
});

0 commit comments

Comments
 (0)