diff --git a/packages/post/package.json b/packages/post/package.json index 03aa743..35c16e8 100644 --- a/packages/post/package.json +++ b/packages/post/package.json @@ -29,6 +29,7 @@ }, "devDependencies": { "@types/inquirer": "^8.2.10", + "@types/open-in-editor": "^2.2.0", "@types/title": "^3.4.3" }, "publishConfig": { diff --git a/packages/post/src/open-in-editor.d.ts b/packages/post/src/open-in-editor.d.ts deleted file mode 100644 index e6ac715..0000000 --- a/packages/post/src/open-in-editor.d.ts +++ /dev/null @@ -1,53 +0,0 @@ -declare module 'open-in-editor' { - class OpenInEditor { - open(path: string): Promise - } - - interface CreateOpenInEditorOptions { - /** - * Editor to open a file. Once value is set, we try to detect a command to launch an editor. - * - * @default null - */ - editor?: - | 'sublime' - | 'atom' - | 'code' - | 'webstorm' - | 'phpstorm' - | 'idea14ce' - | 'vim' - | 'emacs' - | 'visualstudio' - | null - /** - * Command to launch an editor. - * - * @default null - */ - cmd?: string | null - /** - * Option to specify arguments for a command. Pattern can contain placeholders to be replaced by actual values. Supported placeholders: filename, line and column. - * - * @default null - */ - pattern?: string | null - /** - * Number of the first line in the editor - * @default 1 - */ - line?: number - /** - * Number of the first column in the editor - * @default 1 - */ - column?: number - } - - function configure( - opts?: CreateOpenInEditorOptions, - failCallback?: (err: Error) => void, - ): OpenInEditor - - export = { configure } -} diff --git a/yarn.lock b/yarn.lock index edf541d..4f86faf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -467,6 +467,7 @@ __metadata: "@transloadit/file-exists": "npm:^1.0.0" "@transloadit/slugify": "npm:^1.0.0" "@types/inquirer": "npm:^8.2.10" + "@types/open-in-editor": "npm:^2.2.0" "@types/title": "npm:^3.4.3" inquirer: "npm:^8.2.6" open-in-editor: "npm:^2.2.0" @@ -603,6 +604,13 @@ __metadata: languageName: node linkType: hard +"@types/open-in-editor@npm:^2.2.0": + version: 2.2.0 + resolution: "@types/open-in-editor@npm:2.2.0" + checksum: 10c0/f735a6bded32940c6cd094e6b1c464e1581bc10dd005330efc99847f86b1a96705b6a5a7c27fba6977337dfbff452f568edfe1e0fb607dfc2fc3270ec987edcc + languageName: node + linkType: hard + "@types/through@npm:*": version: 0.0.32 resolution: "@types/through@npm:0.0.32"