Commit ce44ec9

Anton Medvedev <anton@medv.io>
2022-07-01 21:48:44
Fix code style
1 parent 1beb649
Changed files (2)
src/core.ts
@@ -399,32 +399,32 @@ export function cd(dir: string) {
 
 export type LogEntry =
   | {
-  kind: 'cmd'
-  verbose: boolean
-  cmd: string
-}
+      kind: 'cmd'
+      verbose: boolean
+      cmd: string
+    }
   | {
-  kind: 'stdout' | 'stderr'
-  verbose: boolean
-  data: Buffer
-}
+      kind: 'stdout' | 'stderr'
+      verbose: boolean
+      data: Buffer
+    }
   | {
-  kind: 'cd'
-  dir: string
-}
+      kind: 'cd'
+      dir: string
+    }
   | {
-  kind: 'fetch'
-  url: RequestInfo
-  init?: RequestInit
-}
+      kind: 'fetch'
+      url: RequestInfo
+      init?: RequestInit
+    }
   | {
-  kind: 'retry'
-  error: string
-}
+      kind: 'retry'
+      error: string
+    }
   | {
-  kind: 'custom'
-  data: any
-}
+      kind: 'custom'
+      data: any
+    }
 
 export function log(entry: LogEntry) {
   switch (entry.kind) {
test-d/core.test-d.ts
@@ -29,8 +29,8 @@ expectType<ProcessPromise>(p.pipe($`cmd`))
 expectType<ProcessPromise>(p.stdio('pipe'))
 expectType<ProcessPromise>(p.timeout('1s'))
 expectType<Promise<void>>(p.kill())
-expectType<Promise<ProcessOutput>>(p.then(p => p))
-expectType<Promise<any>>(p.catch(p => p))
+expectType<Promise<ProcessOutput>>(p.then((p) => p))
+expectType<Promise<any>>(p.catch((p) => p))
 
 let o = await p
 assert(o instanceof ProcessOutput)
@@ -41,4 +41,3 @@ expectType<number | null>(o.exitCode)
 expectType<NodeJS.Signals | null>(o.signal)
 
 expectType<'banana'>(within(() => 'apple' as 'banana'))
-