( files: readonly string[], opts: Omit<ExtractOpts, 'readFromStdin' | 'signal' | 'throws'>, readFromStdin: boolean | undefined )
| 138 | } |
| 139 | |
| 140 | function canExtractWithNative( |
| 141 | files: readonly string[], |
| 142 | opts: Omit<ExtractOpts, 'readFromStdin' | 'signal' | 'throws'>, |
| 143 | readFromStdin: boolean | undefined |
| 144 | ): boolean { |
| 145 | return ( |
| 146 | !readFromStdin && |
| 147 | typeof opts.idInterpolationPattern === 'string' && |
| 148 | !opts.ast && |
| 149 | !opts.extractSourceLocation && |
| 150 | !opts.onMetaExtracted && |
| 151 | !opts.onMsgError && |
| 152 | !opts.onMsgExtracted && |
| 153 | !opts.overrideIdFn && |
| 154 | !opts.pragma && |
| 155 | !opts.removeDefaultMessage && |
| 156 | isBuiltinFormatter(opts.format) && |
| 157 | files.every( |
| 158 | file => |
| 159 | existsSync(file) && |
| 160 | NATIVE_SUPPORTED_EXTENSIONS.has(extname(file).toLowerCase()) |
| 161 | ) |
| 162 | ) |
| 163 | } |
| 164 | |
| 165 | async function processFile( |
| 166 | source: string, |
no test coverage detected