forked from codesandbox/codesandbox-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathglyph.ts
More file actions
33 lines (30 loc) · 676 Bytes
/
glyph.ts
File metadata and controls
33 lines (30 loc) · 676 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import { Action } from './';
export interface GlyphOptions {
line: number;
path: string;
className: string;
}
export interface GlyphAction extends Action {
line: number;
path: string;
className: string;
}
/**
* Returns an action that describes to show a correction
* in the code of the editor (with the yellow/blue squiggles)
*
* @export
* @param {string} title
* @param {string} message
* @param {CorrectionOptions} { line, column, payload }
* @returns {CorrectionAction}
*/
export function show({ line, path, className }: GlyphOptions): GlyphAction {
return {
line,
path,
className,
type: 'action',
action: 'show-glyph',
};
}