1 | 2 |
whops
const fsPromise = require('fs/promises'); | |
const { tmpdir } = require('os'); | |
const path = require('path'); | |
const { spawn } = require('child_process'); | |
const streamBuffers = require('stream-buffers'); | |
async function jtdToTS(jtdPath) { | |
let tmpDir = await fsPromise.mkdtemp(`${tmpdir()}${path.sep}`); | |
let child = spawn('jtd-codegen', [jtdPath, '--typescript-out', tmpDir]); | |
let errbuf = new streamBuffers.WritableStreamBuffer(); |
package cp.week10; | |
import java.io.IOException; | |
import java.nio.file.*; | |
import java.util.List; | |
import static java.util.stream.Collectors.toList; | |
import java.util.Deque; | |
import java.util.concurrent.ConcurrentLinkedDeque; | |
import java.util.concurrent.CountDownLatch; |
1 | 2 |
whops