( scope: SourceSaveScope, filePath: string, snapshot: SourceFileSnapshot, )
| 117 | } |
| 118 | |
| 119 | export function enabledSourceSave( |
| 120 | scope: SourceSaveScope, |
| 121 | filePath: string, |
| 122 | snapshot: SourceFileSnapshot, |
| 123 | ): SourceSaveCapability { |
| 124 | const language = getSourceSaveLanguage(filePath); |
| 125 | if (!language) return disabledSourceSave("unsupported-extension"); |
| 126 | return { |
| 127 | enabled: true, |
| 128 | kind: "local-text-file", |
| 129 | scope, |
| 130 | path: filePath, |
| 131 | basename: basenameFromPath(filePath), |
| 132 | language, |
| 133 | hash: snapshot.hash, |
| 134 | mtimeMs: snapshot.mtimeMs, |
| 135 | size: snapshot.size, |
| 136 | eol: snapshot.eol, |
| 137 | }; |
| 138 | } |
no test coverage detected