Skip to content

Commit

Permalink
Remove type LinkHandlerFunc
Browse files Browse the repository at this point in the history
Signed-off-by: William So <[email protected]>
  • Loading branch information
polyipseity committed Sep 12, 2023
1 parent ad0aebe commit 8a9df8e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
7 changes: 3 additions & 4 deletions sources/settings-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import {
DEFAULT_THEME,
DEFAULT_WINDOWS_PTY,
DEFAULT_WINDOW_OPTIONS,
type LinkHandlerFunc,
PROFILE_PRESETS,
} from "./terminal/profile-presets.js"
import type {
Expand Down Expand Up @@ -635,7 +634,7 @@ export namespace Settings {
unc2,
"activate",
["function"],
) as LinkHandlerFunc,
) as ILinkHandler["activate"],
allowNonHttpProtocols: fixTyped(
DEFAULT_LINK_HANDLER,
unc2,
Expand All @@ -647,13 +646,13 @@ export namespace Settings {
unc2,
"hover",
["undefined", "function"],
) as LinkHandlerFunc | undefined,
) as ILinkHandler["hover"],
leave: fixTyped(
DEFAULT_LINK_HANDLER,
unc2,
"leave",
["undefined", "function"],
) as LinkHandlerFunc | undefined,
) as ILinkHandler["leave"],
} satisfies Required<DeepUndefinable<ILinkHandler>>
return {
...omitBy(ret, isUndefined),
Expand Down
6 changes: 0 additions & 6 deletions sources/terminal/profile-presets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {
WINDOWS_CMD_PATH,
} from "../magic.js"
import type {
IBufferRange,
ILinkHandler,
ILogger,
ITheme,
Expand Down Expand Up @@ -46,11 +45,6 @@ export const
DEFAULT_THEME: ITheme = deepFreeze({}),
DEFAULT_WINDOW_OPTIONS: IWindowOptions = deepFreeze({}),
DEFAULT_WINDOWS_PTY: IWindowsPty = deepFreeze({})
export type LinkHandlerFunc = (
event: MouseEvent,
text: string,
range: IBufferRange,
) => void

export interface ProfilePresets0 {
readonly empty: Settings.Profile.Empty
Expand Down

0 comments on commit 8a9df8e

Please sign in to comment.