(value: unknown)
| 61 | } |
| 62 | |
| 63 | function getSnippetBody(value: unknown): string | null { |
| 64 | if (typeof value === 'string') { |
| 65 | return value |
| 66 | } |
| 67 | |
| 68 | if (Array.isArray(value) && value.every(item => typeof item === 'string')) { |
| 69 | return value.join('\n') |
| 70 | } |
| 71 | |
| 72 | return null |
| 73 | } |
| 74 | |
| 75 | function inferLanguage(fileName: string, snippet: VSCodeSnippetValue): string { |
| 76 | if (typeof snippet.scope === 'string' && snippet.scope.trim()) { |
no outgoing calls
no test coverage detected