mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-22 16:58:28 +02:00
Fix lint
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
import { type HarRequest, availableTargets, HTTPSnippet } from '@readme/httpsnippet';
|
import { type HarRequest, availableTargets, HTTPSnippet } from '@readme/httpsnippet';
|
||||||
import type { HttpRequest, PluginDefinition } from '@yaakapp/api';
|
import type { EditorLanguage, HttpRequest, PluginDefinition } from '@yaakapp/api';
|
||||||
|
|
||||||
// Get all available targets and build select options
|
// Get all available targets and build select options
|
||||||
const targets = availableTargets();
|
const targets = availableTargets();
|
||||||
@@ -44,7 +44,7 @@ const defaultTarget = 'javascript';
|
|||||||
const defaultClient = 'fetch';
|
const defaultClient = 'fetch';
|
||||||
|
|
||||||
// Map httpsnippet target key to editor language for syntax highlighting
|
// Map httpsnippet target key to editor language for syntax highlighting
|
||||||
const editorLanguageMap: Record<string, string> = {
|
const editorLanguageMap: Record<string, EditorLanguage> = {
|
||||||
c: 'c',
|
c: 'c',
|
||||||
clojure: 'clojure',
|
clojure: 'clojure',
|
||||||
csharp: 'csharp',
|
csharp: 'csharp',
|
||||||
@@ -66,7 +66,7 @@ const editorLanguageMap: Record<string, string> = {
|
|||||||
swift: 'swift',
|
swift: 'swift',
|
||||||
};
|
};
|
||||||
|
|
||||||
function getEditorLanguage(targetKey: string): string {
|
function getEditorLanguage(targetKey: string): EditorLanguage {
|
||||||
return editorLanguageMap[targetKey] ?? 'text';
|
return editorLanguageMap[targetKey] ?? 'text';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user