insomnia/packages/insomnia-app/app/httpsnippet.d.ts
James Gatz 381cf74a19
Improve codemirror typings (#3993)
Co-authored-by: Dimitri Mitropoulos <dimitrimitropoulos@gmail.com>
2021-09-08 15:38:07 +00:00

34 lines
835 B
TypeScript

// @TODO We should make a PR for improving the types of httpsnippet.
declare module 'httpsnippet' {
export interface HTTPSnippetClient {
key: string;
title: string;
link: string;
description: string;
}
export interface HTTPSnippetTarget {
key: string;
title: string;
extname: string;
default: string;
clients: HTTPSnippetClient[];
}
class HTTPSnippet {
constructor(data: any);
convert(target: string, options?: any): string | false;
convert(target: string, client?: string, options?: any): string | false;
static addTarget(target: HTTPSnippetTarget): void;
static addTargetClient(target: string, client: HTTPSnippetClient): void;
static extName(target: string): string;
static availableTargets(): HTTPSnippetTarget[];
}
export default HTTPSnippet;
}