Skip to content

Commit 37f0c3e

Browse files
committed
💪 Use type alias instead of comments
It seems the latest deno fmt try to format the comments like from /home/runner/work/denops.vim/denops.vim/denops/@denops-private/host.ts: 57 | - success: string, // Callback ID 57 | + success: string // Callback ID 58 | - failure: string, // Callback ID 58 | + , 59 | + failure: string // Callback ID 59 | - ): Promise<void>; 60 | + , 61 | + ): Promise<void>; But the comment was mainly for documentation, so it is better to use type alias instead of comments.
1 parent c727a3f commit 37f0c3e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

denops/@denops-private/host.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ export type HostConstructor = {
4545
};
4646

4747
// Minimum interface of Service that Host is relies on
48+
type CallbackId = string;
4849
export type Service = {
4950
bind(host: Host): void;
5051
load(name: string, script: string): Promise<void>;
@@ -54,8 +55,8 @@ export type Service = {
5455
name: string,
5556
fn: string,
5657
args: unknown[],
57-
success: string, // Callback ID
58-
failure: string, // Callback ID
58+
success: CallbackId,
59+
failure: CallbackId,
5960
): Promise<void>;
6061
};
6162

0 commit comments

Comments
 (0)