PluginProbe
Code Snippets / 3.9.6
Code Snippets v3.9.6
4.0.0-beta.2 3.10.2 3.10.1 3.10.0 3.10.0-beta.2 3.10.0-beta.1 4.0.0-beta.1 3.9.6 trunk 2.10.0 2.10.1 2.12.0 2.12.1 2.13.0 2.13.1 2.13.2 2.13.3 2.14.0 2.14.1 2.14.2 2.14.3 2.14.4 2.14.5 2.14.6 3.0.0 All 65 releases
code-snippets / js / types / Snippet.ts

Snippet.ts in Code Snippets 3.9.6, at js/types/Snippet.ts

30 lines 932 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 export interface Snippet {
2 readonly id: number
3 readonly name: string
4 readonly desc: string
5 readonly code: string
6 readonly tags: string[]
7 readonly scope: SnippetScope
8 readonly priority: number
9 readonly active: boolean
10 readonly network: boolean
11 readonly shared_network?: boolean | null
12 readonly modified?: string
13 readonly conditionId: number
14 readonly code_error?: readonly [string, number] | null
15 }
16
17 export type SnippetCodeType = 'php' | 'html' | 'css' | 'js'
18 export type SnippetType = SnippetCodeType | 'cond'
19
20 export type SnippetCodeScope = typeof SNIPPET_TYPE_SCOPES[SnippetCodeType][number]
21 export type SnippetScope = typeof SNIPPET_TYPE_SCOPES[SnippetType][number]
22
23 export const SNIPPET_TYPE_SCOPES = <const> {
24 php: ['global', 'admin', 'front-end', 'single-use'],
25 html: ['content', 'head-content', 'footer-content'],
26 css: ['admin-css', 'site-css'],
27 js: ['site-head-js', 'site-footer-js'],
28 cond: ['condition']
29 }
30