Skip to content

Commit 47a47c4

Browse files
committed
(#47) Refactored clipboard class
1 parent 7fe7cf4 commit 47a47c4

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

lib/clipboard.class.ts

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
import { NativeAdapter } from "./adapter/native.adapter.class";
22

33
export class Clipboard {
4-
constructor(private nativeAdapter: NativeAdapter) {}
4+
constructor(private nativeAdapter: NativeAdapter) {
5+
}
56

67
public copy(text: string): Promise<void> {
7-
return new Promise<void>(resolve => {
8-
this.nativeAdapter.copy(text);
9-
resolve();
10-
});
8+
return this.nativeAdapter.copy(text);
119
}
1210

1311
public paste(): Promise<string> {

0 commit comments

Comments
 (0)