forked from baobao12356/front-end-daily-question
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5fd9178
commit c6c32cd
Showing
3 changed files
with
58 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,25 @@ | ||
import { QuickPickItem, workspace, WorkspaceConfiguration } from "vscode"; | ||
|
||
export interface IQuickItemEx<T> extends QuickPickItem { | ||
value: T; | ||
value: T; | ||
} | ||
|
||
export function getWorkspaceConfiguration(): WorkspaceConfiguration { | ||
return workspace.getConfiguration("front-end-interview"); | ||
return workspace.getConfiguration("front-end-interview"); | ||
} | ||
|
||
export function getWorkspaceFolder(): string { | ||
return getWorkspaceConfiguration().get<string>("workspaceFolder", ""); | ||
return getWorkspaceConfiguration().get<string>("workspaceFolder", ""); | ||
} | ||
|
||
export enum DescriptionConfiguration { | ||
InWebView = "In Webview", | ||
InFileComment = "In File Comment", | ||
Both = "Both", | ||
None = "None", | ||
InWebView = "In Webview", | ||
InFileComment = "In File Comment", | ||
Both = "Both", | ||
None = "None", | ||
} | ||
|
||
export function filterInvalidPath(path: string) { | ||
const reg = new RegExp('[\\\\/:*?"<>|]', "g"); | ||
return path.replace(reg, ""); | ||
} |