(
target: string,
tsconfigCompilerOptions: {
target?: string
useDefineForClassFields?: boolean
},
)
| 310 | |
| 311 | describe('useDefineForClassFields', async () => { |
| 312 | const transformClassCode = async ( |
| 313 | target: string, |
| 314 | tsconfigCompilerOptions: { |
| 315 | target?: string |
| 316 | useDefineForClassFields?: boolean |
| 317 | }, |
| 318 | ) => { |
| 319 | const result = await transformWithEsbuild( |
| 320 | ` |
| 321 | class foo { |
| 322 | bar = 'bar' |
| 323 | } |
| 324 | `, |
| 325 | normalizePath(path.resolve(import.meta.dirname, 'bar.ts')), |
| 326 | { |
| 327 | target, |
| 328 | tsconfigRaw: { compilerOptions: tsconfigCompilerOptions }, |
| 329 | }, |
| 330 | ) |
| 331 | return result?.code |
| 332 | } |
| 333 | |
| 334 | const [ |
| 335 | defineForClassFieldsTrueTransformedCode, |
no test coverage detected